|
|
|
@ -8,8 +8,7 @@ |
|
|
|
<span class="contenttitleBold">会员卡管理</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div |
|
|
|
style=" |
|
|
|
<div style=" |
|
|
|
background-color: #fff; |
|
|
|
padding: 15px; |
|
|
|
border-radius: 8px; |
|
|
|
@ -18,47 +17,20 @@ |
|
|
|
margin-bottom: 10px; |
|
|
|
height: 80px; |
|
|
|
margin-top: 7px; |
|
|
|
" |
|
|
|
> |
|
|
|
"> |
|
|
|
<div class="query"> |
|
|
|
<el-select |
|
|
|
v-model="query.dateType" |
|
|
|
placeholder="请选择" |
|
|
|
filterable |
|
|
|
size="small" |
|
|
|
style="width: 90px" |
|
|
|
> |
|
|
|
<el-select v-model="query.dateType" placeholder="请选择" filterable size="small" style="width: 90px"> |
|
|
|
<el-option label="登记日期" value="createDate" /> |
|
|
|
<el-option label="有效日期" value="expiryDate" /> |
|
|
|
</el-select> |
|
|
|
<el-date-picker |
|
|
|
v-model="query.startDate" |
|
|
|
type="date" |
|
|
|
placeholder="起始日期" |
|
|
|
size="small" |
|
|
|
/> |
|
|
|
<el-date-picker v-model="query.startDate" type="date" placeholder="起始日期" size="small" /> |
|
|
|
<span>--</span> |
|
|
|
<el-date-picker |
|
|
|
v-model="query.endDate" |
|
|
|
type="date" |
|
|
|
placeholder="截止日期" |
|
|
|
size="small" |
|
|
|
/> |
|
|
|
<el-date-picker v-model="query.endDate" type="date" placeholder="截止日期" size="small" /> |
|
|
|
</div> |
|
|
|
<div class="query"> |
|
|
|
<span>卡类别:</span> |
|
|
|
<el-select |
|
|
|
v-model="query.cardTypeId" |
|
|
|
placeholder="请选择" |
|
|
|
clearable |
|
|
|
size="small" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in dict.cardType" |
|
|
|
:key="item.id" |
|
|
|
:label="item.displayName" |
|
|
|
:value="item.id" |
|
|
|
/> |
|
|
|
<el-select v-model="query.cardTypeId" placeholder="请选择" clearable size="small"> |
|
|
|
<el-option v-for="item in dict.cardType" :key="item.id" :label="item.displayName" :value="item.id" /> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
<div class="query"> |
|
|
|
@ -69,82 +41,43 @@ |
|
|
|
<el-radio :label="0">停用</el-radio> |
|
|
|
</el-radio-group> |
|
|
|
--> |
|
|
|
<el-select |
|
|
|
v-model="query.isActive" |
|
|
|
placeholder="请选择" |
|
|
|
clearable |
|
|
|
size="small" |
|
|
|
> |
|
|
|
<el-select v-model="query.isActive" placeholder="请选择" clearable size="small"> |
|
|
|
<el-option label="启用" value="Y" /> |
|
|
|
<el-option label="停用" value="N" /> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
<div class="query"> |
|
|
|
<span>卡号:</span> |
|
|
|
<el-input |
|
|
|
placeholder="卡号" |
|
|
|
v-model="query.cardNo" |
|
|
|
size="small" |
|
|
|
clearable |
|
|
|
style="width: 190px" |
|
|
|
/> |
|
|
|
<el-input placeholder="卡号" v-model="query.cardNo" size="small" clearable style="width: 190px" /> |
|
|
|
</div> |
|
|
|
<div class="query"> |
|
|
|
<span>卡主姓名:</span> |
|
|
|
<el-input |
|
|
|
placeholder="卡主姓名" |
|
|
|
v-model="query.customerName" |
|
|
|
size="small" |
|
|
|
clearable |
|
|
|
style="width: 190px" |
|
|
|
/> |
|
|
|
<el-input placeholder="卡主姓名" v-model="query.customerName" size="small" clearable style="width: 190px" /> |
|
|
|
</div> |
|
|
|
<div class="query"> |
|
|
|
<span>身份证号:</span> |
|
|
|
<el-input |
|
|
|
placeholder="身份证号" |
|
|
|
v-model="query.idNo" |
|
|
|
size="small" |
|
|
|
clearable |
|
|
|
style="width: 190px" |
|
|
|
/> |
|
|
|
<el-input placeholder="身份证号" v-model="query.idNo" size="small" clearable style="width: 190px" /> |
|
|
|
</div> |
|
|
|
<div class="query"> |
|
|
|
<span>电话:</span> |
|
|
|
<el-input |
|
|
|
placeholder="手机号/电话" |
|
|
|
v-model="query.mobileTelephone" |
|
|
|
size="small" |
|
|
|
clearable |
|
|
|
style="width: 190px" |
|
|
|
/> |
|
|
|
<el-input placeholder="手机号/电话" v-model="query.mobileTelephone" size="small" clearable |
|
|
|
style="width: 190px" /> |
|
|
|
</div> |
|
|
|
<div class="query"> |
|
|
|
<el-button class="commonbutton" @click="btnQuery">查询</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div |
|
|
|
style=" |
|
|
|
<div style=" |
|
|
|
background-color: #fff; |
|
|
|
padding: 15px; |
|
|
|
border-radius: 8px; |
|
|
|
margin-bottom: 10px; |
|
|
|
" |
|
|
|
> |
|
|
|
<el-table |
|
|
|
:data="dataList" |
|
|
|
width="100%" |
|
|
|
:height=" |
|
|
|
window.pageHeight < 600 |
|
|
|
? 210 |
|
|
|
: Math.floor((window.pageHeight - 280) / 2) |
|
|
|
" |
|
|
|
row-key="id" |
|
|
|
highlight-current-row |
|
|
|
ref="dataList" |
|
|
|
@selection-change="handleSelectionChange" |
|
|
|
@row-click="rowClick" |
|
|
|
> |
|
|
|
"> |
|
|
|
<el-table :data="dataList" ref="info" id="info" width="100%" :height="window.pageHeight < 600 |
|
|
|
? 210 |
|
|
|
: Math.floor((window.pageHeight - 340) / 2) |
|
|
|
" row-key="id" highlight-current-row @selection-change="handleSelectionChange" |
|
|
|
@row-click="rowClick"> |
|
|
|
<el-table-column prop="cardTypeId" label="卡类别" width="70"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div> |
|
|
|
@ -172,11 +105,7 @@ |
|
|
|
<el-table-column prop="customerName" label="卡主姓名" width="80" /> |
|
|
|
<el-table-column prop="idNo" label="卡主身份证号" width="200" /> |
|
|
|
<el-table-column prop="telephone" label="卡主电话" width="150" /> |
|
|
|
<el-table-column |
|
|
|
prop="mobileTelephone" |
|
|
|
label="卡主手机号" |
|
|
|
width="150" |
|
|
|
/> |
|
|
|
<el-table-column prop="mobileTelephone" label="卡主手机号" width="150" /> |
|
|
|
<el-table-column prop="isActive" label="启用" width="80"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div>{{ scope.row.isActive == "N" ? "否" : "是" }}</div> |
|
|
|
@ -191,16 +120,8 @@ |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="lastModifierName" |
|
|
|
label="修改人员" |
|
|
|
width="100" |
|
|
|
/> |
|
|
|
<el-table-column |
|
|
|
prop="lastModificationTime" |
|
|
|
label="修改日期" |
|
|
|
width="150" |
|
|
|
> |
|
|
|
<el-table-column prop="lastModifierName" label="修改人员" width="100" /> |
|
|
|
<el-table-column prop="lastModificationTime" label="修改日期" width="150"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div v-if="scope.row.lastModificationTime"> |
|
|
|
{{ |
|
|
|
@ -210,21 +131,21 @@ |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<div style="display: flex; justify-content: space-between"> |
|
|
|
<div></div> |
|
|
|
<div> |
|
|
|
<span style="font-size: 12px">共:{{ loadOpts.totalCount }} 条记录,当前显示:{{ |
|
|
|
dataList.length |
|
|
|
}} |
|
|
|
条。</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div style="background-color: #fff; padding: 15px; border-radius: 8px"> |
|
|
|
<el-table |
|
|
|
:data="cardBillList" |
|
|
|
width="100%" |
|
|
|
:height=" |
|
|
|
window.pageHeight < 600 |
|
|
|
? 210 |
|
|
|
: Math.floor((window.pageHeight - 300) / 2) |
|
|
|
" |
|
|
|
row-key="id" |
|
|
|
highlight-current-row |
|
|
|
ref="dataList" |
|
|
|
@selection-change="handleSelectionChange" |
|
|
|
> |
|
|
|
<el-table :data="cardBillList" width="100%" :height="window.pageHeight < 600 |
|
|
|
? 210 |
|
|
|
: Math.floor((window.pageHeight - 300) / 2) |
|
|
|
" row-key="id" highlight-current-row ref="dataList" @selection-change="handleSelectionChange"> |
|
|
|
<el-table-column prop="payModeId" label="支付方式"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div> |
|
|
|
@ -253,11 +174,7 @@ |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="lastModifierName" label="修改人员" /> |
|
|
|
<el-table-column |
|
|
|
prop="lastModificationTime" |
|
|
|
label="修改日期" |
|
|
|
width="150" |
|
|
|
> |
|
|
|
<el-table-column prop="lastModificationTime" label="修改日期" width="150"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div v-if="scope.row.lastModificationTime"> |
|
|
|
{{ |
|
|
|
@ -269,15 +186,13 @@ |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div |
|
|
|
style=" |
|
|
|
<div style=" |
|
|
|
margin-left: 10px; |
|
|
|
margin-top: 3%; |
|
|
|
position: absolute; |
|
|
|
top: 0; |
|
|
|
right: 0; |
|
|
|
" |
|
|
|
> |
|
|
|
"> |
|
|
|
<div> |
|
|
|
<el-button class="commonbutton" @click="add">新增</el-button> |
|
|
|
</div> |
|
|
|
@ -301,34 +216,13 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-dialog |
|
|
|
:title="form.id ? '编辑' : '新增'" |
|
|
|
:visible.sync="dialogVisible" |
|
|
|
width="820px" |
|
|
|
:close-on-click-modal="false" |
|
|
|
> |
|
|
|
<el-form |
|
|
|
ref="form" |
|
|
|
:model="form" |
|
|
|
label-width="100px" |
|
|
|
:rules="rules" |
|
|
|
size="small" |
|
|
|
> |
|
|
|
<el-dialog :title="form.id ? '编辑' : '新增'" :visible.sync="dialogVisible" width="820px" :close-on-click-modal="false"> |
|
|
|
<el-form ref="form" :model="form" label-width="100px" :rules="rules" size="small"> |
|
|
|
<el-row> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="卡类别" prop="cardTypeId"> |
|
|
|
<el-select |
|
|
|
v-model="form.cardTypeId" |
|
|
|
placeholder="请选择" |
|
|
|
filterable |
|
|
|
@change="category" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in dict.cardType" |
|
|
|
:key="item.id" |
|
|
|
:label="item.displayName" |
|
|
|
:value="item.id" |
|
|
|
/> |
|
|
|
<el-select v-model="form.cardTypeId" placeholder="请选择" filterable @change="category" :disabled="form.id ? true:false"> |
|
|
|
<el-option v-for="item in dict.cardType" :key="item.id" :label="item.displayName" :value="item.id" /> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
@ -346,13 +240,8 @@ |
|
|
|
<el-row> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="有效期限" prop="expiryDate"> |
|
|
|
<el-date-picker |
|
|
|
v-model="form.expiryDate" |
|
|
|
type="date" |
|
|
|
placeholder="有效期限" |
|
|
|
size="small" |
|
|
|
:style="'width: ' + Math.floor((820 - 340) / 3) + 'px'" |
|
|
|
/> |
|
|
|
<el-date-picker v-model="form.expiryDate" type="date" placeholder="有效期限" size="small" |
|
|
|
:style="'width: ' + Math.floor((820 - 340) / 3) + 'px'" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
@ -387,18 +276,8 @@ |
|
|
|
<el-row> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="体检中心" prop="medicalCenterId"> |
|
|
|
<el-select |
|
|
|
v-model="form.medicalCenterId" |
|
|
|
placeholder="请选择" |
|
|
|
filterable |
|
|
|
:disabled="peisid ? true : false" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in dict.organization" |
|
|
|
:key="item.id" |
|
|
|
:label="item.displayName" |
|
|
|
:value="item.id" |
|
|
|
> |
|
|
|
<el-select v-model="form.medicalCenterId" placeholder="请选择" filterable :disabled="peisid ? true : false"> |
|
|
|
<el-option v-for="item in dict.organization" :key="item.id" :label="item.displayName" :value="item.id"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
@ -418,14 +297,10 @@ |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item label="创建时间" label-width="80px"> |
|
|
|
<el-input |
|
|
|
:value=" |
|
|
|
form.creationTime |
|
|
|
? moment(form.creationTime).format('yyyy-MM-DD') |
|
|
|
: '' |
|
|
|
" |
|
|
|
disabled |
|
|
|
></el-input> |
|
|
|
<el-input :value="form.creationTime |
|
|
|
? moment(form.creationTime).format('yyyy-MM-DD') |
|
|
|
: '' |
|
|
|
" disabled></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
@ -435,40 +310,21 @@ |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item label="修改时间" label-width="80px"> |
|
|
|
<el-input |
|
|
|
:value=" |
|
|
|
form.lastModificationTime |
|
|
|
? moment(form.lastModificationTime).format('yyyy-MM-DD') |
|
|
|
: '' |
|
|
|
" |
|
|
|
disabled |
|
|
|
></el-input> |
|
|
|
<el-input :value="form.lastModificationTime |
|
|
|
? moment(form.lastModificationTime).format('yyyy-MM-DD') |
|
|
|
: '' |
|
|
|
" disabled></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
<el-button @click="dialogVisible = false" class="difference" |
|
|
|
>取消</el-button |
|
|
|
> |
|
|
|
<el-button type="primary" @click="onSubmit('form')" class="commonbutton" |
|
|
|
>确定</el-button |
|
|
|
> |
|
|
|
<el-button @click="dialogVisible = false" class="difference">取消</el-button> |
|
|
|
<el-button type="primary" @click="onSubmit('form')" class="commonbutton">确定</el-button> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
<el-dialog |
|
|
|
title="会员卡充值" |
|
|
|
:visible.sync="dialogOrder" |
|
|
|
width="400px" |
|
|
|
:close-on-click-modal="false" |
|
|
|
> |
|
|
|
<el-form |
|
|
|
ref="order" |
|
|
|
:model="order" |
|
|
|
label-width="100px" |
|
|
|
:rules="orderRules" |
|
|
|
size="small" |
|
|
|
> |
|
|
|
<el-dialog title="会员卡充值" :visible.sync="dialogOrder" width="400px" :close-on-click-modal="false"> |
|
|
|
<el-form ref="order" :model="order" label-width="100px" :rules="orderRules" size="small"> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-form-item label="会员卡号" prop="cardRegisterId"> |
|
|
|
<el-input v-model="order.cardNo" disabled style="width: 200px" /> |
|
|
|
@ -476,106 +332,49 @@ |
|
|
|
</el-col> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-form-item label="充值方式" prop="payModeId"> |
|
|
|
<el-select |
|
|
|
v-model="order.payModeId" |
|
|
|
placeholder="请选择" |
|
|
|
filterable |
|
|
|
:disabled="order.id ? true : false" |
|
|
|
style="width: 200px" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in dict.payMode" |
|
|
|
:key="item.id" |
|
|
|
:label="item.displayName" |
|
|
|
:value="item.id" |
|
|
|
/> |
|
|
|
<el-select v-model="order.payModeId" placeholder="请选择" filterable :disabled="order.id ? true : false" |
|
|
|
style="width: 200px"> |
|
|
|
<el-option v-for="item in dict.payMode" :key="item.id" :label="item.displayName" :value="item.id" /> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-form-item label="充值金额" prop="billMoney"> |
|
|
|
<el-input |
|
|
|
type="number" |
|
|
|
v-model="order.billMoney" |
|
|
|
:disabled="order.id ? true : false" |
|
|
|
style="width: 200px" |
|
|
|
/> |
|
|
|
<el-input type="number" v-model="order.billMoney" :disabled="order.id ? true : false" |
|
|
|
style="width: 200px" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-form> |
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
<el-button @click="dialogOrder = false" class="difference" |
|
|
|
>取消</el-button |
|
|
|
> |
|
|
|
<el-button |
|
|
|
type="primary" |
|
|
|
@click="orderSubmit('order')" |
|
|
|
class="commonbutton" |
|
|
|
>确定</el-button |
|
|
|
> |
|
|
|
<el-button @click="dialogOrder = false" class="difference">取消</el-button> |
|
|
|
<el-button type="primary" @click="orderSubmit('order')" class="commonbutton">确定</el-button> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
<el-dialog |
|
|
|
title="会员卡退费" |
|
|
|
:visible.sync="refundOrder" |
|
|
|
width="400px" |
|
|
|
:close-on-click-modal="false" |
|
|
|
> |
|
|
|
<el-form |
|
|
|
ref="refundorder" |
|
|
|
:model="refundorder" |
|
|
|
label-width="100px" |
|
|
|
:rules="refundRules" |
|
|
|
size="small" |
|
|
|
> |
|
|
|
<el-dialog title="会员卡退费" :visible.sync="refundOrder" width="400px" :close-on-click-modal="false"> |
|
|
|
<el-form ref="refundorder" :model="refundorder" label-width="100px" :rules="refundRules" size="small"> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-form-item label="会员卡号" prop="cardRegisterId"> |
|
|
|
<el-input |
|
|
|
v-model="refundorder.cardNo" |
|
|
|
disabled |
|
|
|
style="width: 200px" |
|
|
|
/> |
|
|
|
<el-input v-model="refundorder.cardNo" disabled style="width: 200px" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-form-item label="退费方式" prop="payModeId"> |
|
|
|
<el-select |
|
|
|
v-model="refundorder.payModeId" |
|
|
|
placeholder="请选择" |
|
|
|
filterable |
|
|
|
:disabled="refundorder.id ? true : false" |
|
|
|
style="width: 200px" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in dict.payMode" |
|
|
|
:key="item.id" |
|
|
|
:label="item.displayName" |
|
|
|
:value="item.id" |
|
|
|
/> |
|
|
|
<el-select v-model="refundorder.payModeId" placeholder="请选择" filterable |
|
|
|
:disabled="refundorder.id ? true : false" style="width: 200px"> |
|
|
|
<el-option v-for="item in dict.payMode" :key="item.id" :label="item.displayName" :value="item.id" /> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-form-item label="退费金额" prop="billMoney"> |
|
|
|
<el-input |
|
|
|
type="number" |
|
|
|
v-model="refundorder.billMoney" |
|
|
|
:disabled="refundorder.id ? true : false" |
|
|
|
style="width: 200px" |
|
|
|
/> |
|
|
|
<el-input type="number" v-model="refundorder.billMoney" :disabled="refundorder.id ? true : false" |
|
|
|
style="width: 200px" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-form> |
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
<el-button @click="refundOrder = false" class="difference" |
|
|
|
>取消</el-button |
|
|
|
> |
|
|
|
<el-button |
|
|
|
type="primary" |
|
|
|
@click="orderSubmit('refundorder')" |
|
|
|
class="commonbutton" |
|
|
|
>确定</el-button |
|
|
|
> |
|
|
|
<el-button @click="refundOrder = false" class="difference">取消</el-button> |
|
|
|
<el-button type="primary" @click="orderSubmit('refundorder')" class="commonbutton">确定</el-button> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
@ -609,6 +408,14 @@ export default { |
|
|
|
mobileTelephone: "", |
|
|
|
}, //查询条件 |
|
|
|
|
|
|
|
loadOpts: { |
|
|
|
totalCount: 0, |
|
|
|
skipCount: 0, |
|
|
|
maxResultCount: 1000, |
|
|
|
}, |
|
|
|
loadOptsInit: {}, |
|
|
|
lazyLoading: false, //是否懒加载中 |
|
|
|
|
|
|
|
dataList: [], //列表数据 |
|
|
|
cardBillList: [], //卡记账数据 |
|
|
|
multipleSelection: [], //选中的数据列表 |
|
|
|
@ -623,7 +430,7 @@ export default { |
|
|
|
idNo: "", |
|
|
|
telephone: "", |
|
|
|
mobileTelephone: "", |
|
|
|
isActive: "N", |
|
|
|
isActive: "Y", |
|
|
|
remark: "", |
|
|
|
medicalCenterId: null, |
|
|
|
}, |
|
|
|
@ -711,12 +518,17 @@ export default { |
|
|
|
this.query.startDate = new Date(); |
|
|
|
this.query.endDate = this.query.startDate; |
|
|
|
this.formInit = deepCopy(this.form); |
|
|
|
|
|
|
|
this.loadOptsInit = Object.assign({}, this.loadOpts); |
|
|
|
}, |
|
|
|
|
|
|
|
//挂载完成 |
|
|
|
mounted() { |
|
|
|
this.dictInit(); |
|
|
|
this.btnQuery(); |
|
|
|
// this.btnQuery(); |
|
|
|
this.$nextTick(() => { |
|
|
|
this.scrollFull() |
|
|
|
}) |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
...mapState(["window", "dict"]), |
|
|
|
@ -795,10 +607,19 @@ export default { |
|
|
|
this.$message.warning("请先选择要操作的数据!"); |
|
|
|
return; |
|
|
|
} |
|
|
|
this.form={...this.curChoosedRow} |
|
|
|
// objCopy(this.curChoosedRow, this.form); |
|
|
|
this.dialogVisible = true; |
|
|
|
|
|
|
|
getapi(`/api/app/cardregister/get?id=${this.curChoosedRow.id}`) |
|
|
|
.then(res => { |
|
|
|
if (res.code > -1) { |
|
|
|
this.form = res.data |
|
|
|
this.dialogVisible = true; |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
// this.form = { ...this.curChoosedRow } |
|
|
|
// this.dialogVisible = true; |
|
|
|
}, |
|
|
|
|
|
|
|
enable() { |
|
|
|
if (!this.curChoosedId) { |
|
|
|
this.$message.warning("请先选择要操作的数据!"); |
|
|
|
@ -990,8 +811,7 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
//查询 |
|
|
|
btnQuery(queryType) { |
|
|
|
getQueryBody(queryType) { |
|
|
|
let body = {}; |
|
|
|
|
|
|
|
switch (queryType) { |
|
|
|
@ -1015,6 +835,7 @@ export default { |
|
|
|
this.$message.error("数据不合法,起始日期不能大于截止日期!"); |
|
|
|
return; |
|
|
|
} |
|
|
|
body.dateType = this.query.dateType == 'expiryDate' ? '2' : '1' |
|
|
|
body.startDate = moment(this.query.startDate).format("yyyy-MM-DD"); |
|
|
|
body.endDate = moment(this.query.endDate).format("yyyy-MM-DD"); |
|
|
|
|
|
|
|
@ -1028,23 +849,67 @@ export default { |
|
|
|
} |
|
|
|
break; |
|
|
|
} |
|
|
|
// { |
|
|
|
// "cardModeId": "string", |
|
|
|
// "cardTypeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", |
|
|
|
// "cardNo": "string", |
|
|
|
// "customerName": "string", |
|
|
|
// "idNo": "string", |
|
|
|
// "isActive": "string", |
|
|
|
// "startDate": "string", |
|
|
|
// "endDate": "string" |
|
|
|
// } |
|
|
|
return body |
|
|
|
}, |
|
|
|
|
|
|
|
//查询 |
|
|
|
btnQuery() { |
|
|
|
let body = this.getQueryBody() |
|
|
|
|
|
|
|
body.maxResultCount = this.loadOptsInit?.maxResultCount || 0 |
|
|
|
body.skipCount = this.loadOptsInit?.skipCount || 0 |
|
|
|
|
|
|
|
this.loadOptsInit = Object.assign({}, this.loadOpts); |
|
|
|
postapi("/api/app/cardregister/getcardregisterlist", body).then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
this.dataList = res.data; |
|
|
|
this.dataList = res.data.items; |
|
|
|
this.loadOpts.totalCount = res.data.totalCount |
|
|
|
this.loadOpts.skipCount = 1 |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
//滚动加载数据 |
|
|
|
//滚动加载数据 |
|
|
|
scrollFull() { |
|
|
|
this.dom = this.$refs['info'].bodyWrapper |
|
|
|
console.log('this.dom', this.dom) |
|
|
|
|
|
|
|
this.dom.addEventListener('scroll', async () => { |
|
|
|
// console.log('scrollTop',this.dom.scrollTop,'clientHeight',this.dom.clientHeight,'scrollHeight',this.dom.scrollHeight); |
|
|
|
if (this.dom.scrollTop + this.dom.clientHeight + 20 > this.dom.scrollHeight && !this.lazyLoading) { |
|
|
|
// 获取到的不是全部数据 当滚动到底部 |
|
|
|
console.log('scrollTop', this.dom.scrollTop, 'clientHeight', this.dom.clientHeight, 'scrollHeight', this.dom.scrollHeight); |
|
|
|
if (Number(this.loadOpts.skipCount) * Number(this.loadOpts.maxResultCount) >= Number(this.loadOpts.totalCount)) { |
|
|
|
this.lazyLoading = false |
|
|
|
} else { |
|
|
|
this.lazyLoading = true |
|
|
|
this.loadQuery() |
|
|
|
// this.dom.scrollTop = this.dom.scrollTop - 100 |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
loadQuery() { |
|
|
|
let body = this.getQueryBody() |
|
|
|
if (Number(this.loadOpts.skipCount) * Number(this.loadOpts.maxResultCount||100) >= Number(this.loadOpts.totalCount)) { |
|
|
|
this.$message.warning({ showClose: true, message: '没有更多的数据可拉取' }) |
|
|
|
return |
|
|
|
} |
|
|
|
body.maxResultCount = this.loadOpts?.maxResultCount || 1000 |
|
|
|
body.skipCount = this.loadOpts.skipCount |
|
|
|
|
|
|
|
postapi("/api/app/cardregister/getcardregisterlist", body).then((res) => { |
|
|
|
if (res.code != -1) { |
|
|
|
this.dataList = this.dataList.concat(res.data.items); |
|
|
|
this.loadOpts.totalCount = res.data.totalCount |
|
|
|
this.loadOpts.skipCount++ |
|
|
|
this.lazyLoading = false |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
//监听事件 |
|
|
|
@ -1066,14 +931,17 @@ export default { |
|
|
|
@import "../../assets/css/global_form.css"; |
|
|
|
@import "../../assets/css/global_input.css"; |
|
|
|
@import "../../assets/css/global.css"; |
|
|
|
|
|
|
|
::v-deep .el-input__inner { |
|
|
|
/*text-align: center;*/ |
|
|
|
padding-left: 5px; |
|
|
|
padding-right: 25px; |
|
|
|
} |
|
|
|
|
|
|
|
::v-deep .el-icon-date:before { |
|
|
|
content: ""; |
|
|
|
} |
|
|
|
|
|
|
|
.query { |
|
|
|
margin-right: 15px; |
|
|
|
display: flex; |
|
|
|
@ -1084,30 +952,37 @@ export default { |
|
|
|
font-weight: 400; |
|
|
|
font-family: "NotoSansSC-Regular"; |
|
|
|
} |
|
|
|
|
|
|
|
.box { |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
} |
|
|
|
|
|
|
|
:deep .el-form-item { |
|
|
|
margin-bottom: 14px; |
|
|
|
} |
|
|
|
|
|
|
|
/* el-dialog的头部样式 */ |
|
|
|
:deep .el-dialog__header { |
|
|
|
padding: 11px 20px 11px; |
|
|
|
} |
|
|
|
|
|
|
|
/* el-dialog的主体样式 */ |
|
|
|
:deep .el-dialog__body { |
|
|
|
padding: 0px 20px 0px; |
|
|
|
} |
|
|
|
|
|
|
|
/* el-divider样式 */ |
|
|
|
:deep .el-divider--horizontal { |
|
|
|
margin: 0px 0 12px; |
|
|
|
} |
|
|
|
|
|
|
|
/* el-dialog的底部样式 */ |
|
|
|
:deep .el-dialog__footer { |
|
|
|
padding: 0px 20px 14px; |
|
|
|
} |
|
|
|
.query:last-child{ |
|
|
|
|
|
|
|
.query:last-child { |
|
|
|
margin-right: 0; |
|
|
|
} |
|
|
|
</style> |