Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bims
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
孙海亮
bims
Commits
1c14d620
Commit
1c14d620
authored
3 years ago
by
yanglilong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'修改'
parent
57321a53
master
ECCS-3108
test
1 merge request
!1
Yanglilong
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
291 additions
and
5 deletions
+291
-5
info.js
src/api/apis_moudles/info.js
+5
-0
info.js
src/api/funcs_modules/info.js
+22
-2
state_code.js
src/api/state_code.js
+1
-2
company.vue
src/views/info/company.vue
+24
-1
companyDiscount.vue
src/views/info/components/companyDiscount.vue
+239
-0
No files found.
src/api/apis_moudles/info.js
View file @
1c14d620
...
...
@@ -8,6 +8,11 @@ export default {
/*-------------保险公司-----------------*/
payorList
:
"
/backstage/auth/payorList
"
,
//保险公司列表
payorDetail
:
"
/backstage/auth/payorDetail
"
,
//保险公司详情
payorUpdate
:
"
/backstage/auth/payorUpdate
"
,
//保险公司修改
payorDelete
:
"
/backstage/auth/payorDelete
"
,
//保险公司删除
/*-------------折扣信息-----------------*/
payorAddDiscount
:
"
/backstage/auth/payorAddDiscount
"
,
//编辑折扣信息
payorDiscountDelete
:
"
/backstage/auth/payorDiscountDelete
"
,
//删除折扣信息
};
This diff is collapsed.
Click to expand it.
src/api/funcs_modules/info.js
View file @
1c14d620
...
...
@@ -33,13 +33,30 @@ const DOCTORUPDATE = (data) => {
const
PAYORLIST
=
(
data
)
=>
{
return
req
.
post
(
apis
.
payorList
,
data
);
};
//保险公司详情
const
PAYORDETAIL
=
(
data
)
=>
{
return
req
.
post
(
apis
.
payorDetail
,
data
);
};
//保险公司修改
const
PAYORUPDATE
=
(
data
)
=>
{
return
req
.
post
(
apis
.
payorUpdate
,
data
);
};
//保险公司删除
const
PAYORDELETE
=
(
data
)
=>
{
return
req
.
post
(
apis
.
payorDelete
,
data
);
return
req
.
post
(
apis
.
payorDelete
,
data
);
};
/*-------------折扣信息-----------------*/
//编辑折扣信息
const
PAYORADDDISCOUNT
=
(
data
)
=>
{
return
req
.
post
(
apis
.
payorAddDiscount
,
data
);
};
//删除折扣信息
const
PAYORDISCOUNTDELETE
=
(
data
)
=>
{
return
req
.
post
(
apis
.
payorDiscountDelete
,
data
);
};
// 对象数组
...
...
@@ -50,6 +67,9 @@ export default {
DOCTORCREATE
,
DOCTORUPDATE
,
PAYORLIST
,
PAYORDETAIL
,
PAYORUPDATE
,
PAYORDELETE
PAYORDELETE
,
PAYORADDDISCOUNT
,
PAYORDISCOUNTDELETE
};
This diff is collapsed.
Click to expand it.
src/api/state_code.js
View file @
1c14d620
...
...
@@ -13,7 +13,7 @@ const TOKEN_INVLIDE_TO_LOGIN = (code) => {
description
:
"
token已过期
"
,
});
}
// 清
楚
个人数据
// 清
除
个人数据
store
.
commit
(
"
user/setUserInfo
"
,
""
);
route
.
replace
({
path
:
"
/login
"
,
...
...
@@ -28,7 +28,6 @@ const PUB_ERR = (code, message, config) => {
if
(
config
.
responseType
&&
config
.
responseType
===
"
blob
"
)
{
return
true
;
}
console
.
log
(
"
错误信息
"
,
code
,
message
,
config
);
return
true
;
};
...
...
This diff is collapsed.
Click to expand it.
src/views/info/company.vue
View file @
1c14d620
...
...
@@ -12,6 +12,7 @@
:slot=
"col.dataIndex"
slot-scope=
"text, record, index"
:key=
"col.dataIndex"
@
click.stop=
"seeDetail(record)"
>
<template
v-if=
"col.dataIndex == 'operation'"
>
<a-button
type=
"link"
@
click.stop=
"editEvt(record, index)"
>
{{
...
...
@@ -34,11 +35,15 @@
</a-table>
<!--分页-->
<BurtPagination
:pagination=
"pagination"
@
pageChange=
"getData"
/>
<!--折扣信息-->
<Discount
/>
</div>
</template>
<
script
>
import
BurtPagination
from
"
@/components/CUSTOMER/pagation
"
;
import
Discount
from
"
./components/companyDiscount
"
;
const
columns
=
[
{
title
:
"
序号
"
,
...
...
@@ -62,7 +67,7 @@ const columns = [
{
title
:
"
联系电话
"
,
dataIndex
:
"
contactPhone
"
,
ellipsis
:
true
,
scopedSlots
:
{
customRender
:
"
contactPhone
"
}
,
width
:
125
,
},
{
...
...
@@ -108,6 +113,7 @@ export default {
},
components
:
{
BurtPagination
,
Discount
},
created
()
{
this
.
getData
();
...
...
@@ -177,6 +183,23 @@ export default {
},
});
},
//查看详情
seeDetail
(
record
)
{
//没有编辑
if
(
!
record
.
edit
)
{
this
.
$apis
.
PAYORDETAIL
({
id
:
record
.
id
,
})
.
then
((
res
)
=>
{
if
(
res
.
returnCode
==
"
0000
"
)
{
console
.
log
(
res
.
content
||
{},
1111
);
}
else
{
this
.
$message
.
error
(
res
.
returnMsg
);
}
});
}
},
},
};
</
script
>
...
...
This diff is collapsed.
Click to expand it.
src/views/info/components/companyDiscount.vue
0 → 100644
View file @
1c14d620
<
template
>
<!--折扣信息-->
<div
class=
"discount-container"
>
<div
class=
"title-div"
>
下面的是写死为1001这条保险公司的-----折扣信息
</div>
<a-table
:columns=
"columns"
:data-source=
"tableList"
:scroll=
"
{ x: 'max-content' }"
:pagination="false"
>
<div
v-for=
"col in columns"
:slot=
"col.dataIndex"
slot-scope=
"text, record, index"
:key=
"col.dataIndex"
>
<template
v-if=
"col.dataIndex == 'operation'"
>
<a-button
type=
"link"
@
click.stop=
"editEvt(record, index)"
>
{{
record
.
edit
?
"
保存
"
:
"
修改
"
}}
</a-button>
<a-button
type=
"link"
class=
"success"
>
新增
</a-button>
<a-button
type=
"link"
class=
"danger"
@
click.stop=
"delRecord(index)"
>
删除
</a-button
>
</
template
>
<
template
v-else-if=
"col.dataIndex == 'benefits'"
slot-scope=
"text, record"
>
<a-select
v-if=
"record.edit"
v-model=
"record.benefits"
placeholder=
"请选择"
mode=
"multiple"
>
<a-select-option
:value=
"item.benefitCode"
v-for=
"item in benefitType"
:key=
"item.benefitCode"
>
{{
item
.
description
}}
</a-select-option
>
</a-select>
<span
v-else
>
{{
filterType
(
record
.
benefits
)
}}
</span>
</
template
>
<
template
v-else
>
<a-input
v-if=
"record.edit"
placeholder=
"请输入"
v-model=
"record[col.dataIndex]"
/>
<span
v-else
>
{{
text
}}
</span>
</
template
>
</div>
</a-table>
<!--分页-->
<BurtPagination
:pagination=
"pagination"
@
pageChange=
"getTableList"
/>
</div>
</template>
<
script
>
import
BurtPagination
from
"
@/components/CUSTOMER/pagation
"
;
const
columns
=
[
{
title
:
"
序号
"
,
dataIndex
:
"
id
"
,
width
:
205
,
},
{
title
:
"
项目
"
,
dataIndex
:
"
benefits
"
,
ellipsis
:
true
,
scopedSlots
:
{
customRender
:
"
benefits
"
},
width
:
310
,
},
{
title
:
"
折扣比例
"
,
dataIndex
:
"
ratio
"
,
ellipsis
:
true
,
scopedSlots
:
{
customRender
:
"
ratio
"
},
width
:
190
,
},
{
title
:
"
备注
"
,
dataIndex
:
"
remark
"
,
scopedSlots
:
{
customRender
:
"
remark
"
},
width
:
180
,
},
{
title
:
"
操作
"
,
dataIndex
:
"
operation
"
,
scopedSlots
:
{
customRender
:
"
operation
"
},
fixed
:
"
right
"
,
width
:
"
170px
"
,
},
];
export
default
{
data
()
{
return
{
columns
,
pagination
:
{
pageNum
:
1
,
pageSize
:
5
,
total
:
0
,
},
dataList
:
[],
//所有的折扣信息
tableList
:
[],
//显示
benefitType
:
[],
//福利类型
benefitTypeObj
:
{},
//福利类型对象
};
},
components
:
{
BurtPagination
,
},
created
()
{
this
.
getData
();
this
.
getBenefitType
();
},
methods
:
{
//过滤器
filterType
(
val
)
{
let
txt
=
(
val
||
[]).
map
((
item
)
=>
{
return
this
.
benefitTypeObj
[
item
]
||
""
;
});
return
txt
.
join
(
"
,
"
);
},
//获取福利类型列表
getBenefitType
()
{
this
.
$apis
.
GETBENEGITTYPE
().
then
((
res
)
=>
{
if
(
res
.
returnCode
==
"
0000
"
)
{
this
.
benefitType
=
res
.
content
||
[];
(
res
.
content
||
[]).
forEach
((
item
)
=>
{
this
.
benefitTypeObj
[
item
.
benefitCode
]
=
item
.
description
;
});
}
else
{
this
.
$message
.
error
(
res
.
returnMsg
);
}
});
},
//获取列表
getData
()
{
this
.
$apis
.
PAYORDETAIL
({
id
:
1001
,
})
.
then
((
res
)
=>
{
if
(
res
.
returnCode
==
"
0000
"
)
{
let
list
=
res
.
content
.
discountList
||
[];
this
.
pagination
.
total
=
list
.
length
;
this
.
dataList
=
list
;
this
.
getTableList
();
}
else
{
this
.
$message
.
error
(
res
.
returnMsg
);
}
});
},
//分页
getTableList
()
{
let
list
=
this
.
dataList
.
slice
(
(
this
.
pagination
.
pageNum
-
1
)
*
this
.
pagination
.
pageSize
,
this
.
pagination
.
pageNum
*
this
.
pagination
.
pageSize
);
this
.
tableList
=
list
.
map
((
item
)
=>
{
return
{
...
item
,
edit
:
false
,
benefits
:
(
item
.
benefits
||
""
).
split
(
"
,
"
),
};
});
},
//编辑
editEvt
(
record
,
index
)
{
this
.
tableList
.
forEach
((
item
,
i
)
=>
{
if
(
index
!=
i
)
{
item
.
edit
=
false
;
}
});
record
.
edit
=
!
record
.
edit
;
//保存
if
(
!
record
.
edit
)
{
this
.
$apis
.
PAYORADDDISCOUNT
({
payorId
:
1001
,
id
:
record
.
id
,
ratio
:
record
.
ratio
,
remark
:
record
.
remark
,
discountBenefitList
:
(
record
.
benefits
||
[]).
map
((
item
)
=>
{
return
{
benefitCode
:
item
,
discountId
:
record
.
id
};
}),
})
.
then
((
res
)
=>
{
if
(
res
.
returnCode
==
"
0000
"
)
{
this
.
$message
.
success
(
"
编辑成功
"
);
}
else
{
this
.
$message
.
error
(
res
.
returnMsg
);
}
});
}
},
//删除
delRecord
(
index
)
{
this
.
$modal
.
confirm
({
title
:
"
删除
"
,
content
:
"
确定删除该条记录?
"
,
okText
:
"
确定
"
,
cancelText
:
"
取消
"
,
onOk
:
()
=>
{
this
.
$apis
.
PAYORDISCOUNTDELETE
({
id
:
this
.
tableList
[
index
].
id
,
})
.
then
((
res
)
=>
{
if
(
res
.
returnCode
==
"
0000
"
)
{
this
.
$message
.
success
(
"
删除成功
"
);
this
.
dataList
.
splice
(
index
,
1
);
}
else
{
this
.
$message
.
error
(
res
.
returnMsg
);
}
});
},
});
},
},
};
</
script
>
<
style
lang=
"less"
scoped
>
.discount-container {
margin-top: 16px;
}
.title-div {
line-height: 52px;
color: #252631;
font-weight: bold;
}
</
style
>
This diff is collapsed.
Click to expand it.
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