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
Jan 06, 2022
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 @@
...
@@ -64,9 +64,8 @@
:data-source=
"dataList"
:data-source=
"dataList"
row-key=
"mrnNo"
row-key=
"mrnNo"
:scroll=
"
{ x: true }"
:scroll=
"
{ x: true }"
:pagination="
pagination
"
:pagination="
false
"
:customRow="handlerRowClick"
:customRow="handlerRowClick"
@change="onChange"
>
>
<template
slot=
"operation"
slot-scope=
"record"
>
<template
slot=
"operation"
slot-scope=
"record"
>
<a-button
<a-button
...
@@ -89,10 +88,13 @@
...
@@ -89,10 +88,13 @@
</a-popconfirm>
</a-popconfirm>
</
template
>
</
template
>
</a-table>
</a-table>
<!--分页-->
<BurtPagination
:pagination=
"pager"
@
pageChange=
"_getCustomerList"
/>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
BurtPagination
from
"
@/components/CUSTOMER/pagation
"
;
export
default
{
export
default
{
data
()
{
data
()
{
const
columns
=
[
const
columns
=
[
...
@@ -141,59 +143,17 @@ export default {
...
@@ -141,59 +143,17 @@ export default {
pager
:
{
pager
:
{
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
10
,
pageSize
:
10
,
},
total
:
0
total
:
0
,
}
};
};
},
},
components
:
{
BurtPagination
},
created
()
{
created
()
{
this
.
_getCustomerList
();
this
.
_getCustomerList
();
this
.
_getPayorCode
();
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
:
{
methods
:
{
handlerRowClick
(
record
)
{
handlerRowClick
(
record
)
{
const
{
id
,
patientPolicyId
}
=
record
;
const
{
id
,
patientPolicyId
}
=
record
;
...
@@ -222,40 +182,7 @@ export default {
...
@@ -222,40 +182,7 @@ export default {
record
.
isEdit
=
undefined
;
record
.
isEdit
=
undefined
;
record
.
isNew
=
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
()
{
handlerSearch
()
{
console
.
log
(
this
.
$refs
.
form
.
validate
);
this
.
$refs
.
form
.
validate
((
valid
)
=>
{
this
.
$refs
.
form
.
validate
((
valid
)
=>
{
if
(
!
valid
)
{
if
(
!
valid
)
{
return
false
;
return
false
;
...
@@ -284,7 +211,7 @@ export default {
...
@@ -284,7 +211,7 @@ export default {
};
};
this
.
$apis
.
GETCUSTOMERLIST
(
data
).
then
((
res
)
=>
{
this
.
$apis
.
GETCUSTOMERLIST
(
data
).
then
((
res
)
=>
{
this
.
dataList
=
(
res
.
content
&&
res
.
content
.
list
)
||
[];
this
.
dataList
=
(
res
.
content
&&
res
.
content
.
list
)
||
[];
this
.
total
=
(
res
.
content
&&
res
.
content
.
total
)
||
0
;
this
.
pager
.
total
=
(
res
.
content
&&
res
.
content
.
total
)
||
0
;
});
});
},
},
},
},
...
...
src/views/info/components/companyDiscount.vue
View file @
f953aba9
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
>
>
<a-select
<a-select
v-if=
"record.edit"
v-if=
"record.edit"
v-model=
"record.benefits"
v-model=
"record.benefits
2
"
placeholder=
"请选择"
placeholder=
"请选择"
mode=
"multiple"
mode=
"multiple"
>
>
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
>
{{
item
.
description
}}
</a-select-option
>
{{
item
.
description
}}
</a-select-option
>
>
</a-select>
</a-select>
<span
v-else
>
{{
filterType
(
record
.
benefits
)
}}
</span>
<span
v-else
>
{{
filterType
(
record
.
benefits
2
)
}}
</span>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<a-input
<a-input
...
@@ -111,14 +111,13 @@ export default {
...
@@ -111,14 +111,13 @@ export default {
components
:
{
components
:
{
BurtPagination
,
BurtPagination
,
},
},
created
()
{
async
created
()
{
await
this
.
getBenefitType
();
this
.
getData
();
this
.
getData
();
this
.
getBenefitType
();
},
},
methods
:
{
methods
:
{
//过滤器
//过滤器
filterType
(
val
)
{
filterType
(
val
)
{
let
txt
=
(
val
||
[]).
map
((
item
)
=>
{
let
txt
=
(
val
||
[]).
map
((
item
)
=>
{
return
this
.
benefitTypeObj
[
item
]
||
""
;
return
this
.
benefitTypeObj
[
item
]
||
""
;
});
});
...
@@ -126,15 +125,19 @@ export default {
...
@@ -126,15 +125,19 @@ export default {
},
},
//获取福利类型列表
//获取福利类型列表
getBenefitType
()
{
getBenefitType
()
{
this
.
$apis
.
GETBENEGITTYPE
().
then
((
res
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
if
(
res
.
returnCode
==
"
0000
"
)
{
this
.
$apis
.
GETBENEGITTYPE
().
then
((
res
)
=>
{
this
.
benefitType
=
res
.
content
||
[];
if
(
res
.
returnCode
==
"
0000
"
)
{
(
res
.
content
||
[]).
forEach
((
item
)
=>
{
this
.
benefitType
=
res
.
content
||
[];
this
.
benefitTypeObj
[
item
.
benefitCode
]
=
item
.
description
;
(
res
.
content
||
[]).
forEach
((
item
)
=>
{
});
this
.
benefitTypeObj
[
item
.
benefitCode
]
=
item
.
description
;
}
else
{
});
this
.
$message
.
error
(
res
.
returnMsg
);
resolve
();
}
}
else
{
this
.
$message
.
error
(
res
.
returnMsg
);
reject
();
}
});
});
});
},
},
//获取列表
//获取列表
...
@@ -164,7 +167,7 @@ export default {
...
@@ -164,7 +167,7 @@ export default {
return
{
return
{
...
item
,
...
item
,
edit
:
false
,
edit
:
false
,
benefits
:
(
item
.
benefits
||
""
).
split
(
"
,
"
)
,
benefits
2
:
item
.
benefits
?
item
.
benefits
.
split
(
"
,
"
)
:
[]
,
};
};
});
});
},
},
...
@@ -184,10 +187,10 @@ export default {
...
@@ -184,10 +187,10 @@ export default {
id
:
record
.
id
,
id
:
record
.
id
,
ratio
:
record
.
ratio
,
ratio
:
record
.
ratio
,
remark
:
record
.
remark
,
remark
:
record
.
remark
,
discountBenefitList
:
(
record
.
benefits
||
[]).
map
((
item
)
=>
{
discountBenefitList
:
(
record
.
benefits
2
||
[]).
map
((
item
)
=>
{
return
{
return
{
benefitCode
:
item
,
benefitCode
:
item
,
discountId
:
record
.
id
discountId
:
record
.
id
,
};
};
}),
}),
})
})
...
@@ -215,7 +218,7 @@ export default {
...
@@ -215,7 +218,7 @@ export default {
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
returnCode
==
"
0000
"
)
{
if
(
res
.
returnCode
==
"
0000
"
)
{
this
.
$message
.
success
(
"
删除成功
"
);
this
.
$message
.
success
(
"
删除成功
"
);
this
.
data
List
.
splice
(
index
,
1
);
this
.
table
List
.
splice
(
index
,
1
);
}
else
{
}
else
{
this
.
$message
.
error
(
res
.
returnMsg
);
this
.
$message
.
error
(
res
.
returnMsg
);
}
}
...
...
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