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
f953aba9
Commit
f953aba9
authored
3 years ago
by
yanglilong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'修改跳转'
parent
1c14d620
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
101 deletions
+31
-101
index.vue
src/views/customer/info/index.vue
+10
-83
companyDiscount.vue
src/views/info/components/companyDiscount.vue
+21
-18
No files found.
src/views/customer/info/index.vue
View file @
f953aba9
...
...
@@ -64,9 +64,8 @@
:data-source=
"dataList"
row-key=
"mrnNo"
:scroll=
"
{ x: true }"
:pagination="
pagination
"
:pagination="
false
"
:customRow="handlerRowClick"
@change="onChange"
>
<template
slot=
"operation"
slot-scope=
"record"
>
<a-button
...
...
@@ -89,10 +88,13 @@
</a-popconfirm>
</
template
>
</a-table>
<!--分页-->
<BurtPagination
:pagination=
"pager"
@
pageChange=
"_getCustomerList"
/>
</div>
</template>
<
script
>
import
BurtPagination
from
"
@/components/CUSTOMER/pagation
"
;
export
default
{
data
()
{
const
columns
=
[
...
...
@@ -141,59 +143,17 @@ export default {
pager
:
{
pageNum
:
1
,
pageSize
:
10
,
},
total
:
0
,
total
:
0
}
};
},
components
:
{
BurtPagination
},
created
()
{
this
.
_getCustomerList
();
this
.
_getPayorCode
();
},
computed
:
{
pagination
()
{
const
{
pageNum
,
pageSize
}
=
this
.
pager
;
const
pages
=
Math
.
ceil
(
this
.
total
/
pageSize
);
return
{
current
:
pageNum
,
pageSize
,
size
:
"
large
"
,
position
:
"
bottom
"
,
align
:
"
right
"
,
total
:
this
.
total
,
hideOnSinglePage
:
false
,
itemRender
:
(
current
,
type
,
originalElement
)
=>
{
if
(
type
===
"
prev
"
)
{
originalElement
.
children
=
undefined
;
originalElement
.
text
=
"
上一页
"
;
}
if
(
type
===
"
page
"
)
{
if
(
current
!==
pageNum
)
{
return
undefined
;
}
return
(
<
p
>
<
span
class
=
"
current-page
"
>
{
current
}
<
/span> /
{
pages
}
<
/p
>
);
}
if
(
type
===
"
next
"
)
{
originalElement
.
children
=
undefined
;
originalElement
.
text
=
"
下一页
"
;
return
(
<
div
>
{
originalElement
}
<
a
-
input
-
number
onblur
=
{
this
.
onShowSizeChange
}
class
=
"
size-change
"
><
/a-input-number
>
<
/div
>
);
}
return
originalElement
;
},
};
},
},
methods
:
{
handlerRowClick
(
record
)
{
const
{
id
,
patientPolicyId
}
=
record
;
...
...
@@ -222,40 +182,7 @@ export default {
record
.
isEdit
=
undefined
;
record
.
isNew
=
undefined
;
},
// customDeal(columns) {
// return columns.map((item) => {
// return {
// ...item,
// ellipsis: true,
// customRender: (text, record, index) => {
// const data = item.customRender
// ? item.customRender(text, record, index)
// : text;
// if (record.isEdit) {
// return "";
// }
// return data;
// },
// };
// });
// },
onChange
(
pager
)
{
const
{
current
}
=
pager
;
// console.log(pager);
this
.
pager
.
pageNum
=
current
;
this
.
_getCustomerList
();
},
onShowSizeChange
(
e
)
{
e
&&
e
.
stopPropagation
();
const
val
=
e
.
target
.
value
*
1
;
if
(
!
val
||
val
<
0
)
{
return
false
;
}
this
.
pager
.
pageSize
=
val
;
this
.
_getCustomerList
();
},
handlerSearch
()
{
console
.
log
(
this
.
$refs
.
form
.
validate
);
this
.
$refs
.
form
.
validate
((
valid
)
=>
{
if
(
!
valid
)
{
return
false
;
...
...
@@ -284,7 +211,7 @@ export default {
};
this
.
$apis
.
GETCUSTOMERLIST
(
data
).
then
((
res
)
=>
{
this
.
dataList
=
(
res
.
content
&&
res
.
content
.
list
)
||
[];
this
.
total
=
(
res
.
content
&&
res
.
content
.
total
)
||
0
;
this
.
pager
.
total
=
(
res
.
content
&&
res
.
content
.
total
)
||
0
;
});
},
},
...
...
This diff is collapsed.
Click to expand it.
src/views/info/components/companyDiscount.vue
View file @
f953aba9
...
...
@@ -29,7 +29,7 @@
>
<a-select
v-if=
"record.edit"
v-model=
"record.benefits"
v-model=
"record.benefits
2
"
placeholder=
"请选择"
mode=
"multiple"
>
...
...
@@ -40,7 +40,7 @@
>
{{
item
.
description
}}
</a-select-option
>
</a-select>
<span
v-else
>
{{
filterType
(
record
.
benefits
)
}}
</span>
<span
v-else
>
{{
filterType
(
record
.
benefits
2
)
}}
</span>
</
template
>
<
template
v-else
>
<a-input
...
...
@@ -111,14 +111,13 @@ export default {
components
:
{
BurtPagination
,
},
created
()
{
async
created
()
{
await
this
.
getBenefitType
();
this
.
getData
();
this
.
getBenefitType
();
},
methods
:
{
//过滤器
filterType
(
val
)
{
let
txt
=
(
val
||
[]).
map
((
item
)
=>
{
return
this
.
benefitTypeObj
[
item
]
||
""
;
});
...
...
@@ -126,15 +125,19 @@ export default {
},
//获取福利类型列表
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
);
}
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
$apis
.
GETBENEGITTYPE
().
then
((
res
)
=>
{
if
(
res
.
returnCode
==
"
0000
"
)
{
this
.
benefitType
=
res
.
content
||
[];
(
res
.
content
||
[]).
forEach
((
item
)
=>
{
this
.
benefitTypeObj
[
item
.
benefitCode
]
=
item
.
description
;
});
resolve
();
}
else
{
this
.
$message
.
error
(
res
.
returnMsg
);
reject
();
}
});
});
},
//获取列表
...
...
@@ -164,7 +167,7 @@ export default {
return
{
...
item
,
edit
:
false
,
benefits
:
(
item
.
benefits
||
""
).
split
(
"
,
"
)
,
benefits
2
:
item
.
benefits
?
item
.
benefits
.
split
(
"
,
"
)
:
[]
,
};
});
},
...
...
@@ -184,10 +187,10 @@ export default {
id
:
record
.
id
,
ratio
:
record
.
ratio
,
remark
:
record
.
remark
,
discountBenefitList
:
(
record
.
benefits
||
[]).
map
((
item
)
=>
{
discountBenefitList
:
(
record
.
benefits
2
||
[]).
map
((
item
)
=>
{
return
{
benefitCode
:
item
,
discountId
:
record
.
id
discountId
:
record
.
id
,
};
}),
})
...
...
@@ -215,7 +218,7 @@ export default {
.
then
((
res
)
=>
{
if
(
res
.
returnCode
==
"
0000
"
)
{
this
.
$message
.
success
(
"
删除成功
"
);
this
.
data
List
.
splice
(
index
,
1
);
this
.
table
List
.
splice
(
index
,
1
);
}
else
{
this
.
$message
.
error
(
res
.
returnMsg
);
}
...
...
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