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
1831beab
Commit
1831beab
authored
Feb 01, 2019
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提成暂存
parent
08ce9b15
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
540 additions
and
189 deletions
+540
-189
cssReset.css
src/assets/css/cssReset.css
+45
-2
sellCommissionRules.vue
src/components/FinancialModule/sellCommissionRules.vue
+494
-186
index.js
src/plug/index.js
+1
-1
No files found.
src/assets/css/cssReset.css
View file @
1831beab
...
@@ -523,12 +523,13 @@ vertical-align:middle
...
@@ -523,12 +523,13 @@ vertical-align:middle
bottom
:
0
;
bottom
:
0
;
left
:
50px
;
left
:
50px
;
padding
:
10px
;
padding
:
10px
;
overflow
:
auto
;
overflow
:
hidden
;
font-family
:
'PingFangSc-Fine'
;
font-family
:
'PingFangSc-Fine'
;
z-index
:
999
;
z-index
:
999
;
right
:
0
;
right
:
0
;
background-color
:
#fff
;
background-color
:
#fff
;
border-top
:
3px
solid
#38425d
;
border-top
:
3px
solid
#38425d
;
padding-bottom
:
30px
;
}
}
.bottom-box
.btm-title
{
.bottom-box
.btm-title
{
padding-left
:
10px
;
padding-left
:
10px
;
...
@@ -549,4 +550,46 @@ vertical-align:middle
...
@@ -549,4 +550,46 @@ vertical-align:middle
.page_ShoppingReimbursementDetails
.avatar-uploader-icon
{
.page_ShoppingReimbursementDetails
.avatar-uploader-icon
{
height
:
auto
!important
;
height
:
auto
!important
;
}
}
\ No newline at end of file
/************************** luochao 重新定义表格样式 BEGIN *******************************/
.al-tab
{
width
:
100%
;
border-collapse
:
collapse
;
}
.al-tab
.center.th
,
.al-tab
.center.td
{
text-align
:
center
!important
;
}
.al-tab
,
.al-tab
th
,
.al-tab
td
{
border
:
1px
solid
#ddd
;
}
.al-tab
caption
{
font-size
:
18px
;
color
:
#333
;
height
:
40px
;
line-height
:
40px
;
text-align
:
left
;
padding-left
:
12px
;
}
.al-tab
th
{
background
:
#E6E6E6
;
height
:
40px
;
line-height
:
40px
;
color
:
#333
;
font-size
:
16px
;
font-weight
:
300
;
text-align
:
left
;
padding-left
:
5px
;
}
.al-tab
td
{
height
:
40px
;
line-height
:
40px
;
color
:
#333
;
font-size
:
12px
;
font-weight
:
300
;
text-align
:
left
;
padding-left
:
5px
;
}
/************************** luochao 重新定义表格样式 END *******************************/
\ No newline at end of file
src/components/FinancialModule/sellCommissionRules.vue
View file @
1831beab
<
template
>
<
template
>
<div>
<div
class=
"rule-box"
>
<div
class=
"query-box"
>
<div
class=
"query-box"
>
<ul>
<ul>
<li>
<li>
<input
<input
type=
"button"
class=
"normalBtn"
value=
"新增"
@
click=
"addNew"
>
type=
"button"
class=
"normalBtn"
value=
"新增"
@
click=
"addShow=true,text='新增',ed=false"
>
<input
type=
"button"
class=
"normalBtn"
@
click=
"downMuban()"
value=
"导出"
>
</li>
</li>
</ul>
</ul>
</div>
</div>
<v-table
<v-table
v-if=
"isReady"
v-if=
"isReady"
is-horizontal-resize
is-horizontal-resize
column-width-drag
column-height-drag
style=
"width:100%"
style=
"width:100%"
:is-loading=
"loading"
:columns=
"columns"
:columns=
"columns"
:table-data=
"tableData"
:table-data=
"tableData"
:filter-method=
"filterMethod"
:filter-method=
"filterMethod"
...
@@ -25,119 +22,233 @@
...
@@ -25,119 +22,233 @@
:pageIndex=
"pageIndex"
:pageIndex=
"pageIndex"
:handleCurrentChange=
"handleCurrentChanges"
:handleCurrentChange=
"handleCurrentChanges"
:multiple-sort=
"multipleSort"
:multiple-sort=
"multipleSort"
:is-loading=
"loading"
sort-always
sort-always
@
sort-change=
"sortChange"
@
sort-change=
"sortChange"
@
on-custom-comp=
"customCompFunc"
></v-table>
></v-table>
<!-- @on-custom-comp="customCompFunc" -->
<!-- @on-custom-comp="customCompFunc" -->
<div
class=
"bottom-box"
>
<div
class=
"bottom-box"
v-show=
"showForm"
v-loading=
"formLoading"
>
<div
class=
"btm-title"
>
新增规则
</div>
<div
class=
"btm-title"
>
{{
addMsg
.
ID
==
0
?
'新增规则'
:
'修改规则'
}}
</div>
<div>
<div>
<el-form
<el-form
class=
"_info_box clearfix"
class=
"_info_box clearfix"
:model=
"addMsg"
:model=
"addMsg"
ref=
"addMsg"
ref=
"addMsg"
:rules=
"rules"
label-width=
"110px"
label-width=
"110px"
:rules=
"rules"
>
>
<el-row>
<el-row>
<el-col
:span=
"4"
:gutter=
"20"
>
<el-col
:span=
"4"
:gutter=
"20"
>
<el-form-item
label=
"账户别名:"
>
<el-form-item
label=
"账户别名:"
prop=
"RuleName"
>
<el-input
v-model=
"addMsg.RuleName"
></el-input>
<el-input
v-model=
"addMsg.RuleName"
></el-input>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"4"
:gutter=
"20"
>
<el-col
:span=
"5"
:gutter=
"20"
>
<el-form-item
label=
"提成类别:"
>
<el-form-item
label=
"提成类别:"
>
<el-select
filterable
v-model=
"addMsg.CommissionMethod"
class
>
<el-select
filterable
v-model=
"addMsg.CommissionMethod"
class
>
<el-option
label=
"交易额"
value=
1
></el-option>
<el-option
label=
"交易额"
:value=
"1"
></el-option>
<el-option
label=
"毛利"
value=
2
></el-option>
<!--
<el-option
label=
"毛利"
:value=
"2"
></el-option>
-->
<el-option
label=
"人头数"
value=
3
></el-option>
<el-option
label=
"人头数"
:value=
"3"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"4"
:gutter=
"20"
>
<el-col
:span=
"5"
:gutter=
"20"
>
<el-form-item
label=
"提成方式:"
>
<el-form-item
label=
"提成方式:"
>
<el-select
filterable
v-model=
"addMsg.CommissionType"
class
>
<el-select
filterable
v-model=
"addMsg.CommissionType"
class
>
<el-option
label=
"百分比"
value=
1
></el-option>
<el-option
label=
"固定百分比"
:value=
"1"
v-if=
'addMsg.CommissionMethod==1'
></el-option>
<el-option
label=
"定额"
value=
2
></el-option>
<el-option
label=
"阶梯百分比"
:value=
"2"
v-if=
'addMsg.CommissionMethod==1'
></el-option>
</el-select>
<el-option
label=
"固定金额"
:value=
"3"
v-if=
'addMsg.CommissionMethod==3'
></el-option>
</el-form-item>
<el-option
label=
"阶梯金额"
:value=
"4"
v-if=
'addMsg.CommissionMethod==3'
></el-option>
</el-col>
</el-select>
<el-col
:span=
"4"
:gutter=
"20"
>
</el-form-item>
<el-form-item
label=
"提成比例:"
>
</el-col>
<el-input
v-model=
"addMsg.CommissionVariable"
>
<el-col
:span=
"5"
:gutter=
"20"
>
<template
slot=
"append"
>
{{
addMsg
.
CommissionType
==
1
?
'%'
:
'/人'
}}
</
template
>
<el-form-item
label=
"提成比例:"
prop=
"CommissionVariable"
>
</el-input>
<el-input
</el-form-item>
v-model=
"addMsg.CommissionVariable"
</el-col>
type=
"int"
<el-col
:span=
"4"
:gutter=
"20"
>
:disabled=
"addMsg.CommissionType%2!=1"
<el-form-item
label=
"提成要求:"
>
>
<el-select
filterable
v-model=
"addMsg.Require"
class
>
<template
slot=
"append"
>
{{
addMsg
.
CommissionType
==
1
?
'%'
:
'/人'
}}
</
template
>
<el-option
label=
"已收定金"
value=
1
></el-option>
</el-input>
<el-option
label=
"尾款收齐"
value=
2
></el-option>
</el-form-item>
</el-select>
</el-col>
</el-form-item>
<el-col
:span=
"5"
:gutter=
"20"
>
</el-col>
<el-form-item
label=
"提成要求:"
>
<el-col
:span=
"4"
:gutter=
"20"
>
<el-select
v-model=
"addMsg.Require"
class
>
<el-form-item
label=
"结算周期:"
>
<el-option
label=
"已收定金"
:value=
"1"
></el-option>
<el-select
filterable
v-model=
"addMsg.BalanceCyc"
class
>
<el-option
label=
"尾款收齐"
:value=
"2"
></el-option>
<el-option
label=
"按单结算"
value=
1
></el-option>
</el-select>
<el-option
label=
"按月结算"
value=
2
></el-option>
</el-form-item>
</el-select>
</el-col>
</el-form-item>
</el-row>
</el-col>
<el-row>
</el-row>
<el-col
:span=
"4"
:gutter=
"20"
>
<el-row>
<el-form-item
label=
"结算周期:"
>
<el-col
:span=
"4"
:gutter=
"20"
>
<el-select
v-model=
"addMsg.BalanceCyc"
class
>
<el-form-item
label=
"结算要求:"
>
<el-option
label=
"按单结算"
:value=
"1"
></el-option>
<el-select
filterable
v-model=
"addMsg.BalanceCyc"
class
>
<el-option
label=
"按月结算"
:value=
"2"
></el-option>
<el-option
label=
"强制完成周期内所有订单提成要求"
value=
1
></el-option>
</el-select>
<el-option
label=
"不用强制完成"
value=
0
></el-option>
</el-form-item>
</el-select>
</el-col>
</el-form-item>
<el-col
:span=
"5"
:gutter=
"20"
>
</el-col>
<el-form-item
label=
"结算要求:"
>
<el-col
:span=
"4"
:gutter=
"20"
>
<el-select
v-model=
"addMsg.IsFinishAll"
class
>
<el-form-item
label=
"适用公司:"
>
<el-option
label=
"强制完成周期内所有订单提成要求"
:value=
"1"
></el-option>
<el-select
filterable
v-model=
"addMsg.BalanceCyc"
class
>
<el-option
label=
"不用强制完成"
:value=
"0"
></el-option>
<el-option
label=
"强制完成周期内所有订单提成要求"
value=
1
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"5"
:gutter=
"20"
>
<el-col
:span=
"4"
:gutter=
"20"
>
<el-form-item
label=
"适用公司:"
prop=
"UsingBranchArray"
>
<el-form-item
label=
"适用线路:"
>
<el-select
<el-select
filterable
v-model=
"addMsg.BalanceCyc"
class
>
filterable
<el-option
label=
"强制完成周期内所有订单提成要求"
value=
1
></el-option>
multiple
</el-select>
collapse-tags
</el-form-item>
@
change=
"changeData(1)"
</el-col>
v-model=
"addMsg.UsingBranchArray"
<el-col
:span=
"4"
:gutter=
"20"
>
class
<el-form-item
label=
"启用时间"
>
>
<el-select
filterable
v-model=
"addMsg.BalanceCyc"
class
>
<el-option
label=
"集团通用"
value=
"-1"
></el-option>
<el-option
label=
"强制完成周期内所有订单提成要求"
value=
1
></el-option>
<el-option
</el-select>
v-for=
"(item, index) in CompanyList"
</el-form-item>
:label=
"item.BName"
</el-col>
:value=
"item.Id.toString()"
</el-row>
:key=
"index"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"5"
:gutter=
"20"
>
<el-form-item
label=
"适用线路:"
prop=
"UsingLineArray"
>
<el-select
filterable
multiple
collapse-tags
@
change=
"changeData(2)"
v-model=
"addMsg.UsingLineArray"
class
>
<el-option
label=
"所有线路"
value=
"-1"
></el-option>
<el-option
v-for=
"(item, index) in lines"
:label=
"item.lineName"
:value=
"item.lineID.toString()"
:key=
"index"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"5"
:gutter=
"20"
>
<el-form-item
label=
"启用时间:"
>
<el-date-picker
v-model=
"addMsg.EffectDate"
type=
"date"
placeholder=
"选择启用时间"
></el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<table
class=
"al-tab"
v-show=
"addMsg.CommissionType%2==0"
>
<caption>
阶梯提成比例设定
</caption>
<thead>
<th>
序号
</th>
<th>
起始人数
</th>
<th>
终止人数
</th>
<th>
基础比列
</th>
<th>
额外奖励
</th>
<th>
操作
</th>
</thead>
<tbody>
<tr
v-for=
"(item, index) in addMsg.RuleClassList"
:key=
"index"
>
<td>
{{index+1}}
</td>
<td>
<el-input-number
size=
"small"
style=
"margin:0 12px"
:min=
"1"
:max=
"item.EndPeople"
v-model=
"item.StartPeople"
class=
"w120"
></el-input-number>
</td>
<td>
<el-input-number
size=
"small"
style=
"margin:0 15px"
:min=
"item.StartPeople"
v-model=
"item.EndPeople"
class=
"w100"
></el-input-number>
</td>
<td>
<el-input
placeholder=
"请输入基础比例"
size=
"small"
v-model=
"item.BaseVariable"
class=
"w200"
>
<
template
slot=
"append"
>
{{
addMsg
.
CommissionType
==
2
?
'%'
:
'/人'
}}
</
template
>
</el-input>
</td>
<td>
<el-input
placeholder=
"请输入外卖奖励"
size=
"small"
v-model=
"item.AddedVariable"
class=
"w200 temp"
>
<
template
slot=
"append"
>
<el-select
v-model=
"item.AddedMethod"
class
>
<el-option
label=
"/人"
:value=
"2"
></el-option>
<el-option
label=
"%"
:value=
"1"
></el-option>
</el-select>
</
template
>
</el-input>
</td>
<td>
<el-button
type=
"primary"
icon=
"el-icon-plus"
size=
"mini"
circle
v-if=
"index==addMsg.RuleClassList.length-1"
@
click=
"addCommissionType"
></el-button>
<el-button
type=
"danger"
icon=
"el-icon-delete"
size=
"mini"
circle
@
click=
"deleteCommissionType(index)"
v-if=
"addMsg.RuleClassList.length>1"
></el-button>
</td>
</tr>
</tbody>
</table>
</el-row>
</el-form>
</el-form>
</div>
</div>
<div
class=
"btm-opera-btn"
>
<div
class=
"btm-opera-btn"
>
<input
<input
type=
"button"
class=
"normalBtn"
value=
"保存"
@
click=
"save"
>
type=
"button"
<input
type=
"button"
class=
"cancelBtn"
value=
"取消"
@
click=
"changeShow(0)"
>
class=
"normalBtn"
value=
"保存"
>
<input
type=
"button"
class=
"cancelBtn"
value=
"取消"
>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
Vue
from
"vue"
;
export
default
{
export
default
{
data
()
{
data
()
{
var
checkVariable
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
==
null
||
value
.
length
==
0
)
{
return
callback
(
new
Error
(
"提成比列不能为空"
));
}
let
a
=
parseFloat
(
value
);
if
(
isNaN
(
a
))
{
callback
(
new
Error
(
"提成比例必须是整数"
));
}
else
{
callback
();
}
};
return
{
return
{
columns
:
[],
columns
:
[],
remoteLoading
:
false
,
remoteLoading
:
false
,
...
@@ -148,27 +259,146 @@ export default {
...
@@ -148,27 +259,146 @@ export default {
loading
:
false
,
loading
:
false
,
pageSize
:
1000
,
pageSize
:
1000
,
pageIndex
:
1
,
pageIndex
:
1
,
msg
:{},
msg
:
{},
CompanyList
:[],
CompanyList
:
[],
addMsg
:{
addMsg
:
{},
ID
:
0
,
lines
:
[],
RuleName
:
""
,
rules
:
{
CommissionMethod
:
'1'
,
RuleName
:
[
CommissionType
:
'1'
,
{
required
:
true
,
message
:
"请输入规则名称"
,
trigger
:
"blur"
}
Require
:
'1'
,
],
CommissionVariable
:
'0'
,
UsingLineArray
:
[
UsingLine
:
''
,
{
UsingBranch
:
''
,
type
:
"array"
,
EffectDate
:
null
,
required
:
true
,
RB_Group_Id
:
0
,
message
:
"请至少选择一个适用线路"
,
BalanceCyc
:
''
,
trigger
:
"blur"
IsFinishAll
:
'0'
,
}
IsDelete
:
1
],
UsingBranchArray
:
[
{
type
:
"array"
,
required
:
true
,
message
:
"请至少选择一个适用公司"
,
trigger
:
"blur"
}
],
CommissionVariable
:
[{
validator
:
checkVariable
,
trigger
:
"blur"
}]
},
},
rules
:
{}
showForm
:
false
,
formLoading
:
false
,
searchMsg
:
{
RB_Group_Id
:
0
}
};
};
},
},
methods
:
{
methods
:
{
customCompFunc
(
params
)
{
if
(
params
.
type
===
"delete"
)
{
this
.
delete
(
params
.
data
.
ID
);
//this.financeinfoRemove(params.id,params.alias)
}
else
if
(
params
.
type
===
"edit"
)
{
this
.
addNew
(
params
.
data
);
}
},
delete
(
id
)
{
this
.
$confirm
(
"此操作将永久删除该提成规则, 是否继续?"
,
"删除提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
})
.
then
(()
=>
{
let
msg
=
{
id
};
this
.
apipost
(
"sellcommission_rule_delete"
,
msg
,
x
=>
{
if
(
x
.
data
.
resultCode
==
1
)
{
this
.
Success
(
"删除成功"
);
this
.
getData
()
}
else
{
this
.
Error
(
this
.
data
.
message
);
}
});
})
.
catch
(()
=>
{});
},
addNew
(
data
)
{
if
(
!
data
.
ID
)
{
this
.
addMsg
=
{
ID
:
0
,
RuleName
:
""
,
CommissionMethod
:
1
,
CommissionType
:
1
,
Require
:
1
,
CommissionVariable
:
0
,
UsingLineArray
:
[
"-1"
],
UsingBranchArray
:
[
"-1"
],
UsingLine
:
""
,
UsingBranch
:
""
,
EffectDate
:
null
,
RB_Group_Id
:
this
.
searchMsg
.
RB_Group_Id
,
BalanceCyc
:
1
,
IsFinishAll
:
0
,
IsDelete
:
1
,
RuleClassList
:
[
{
StartPeople
:
1
,
EndPeople
:
1
,
BaseVariable
:
0
,
AddedVariable
:
0
,
AddedMethod
:
1
}
]
};
}
else
{
data
.
UsingLineArray
=
data
.
UsingLine
.
split
(
","
);
data
.
UsingBranchArray
=
data
.
UsingBranch
.
split
(
","
);
this
.
addMsg
=
data
;
}
this
.
changeShow
(
1
);
},
save
()
{
//sellcommission_rule_set
this
.
$refs
[
"addMsg"
].
validate
(
valid
=>
{
if
(
valid
)
{
this
.
formLoading
=
true
;
this
.
addMsg
.
UsingLine
=
this
.
addMsg
.
UsingLineArray
.
join
(
","
);
this
.
addMsg
.
UsingBranch
=
this
.
addMsg
.
UsingBranchArray
.
join
(
","
);
this
.
apipost
(
"sellcommission_rule_set"
,
this
.
addMsg
,
x
=>
{
if
(
x
.
data
.
resultCode
==
1
)
{
this
.
changeShow
(
0
);
this
.
Success
(
"保存成功"
);
this
.
getData
();
}
else
{
this
.
Error
(
x
.
data
.
message
);
}
this
.
formLoading
=
false
;
});
}
else
{
return
false
;
}
});
},
changeShow
(
t
)
{
this
.
showForm
=
t
==
1
;
},
deleteCommissionType
(
index
)
{
this
.
addMsg
.
RuleClassList
.
splice
(
index
,
1
);
},
addCommissionType
()
{
let
obj
=
{
StartPeople
:
this
.
addMsg
.
RuleClassList
[
this
.
addMsg
.
RuleClassList
.
length
-
1
]
.
EndPeople
+
1
,
EndPeople
:
this
.
addMsg
.
RuleClassList
[
this
.
addMsg
.
RuleClassList
.
length
-
1
]
.
EndPeople
+
1
,
Variable
:
0
,
AddedVariable
:
0
,
AddedMethod
:
"1"
};
this
.
addMsg
.
RuleClassList
.
push
(
obj
);
},
initColums
()
{
initColums
()
{
this
.
isReady
=
false
;
this
.
isReady
=
false
;
let
that
=
this
;
let
that
=
this
;
...
@@ -182,7 +412,8 @@ export default {
...
@@ -182,7 +412,8 @@ export default {
width
:
40
,
width
:
40
,
filters
:
[{}],
filters
:
[{}],
isResize
:
true
,
isResize
:
true
,
type
:
"text"
type
:
"text"
,
isFrozen
:
true
};
};
let
companyList
=
[];
let
companyList
=
[];
this
.
CompanyList
.
forEach
(
x
=>
{
this
.
CompanyList
.
forEach
(
x
=>
{
...
@@ -198,12 +429,19 @@ export default {
...
@@ -198,12 +429,19 @@ export default {
titleAlign
:
"left"
,
titleAlign
:
"left"
,
columnAlign
:
"left"
,
columnAlign
:
"left"
,
isResize
:
true
,
isResize
:
true
,
filterMultiple
:
fals
e
,
filterMultiple
:
tru
e
,
filters
:
companyList
,
filters
:
companyList
,
result
:
""
,
result
:
[]
,
type
:
"select"
type
:
"select"
,
// isFrozen:
true
isFrozen
:
true
};
};
let
lines
=
[];
this
.
lines
.
forEach
(
x
=>
{
let
item
=
{};
item
.
label
=
x
.
lineName
;
item
.
value
=
x
.
lineID
;
lines
.
push
(
item
);
});
let
LineName
=
{
let
LineName
=
{
field
:
"LineName"
,
field
:
"LineName"
,
title
:
"适用线路"
,
title
:
"适用线路"
,
...
@@ -211,30 +449,33 @@ export default {
...
@@ -211,30 +449,33 @@ export default {
titleAlign
:
"left"
,
titleAlign
:
"left"
,
columnAlign
:
"left"
,
columnAlign
:
"left"
,
isResize
:
true
,
isResize
:
true
,
result
:
""
,
result
:
[],
filterMultiple
:
false
,
filterMultiple
:
true
,
filters
:
[{}],
filters
:
lines
,
type
:
"text"
isFrozen
:
true
,
formatter
:
function
(
rowData
,
rowIndex
,
pagingIndex
,
field
)
{
if
(
rowData
.
UsingLine
==
"-1"
)
{
return
"所有线路"
;
}
else
{
let
lineNames
=
""
;
rowData
.
UsingLine
.
split
(
","
).
forEach
(
x
=>
{
that
.
lines
.
forEach
(
y
=>
{
if
(
y
.
lineID
==
x
)
{
lineNames
+=
y
.
lineName
+
","
;
}
});
});
return
lineNames
;
}
}
};
};
let
Rules
=
{
let
Rules
=
{
title
:
"提成规则"
,
title
:
"提成规则"
,
field
:
"RuleDescription"
,
titleAlign
:
"left"
,
titleAlign
:
"left"
,
columnAlign
:
"left"
,
columnAlign
:
"left"
,
isResize
:
true
,
width
:
300
width
:
80
,
// orderBy: "desc"
orderBy
:
"desc"
,
// formatter: function(rowData, rowIndex, pagingIndex, field) {
// if (
// rowData["Initialbalance"] >= rowData["RiskLimitMoney"] &&
// rowData["Initialbalance"] != 0
// )
// return `
<
span
style
=
'color:red;font-weight:bold'
>
$
{
rowData
[
// "Initialbalance"
// ].toFixed(
// 2
// )}
<
/span><span style='color:red;margin-left:12px;'>超限</
span
>
`;
// else return rowData["Initialbalance"].toFixed(2);
// }
};
};
let
EffectDate
=
{
let
EffectDate
=
{
field
:
"EffectDate"
,
field
:
"EffectDate"
,
...
@@ -243,32 +484,17 @@ export default {
...
@@ -243,32 +484,17 @@ export default {
columnAlign
:
"left"
,
columnAlign
:
"left"
,
isResize
:
true
,
isResize
:
true
,
width
:
80
,
width
:
80
,
// formatter: function(rowData, rowIndex, pagingIndex, field) {
formatter
:
function
(
rowData
,
rowIndex
,
pagingIndex
,
field
)
{
// return rowData.SettlementType == 1
return
rowData
.
EffectDate
.
split
(
"T"
)[
0
];
// ? rowData.Commission.toFixed(2) + "%"
}
// : rowData.Commission + "/人";
// },
// filterMultiple: true,
// result: [],
// filters: [
// {
// label: "交易额百分比",
// value: "1"
// },
// {
// label: "交易人头数",
// value: "2"
// }
// ],
//type: "check"
};
};
let
CommissionLog
=
{
let
CommissionLog
=
{
title
:
"提成记录"
,
title
:
"提成记录"
,
titleAlign
:
"left"
,
titleAlign
:
"left"
,
columnAlign
:
"left"
,
columnAlign
:
"left"
,
isResize
:
true
,
isResize
:
true
,
width: 80
,
width
:
80
orderBy: "",
//
orderBy: "",
// formatter: function(rowData, rowIndex, pagingIndex, field) {
// formatter: function(rowData, rowIndex, pagingIndex, field) {
// return rowData.Royalty.toFixed(2);
// return rowData.Royalty.toFixed(2);
// }
// }
...
@@ -279,28 +505,20 @@ export default {
...
@@ -279,28 +505,20 @@ export default {
columnAlign
:
"left"
,
columnAlign
:
"left"
,
isResize
:
true
,
isResize
:
true
,
width
:
80
,
width
:
80
,
// formatter: function(rowData, rowIndex, pagingIndex, field) {
formatter
:
function
(
rowData
,
rowIndex
,
pagingIndex
,
field
)
{
// return `
<
span
style
=
'color:${
let
cyc
=
""
;
// rowData.HaveContract == 0 ? "red" : "blue"
if
(
rowData
.
BalanceCyc
==
"1"
)
{
// };margin-right:12px;'
>
$
{
cyc
=
"按单结算("
;
// rowData.HaveContract == 0 ? "无合同" : "有合同"
}
else
{
// }
<
/span><span>$
{
cyc
=
"按月结算("
;
// rowData.ContraceDateRange ? rowData.ContraceDateRange : ""
}
// }
<
/span>`
;
if
(
rowData
.
IsFinishAll
==
"1"
)
{
// },
cyc
+=
"必选完成周期内所有的提成要求)"
;
// filterMultiple: true,
}
else
{
// result: [],
cyc
+=
"不强制完成周期内所有的提成要求)"
;
// filters: [
}
// {
return
cyc
;
// label: "有合同",
}
// value: "1"
// },
// {
// label: "无合同",
// value: "0"
// }
// ],
// type: "check"
};
};
let
opera
=
{
let
opera
=
{
title
:
"操作"
,
title
:
"操作"
,
...
@@ -321,6 +539,22 @@ export default {
...
@@ -321,6 +539,22 @@ export default {
this
.
columns
.
push
(
opera
);
this
.
columns
.
push
(
opera
);
this
.
isReady
=
true
;
this
.
isReady
=
true
;
},
},
changeData
(
type
)
{
let
temp
=
[];
if
(
type
==
1
)
{
temp
=
this
.
addMsg
.
UsingBranchArray
;
}
else
if
(
type
==
2
)
{
temp
=
this
.
addMsg
.
UsingLineArray
;
}
let
len
=
temp
.
length
;
if
(
len
>
1
)
{
if
(
temp
[
len
-
1
]
==
-
1
)
{
temp
.
splice
(
0
,
len
-
1
);
}
else
if
(
temp
.
indexOf
(
"-1"
)
!=
-
1
)
{
temp
.
splice
(
temp
.
indexOf
(
"-1"
),
1
);
}
}
},
handleCurrentChanges
(
val
)
{
handleCurrentChanges
(
val
)
{
this
.
pageIndex
=
val
;
this
.
pageIndex
=
val
;
this
.
getList
();
this
.
getList
();
...
@@ -358,18 +592,92 @@ export default {
...
@@ -358,18 +592,92 @@ export default {
x
.
disabled
=
false
;
x
.
disabled
=
false
;
});
});
this
.
CompanyList
=
data
;
this
.
CompanyList
=
data
;
this
.
initColums
();
this
.
getline
();
}
else
{
}
else
{
}
}
},
},
err
=>
{}
err
=>
{}
);
);
},
},
getline
()
{
let
msg
=
{
pageIndex
:
0
,
pageSize
:
100
};
this
.
apipost
(
"line_post_GetPageList"
,
msg
,
x
=>
{
this
.
lines
=
x
.
data
.
data
.
pageData
;
// console.log(this.lines)
this
.
initColums
();
this
.
getData
();
},
err
=>
{}
);
},
getData
()
{
this
.
loading
=
true
;
this
.
apipost
(
"sellcommission_rule_get"
,
this
.
searchMsg
,
x
=>
{
this
.
tableData
=
x
.
data
.
data
;
this
.
loading
=
false
;
});
}
},
},
mounted
()
{
mounted
()
{
this
.
getCompanyList
()
this
.
searchMsg
.
RB_Group_Id
=
this
.
addMsg
.
RB_Group_Id
=
this
.
getLocalStorage
().
RB_Group_id
;
this
.
getCompanyList
();
Vue
.
component
(
"table-operation"
,
{
template
:
`<div style='width:80px;height:40px;background:#fff;text-align:center;position: relative;left:-5px;padding-top: 6px;padding-top:6px;'><el-button type="primary" size='mini' icon="el-icon-edit" circle @click="update(rowData,index)"></el-button><el-button type="danger" size='mini' icon="el-icon-delete" circle @click="deleteRow(rowData,index)"></el-button></div>`
,
props
:
{
rowData
:
{
type
:
Object
},
field
:
{
type
:
String
},
index
:
{
type
:
Number
}
},
methods
:
{
update
()
{
let
params
=
{
type
:
"edit"
,
data
:
this
.
rowData
};
this
.
$emit
(
"on-custom-comp"
,
params
);
},
deleteRow
()
{
let
params
=
{
type
:
"delete"
,
data
:
this
.
rowData
};
this
.
$emit
(
"on-custom-comp"
,
params
);
}
}
});
}
}
};
};
</
script
>
</
script
>
<
style
>
<
style
>
/* .rule-box .el-select__tags{
top: 100%;
} */
.rule-box
.el-input
.el-input__inner
,
.rule-box
.el-select
.el-input
{
height
:
auto
;
}
.rule-box
.el-select
{
display
:
block
;
}
.el-input-group__append
,
.el-input-group__prepend
{
border-radius
:
0
;
}
.rule-box
.el-date-editor.el-input
,
.rule-box
.el-date-editor.el-input__inner
{
width
:
100%
;
}
.rule-box
.temp
.el-input-group__append
{
width
:
70px
;
}
.rule-box
.temp
.el-select
{
background
:
#409eff
;
color
:
#fff
;
}
.rule-box
.temp
.el-select
.el-input
.el-select__caret
{
color
:
#f1f1f1
;
}
</
style
>
</
style
>
src/plug/index.js
View file @
1831beab
...
@@ -121,7 +121,7 @@ export default {
...
@@ -121,7 +121,7 @@ export default {
// domainUrl = "http://192.168.2.16:8083"; //王悦主域名
// domainUrl = "http://192.168.2.16:8083"; //王悦主域名
// domainUrl = "http://127.0.0.1"; //214主域名
// domainUrl = "http://127.0.0.1"; //214主域名
// domainUrl = "http://192.168.2.65:8025"; //吴春主域名
// domainUrl = "http://192.168.2.65:8025"; //吴春主域名
domainUrl
=
"http://192.168.2.
214
:8082"
;
//罗超主域名
domainUrl
=
"http://192.168.2.
106
:8082"
;
//罗超主域名
if
(
locationName
.
indexOf
(
'oytour'
)
!==-
1
)
{
if
(
locationName
.
indexOf
(
'oytour'
)
!==-
1
)
{
domainUrl
=
"https://reborn.oytour.com"
;
domainUrl
=
"https://reborn.oytour.com"
;
}
else
if
(
locationName
.
indexOf
(
'viitto'
)
!==-
1
)
{
}
else
if
(
locationName
.
indexOf
(
'viitto'
)
!==-
1
)
{
...
...
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