mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-25 06:09:11 +08:00
优化 核销功能
This commit is contained in:
parent
90a94e6d42
commit
ea785de28b
@ -1,125 +1,180 @@
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox ">
|
||||
<div class="ibox-title">
|
||||
<h5><span>
|
||||
<vc:i18n name="查询条件"></vc:i18n>
|
||||
</span></h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
|
||||
<div class="col-md-3 padding-r-0">
|
||||
<div class=" border-radius bg-white padding-top-sm">
|
||||
<div class="row">
|
||||
<div class="col-md-8 margin-xs margin-bottom">
|
||||
<input type="text" :placeholder="vc.i18n('请扫码枪扫码核销','couponPropertyUserManage')"
|
||||
v-model="couponPropertyUserManageInfo.couponId" class="form-control "
|
||||
@keyup.enter="_confirmCouponPropertyUser()">
|
||||
</div>
|
||||
<div class="col-md-3 margin-xs margin-bottom">
|
||||
<button type="button" class="btn btn-primary btn-sm" v-on:click="_confirmCouponPropertyUser()">
|
||||
<vc:i18n name="核销"></vc:i18n>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('请填写优惠券名称','couponPropertyUserManage')"
|
||||
v-model="couponPropertyUserManageInfo.conditions.couponName" class=" form-control">
|
||||
<div class="margin-xs-r bg-white treeview attendance-staff">
|
||||
<div class="padding flex justify-between">
|
||||
<span class="font-1">核销结果</span>
|
||||
<span>{{couponPropertyUserManageInfo.order.remark}}</span>
|
||||
</div>
|
||||
<div class="padding flex justify-between">
|
||||
<span class="font-1">核销时间</span>
|
||||
<span>{{couponPropertyUserManageInfo.order.createTime}}</span>
|
||||
</div>
|
||||
<div class="padding flex justify-between">
|
||||
<span class="font-1">优惠券</span>
|
||||
<span>{{couponPropertyUserManageInfo.order.couponName}}</span>
|
||||
</div>
|
||||
<div class="padding flex justify-between">
|
||||
<span class="font-1">面值</span>
|
||||
<span>{{couponPropertyUserManageInfo.order.value}}</span>
|
||||
</div>
|
||||
<div class="padding flex justify-between">
|
||||
<span class="font-1">用户名称</span>
|
||||
<span>{{couponPropertyUserManageInfo.order.userName}}</span>
|
||||
</div>
|
||||
<div class="padding flex justify-between">
|
||||
<span class="font-1">手机号</span>
|
||||
<span>{{couponPropertyUserManageInfo.order.tel}}</span>
|
||||
</div>
|
||||
<div class="padding flex justify-between">
|
||||
<span class="font-1">用途</span>
|
||||
<span>{{couponPropertyUserManageInfo.order.toTypeName}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox ">
|
||||
<div class="ibox-title">
|
||||
<h5><span>
|
||||
<vc:i18n name="查询条件"></vc:i18n>
|
||||
</span></h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3" >
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('请填写用户名称','couponPropertyUserManage')"
|
||||
v-model="couponPropertyUserManageInfo.conditions.userName" class=" form-control">
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('请填写优惠券名称','couponPropertyUserManage')"
|
||||
v-model="couponPropertyUserManageInfo.conditions.couponName"
|
||||
class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('请填写用户名称','couponPropertyUserManage')"
|
||||
v-model="couponPropertyUserManageInfo.conditions.userName"
|
||||
class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('请填写手机号','couponPropertyUserManage')"
|
||||
v-model="couponPropertyUserManageInfo.conditions.tel" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<button type="button" class="btn btn-primary btn-sm"
|
||||
v-on:click="_queryCouponPropertyUserMethod()">
|
||||
<i class="glyphicon glyphicon-search"></i> <span>
|
||||
<vc:i18n name="查询"></vc:i18n>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4" >
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('请填写手机号','couponPropertyUserManage')"
|
||||
v-model="couponPropertyUserManageInfo.conditions.tel" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-title">
|
||||
<h5><span>
|
||||
<vc:i18n name="优惠券使用记录" namespace="couponPropertyUserManage"></vc:i18n>
|
||||
</span></h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<button type="button" class="btn btn-primary btn-sm"
|
||||
v-on:click="_queryCouponPropertyUserMethod()">
|
||||
<i class="glyphicon glyphicon-search"></i> <span>
|
||||
<vc:i18n name="查询"></vc:i18n>
|
||||
</span>
|
||||
</button>
|
||||
<div class="ibox-content">
|
||||
|
||||
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='编号' namespace='couponPropertyUserManage'></vc:i18n>
|
||||
</span></th>
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='优惠券名称' namespace='couponPropertyUserManage'></vc:i18n>
|
||||
</span></th>
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='面值' namespace='couponPropertyUserManage'></vc:i18n>
|
||||
</span></th>
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='用户名称' namespace='couponPropertyUserManage'></vc:i18n>
|
||||
</span></th>
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='手机号' namespace='couponPropertyUserManage'></vc:i18n>
|
||||
</span></th>
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='用途' namespace='couponPropertyUserManage'></vc:i18n>
|
||||
</span></th>
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='使用时间' namespace='couponPropertyUserManage'></vc:i18n>
|
||||
</span></th>
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='操作'></vc:i18n>
|
||||
</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="couponPropertyUser in couponPropertyUserManageInfo.couponPropertyUsers">
|
||||
<td class="text-center">{{couponPropertyUser.uoId}}</td>
|
||||
<td class="text-center">{{couponPropertyUser.couponName}}</td>
|
||||
<td class="text-center">{{couponPropertyUser.value}}</td>
|
||||
<td class="text-center">{{couponPropertyUser.userName}}</td>
|
||||
<td class="text-center">{{couponPropertyUser.tel}}</td>
|
||||
<td class="text-center">{{couponPropertyUser.remark}}</td>
|
||||
<td class="text-center">{{couponPropertyUser.createTime}}</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openEditCouponPropertyUserModel(couponPropertyUser)"><span>
|
||||
<vc:i18n name='修改'></vc:i18n>
|
||||
</span></button>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openDeleteCouponPropertyUserModel(couponPropertyUser)"><span>
|
||||
<vc:i18n name='删除'></vc:i18n>
|
||||
</span></button>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="7">
|
||||
<ul class="pagination float-right"></ul>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<!-- 分页 -->
|
||||
<vc:create path="frame/pagination"></vc:create>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-title">
|
||||
<h5><span>
|
||||
<vc:i18n name="优惠券使用记录" namespace="couponPropertyUserManage"></vc:i18n>
|
||||
</span></h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
|
||||
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='编号' namespace='couponPropertyUserManage'></vc:i18n>
|
||||
</span></th>
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='优惠券名称' namespace='couponPropertyUserManage'></vc:i18n>
|
||||
</span></th>
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='面值' namespace='couponPropertyUserManage'></vc:i18n>
|
||||
</span></th>
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='用户名称' namespace='couponPropertyUserManage'></vc:i18n>
|
||||
</span></th>
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='手机号' namespace='couponPropertyUserManage'></vc:i18n>
|
||||
</span></th>
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='用途' namespace='couponPropertyUserManage'></vc:i18n>
|
||||
</span></th>
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='操作'></vc:i18n>
|
||||
</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="couponPropertyUser in couponPropertyUserManageInfo.couponPropertyUsers">
|
||||
<td class="text-center">{{couponPropertyUser.uoId}}</td>
|
||||
<td class="text-center">{{couponPropertyUser.couponName}}</td>
|
||||
<td class="text-center">{{couponPropertyUser.value}}</td>
|
||||
<td class="text-center">{{couponPropertyUser.userName}}</td>
|
||||
<td class="text-center">{{couponPropertyUser.tel}}</td>
|
||||
<td class="text-center">{{couponPropertyUser.remark}}</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openEditCouponPropertyUserModel(couponPropertyUser)"><span>
|
||||
<vc:i18n name='修改'></vc:i18n>
|
||||
</span></button>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openDeleteCouponPropertyUserModel(couponPropertyUser)"><span>
|
||||
<vc:i18n name='删除'></vc:i18n>
|
||||
</span></button>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="7">
|
||||
<ul class="pagination float-right"></ul>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<!-- 分页 -->
|
||||
<vc:create path="frame/pagination"></vc:create>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -8,6 +8,15 @@
|
||||
data: {
|
||||
couponPropertyUserManageInfo: {
|
||||
couponPropertyUsers: [],
|
||||
order: {
|
||||
remark: '',
|
||||
userName: '',
|
||||
createTime: '',
|
||||
tel: '',
|
||||
couponName: '',
|
||||
value: '',
|
||||
toTypeName: '',
|
||||
},
|
||||
total: 0,
|
||||
records: 1,
|
||||
moreCondition: false,
|
||||
@ -81,7 +90,51 @@
|
||||
} else {
|
||||
vc.component.couponPropertyUserManageInfo.moreCondition = true;
|
||||
}
|
||||
}
|
||||
},
|
||||
_confirmCouponPropertyUser: function(_page, _rows) {
|
||||
|
||||
let _couponId = $that.couponPropertyUserManageInfo.couponId;
|
||||
if (!_couponId) {
|
||||
vc.toast('请扫码');
|
||||
return;
|
||||
}
|
||||
|
||||
let _data = {
|
||||
couponQrcode: _couponId,
|
||||
communityId: vc.getCurrentCommunity().communityId,
|
||||
giftCount:1
|
||||
}
|
||||
|
||||
vc.http.apiPost(
|
||||
'/couponProperty.writeOffCouponPropertyUser',
|
||||
JSON.stringify(_data), {
|
||||
emulateJSON: true
|
||||
},
|
||||
function(json, res) {
|
||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||
$that.couponPropertyUserManageInfo.couponId = '';
|
||||
let _json = JSON.parse(json);
|
||||
if (_json.code != 0) {
|
||||
vc.toast(_json.msg);
|
||||
return;
|
||||
}
|
||||
$that._listCouponPropertyUsers(1, 10);
|
||||
vc.toast("核销成功");
|
||||
if (!_json.data || _json.data.length < 1) {
|
||||
return;
|
||||
}
|
||||
vc.copyObject(_json.data[0], $that.couponPropertyUserManageInfo.order);
|
||||
|
||||
if (!$that.couponPropertyUserManageInfo.order.remark) {
|
||||
$that.couponPropertyUserManageInfo.order.remark = "核销成功";
|
||||
}
|
||||
},
|
||||
function(errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
$that.couponPropertyUserManageInfo.couponId = '';
|
||||
vc.toast(errInfo);
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -131,6 +131,9 @@
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='状态' namespace='couponPropertyUserManage'></vc:i18n>
|
||||
</span></th>
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='生效时间' namespace='couponPropertyUserManage'></vc:i18n>
|
||||
</span></th>
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='操作'></vc:i18n>
|
||||
</span></th>
|
||||
@ -147,6 +150,7 @@
|
||||
<td class="text-center">{{couponPropertyUser.toTypeName}}</td>
|
||||
<td class="text-center">{{couponPropertyUser.stock}}张</td>
|
||||
<td class="text-center">{{couponPropertyUser.state == '1001'?'未使用':'已使用'}}</td>
|
||||
<td class="text-center">{{couponPropertyUser.startTime}}</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user