mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-26 16:19:44 +08:00
雨花代码
This commit is contained in:
parent
ea785de28b
commit
6b81912763
@ -0,0 +1,19 @@
|
||||
<div class="modal fade" id="deleteCouponPropertyPoolDetailModel" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel"> <span><vc:i18n name="请确认您的操作!"></vc:i18n></span></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<tr align="center"><th><span><vc:i18n name="确定退回优惠券" namespace="deleteCouponPropertyPoolDetail"></vc:i18n></span></th></tr>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal" v-on:click="closeDeleteCouponPropertyPoolModel()"><span><vc:i18n name="点错了"></vc:i18n></span></button>
|
||||
<button type="button" class="btn btn-primary" v-on:click="deleteCouponPropertyPoolDetail()"><span><vc:i18n name="确认退回!"></vc:i18n></span></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,52 @@
|
||||
(function(vc,vm){
|
||||
|
||||
vc.extends({
|
||||
data:{
|
||||
deleteCouponPropertyPoolDetailInfo:{
|
||||
|
||||
}
|
||||
},
|
||||
_initMethod:function(){
|
||||
|
||||
},
|
||||
_initEvent:function(){
|
||||
vc.on('deleteCouponPropertyPoolDetail','openDeleteCouponPropertyPoolModal',function(_params){
|
||||
|
||||
vc.component.deleteCouponPropertyPoolDetailInfo = _params;
|
||||
$('#deleteCouponPropertyPoolDetailModel').modal('show');
|
||||
|
||||
});
|
||||
},
|
||||
methods:{
|
||||
deleteCouponPropertyPoolDetail:function(){
|
||||
vc.component.deleteCouponPropertyPoolDetailInfo.communityId=vc.getCurrentCommunity().communityId;
|
||||
vc.http.apiPost(
|
||||
'/couponProperty.deleteCouponPropertyPoolDetail',
|
||||
JSON.stringify(vc.component.deleteCouponPropertyPoolDetailInfo),
|
||||
{
|
||||
emulateJSON:true
|
||||
},
|
||||
function(json,res){
|
||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||
let _json = JSON.parse(json);
|
||||
if (_json.code == 0) {
|
||||
//关闭model
|
||||
$('#deleteCouponPropertyPoolDetailModel').modal('hide');
|
||||
vc.emit('couponPropertyPoolDetail', 'listCouponPropertyPool',{});
|
||||
return ;
|
||||
}
|
||||
vc.message(_json.msg);
|
||||
},
|
||||
function(errInfo,error){
|
||||
console.log('请求失败处理');
|
||||
vc.message(json);
|
||||
|
||||
});
|
||||
},
|
||||
closeDeleteCouponPropertyPoolModel:function(){
|
||||
$('#deleteCouponPropertyPoolDetailModel').modal('hide');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
})(window.vc,window.vc.component);
|
||||
@ -0,0 +1,60 @@
|
||||
<div id="giftCouponPropertyPoolModel" class="modal fade" role="dialog" aria-labelledby="exampleModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<h3 class="m-t-none m-b "><span>
|
||||
<vc:i18n name="赠送优惠券" namespace="giftCouponPropertyPool"></vc:i18n>
|
||||
</span></h3>
|
||||
<div class="ibox-content">
|
||||
<div>
|
||||
<div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"><span>
|
||||
<vc:i18n name='优惠券名称' namespace='giftCouponPropertyPool'></vc:i18n>
|
||||
</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="giftCouponPropertyPoolInfo.couponName" type="text" disabled="disabled"
|
||||
:placeholder="vc.i18n('必填,请填写优惠券名称','giftCouponPropertyPool')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"><span>
|
||||
<vc:i18n name='数量' namespace='giftCouponPropertyPool'></vc:i18n>
|
||||
</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="giftCouponPropertyPoolInfo.giftCount" type="number"
|
||||
:placeholder="vc.i18n('必填,请填写数量','giftCouponPropertyPool')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"><span>
|
||||
<vc:i18n name='业主手机号' namespace='giftCouponPropertyPool'></vc:i18n>
|
||||
</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="giftCouponPropertyPoolInfo.tel" type="text"
|
||||
:placeholder="vc.i18n('必填,请填写手机号','giftCouponPropertyPool')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ibox-content">
|
||||
<button class="btn btn-primary float-right" type="button" v-on:click="saveCouponPropertyPoolInfo()"><i
|
||||
class="fa fa-check"></i>
|
||||
<span>
|
||||
<vc:i18n name="赠送"></vc:i18n>
|
||||
</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;"
|
||||
data-dismiss="modal">
|
||||
<span>
|
||||
<vc:i18n name="取消"></vc:i18n>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,93 @@
|
||||
(function (vc) {
|
||||
|
||||
vc.extends({
|
||||
data: {
|
||||
giftCouponPropertyPoolInfo: {
|
||||
cppId: '',
|
||||
couponName: '',
|
||||
giftCount: '',
|
||||
tel: '',
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('giftCouponPropertyPool', 'openGiftCouponPropertyPoolModal', function (_coupon) {
|
||||
vc.copyObject(_coupon, $that.giftCouponPropertyPoolInfo);
|
||||
$('#giftCouponPropertyPoolModel').modal('show');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
giftCouponPropertyPoolValidate() {
|
||||
return vc.validate.validate({
|
||||
giftCouponPropertyPoolInfo: vc.component.giftCouponPropertyPoolInfo
|
||||
}, {
|
||||
'giftCouponPropertyPoolInfo.cppId': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "优惠券不能为空"
|
||||
},
|
||||
],
|
||||
'giftCouponPropertyPoolInfo.giftCount': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "数量不能为空"
|
||||
}
|
||||
],
|
||||
'giftCouponPropertyPoolInfo.tel': [
|
||||
{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "业主手机号不能为空"
|
||||
}
|
||||
],
|
||||
});
|
||||
},
|
||||
saveCouponPropertyPoolInfo: function () {
|
||||
if (!vc.component.giftCouponPropertyPoolValidate()) {
|
||||
vc.toast(vc.validate.errInfo);
|
||||
return;
|
||||
}
|
||||
vc.component.giftCouponPropertyPoolInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||
vc.http.apiPost(
|
||||
'/couponProperty.giftCouponProperty',
|
||||
JSON.stringify(vc.component.giftCouponPropertyPoolInfo),
|
||||
{
|
||||
emulateJSON: true
|
||||
},
|
||||
function (json, res) {
|
||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||
let _json = JSON.parse(json);
|
||||
if (_json.code == 0) {
|
||||
//关闭model
|
||||
$('#giftCouponPropertyPoolModel').modal('hide');
|
||||
vc.component.clearGiftCouponPropertyPoolInfo();
|
||||
vc.emit('couponPropertyPoolManage', 'listCouponPropertyPool', {});
|
||||
return;
|
||||
}
|
||||
vc.toast(_json.msg);
|
||||
|
||||
},
|
||||
function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
|
||||
vc.toast(errInfo);
|
||||
|
||||
});
|
||||
},
|
||||
clearGiftCouponPropertyPoolInfo: function () {
|
||||
vc.component.giftCouponPropertyPoolInfo = {
|
||||
cppId: '',
|
||||
couponName: '',
|
||||
giftCount: '',
|
||||
tel: '',
|
||||
|
||||
};
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
})(window.vc);
|
||||
@ -7,9 +7,6 @@
|
||||
<vc:i18n name="查询条件"></vc:i18n>
|
||||
</span></h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
<!-- <button type="button" class="btn btn-link btn-sm" style="margin-right:10px;"
|
||||
v-on:click="_moreCondition()">{{couponPropertyPoolDetailInfo.moreCondition ==
|
||||
true?'隐藏':'更多'}}</button> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
@ -47,13 +44,23 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-4" >
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('请填写用户名称','couponPropertyPoolDetail')"
|
||||
v-model="couponPropertyPoolDetailInfo.conditions.userName" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-group">
|
||||
<input type="text" :placeholder="vc.i18n('请填写手机号','couponPropertyPoolDetail')"
|
||||
v-model="couponPropertyPoolDetailInfo.conditions.tel" class=" form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<select class="custom-select" v-model="couponPropertyPoolDetailInfo.conditions.toType">
|
||||
<option selected value="">{{vc.i18n('选择用途','couponPropertyPoolDetail')}}
|
||||
</option>
|
||||
<option value="1001">{{vc.i18n('购物','couponPropertyPoolDetail')}}
|
||||
</option>
|
||||
<option value="2002">{{vc.i18n('缴费','couponPropertyPoolDetail')}}
|
||||
<option value="1011">{{vc.i18n('购物','couponPropertyPoolDetail')}}
|
||||
</option>
|
||||
<option value="3003">{{vc.i18n('维修劵','couponPropertyPoolDetail')}}
|
||||
</option>
|
||||
@ -74,7 +81,7 @@
|
||||
<vc:i18n name="赠送记录" namespace="couponPropertyPoolDetail"></vc:i18n>
|
||||
</span></h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
@ -91,7 +98,7 @@
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='面值' namespace='couponPropertyPoolDetail'></vc:i18n>
|
||||
</span></th>
|
||||
<th class="text-center"><span>
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='数量' namespace='couponPropertyPoolDetail'></vc:i18n>
|
||||
</span></th>
|
||||
<th class="text-center"><span>
|
||||
@ -100,9 +107,12 @@
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='手机号' namespace='couponPropertyPoolDetail'></vc:i18n>
|
||||
</span></th>
|
||||
<th class="text-center"><span>
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='赠送时间' namespace='couponPropertyPoolDetail'></vc:i18n>
|
||||
</span></th>
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='操作' namespace='couponPropertyPoolDetail'></vc:i18n>
|
||||
</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -114,7 +124,14 @@
|
||||
<td class="text-center">{{couponPropertyPool.userName}}</td>
|
||||
<td class="text-center">{{couponPropertyPool.tel}}</td>
|
||||
<td class="text-center">{{couponPropertyPool.createTime}}</td>
|
||||
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openDeleteCouponPropertyPoolModel(couponPropertyPool)"><span>
|
||||
<vc:i18n name='退回'></vc:i18n>
|
||||
</span></button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
@ -131,4 +148,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<vc:create path="scm/deleteCouponPropertyPoolDetail"></vc:create>
|
||||
|
||||
</div>
|
||||
@ -17,6 +17,8 @@
|
||||
couponName: '',
|
||||
fromType: '',
|
||||
toType: '',
|
||||
userName:'',
|
||||
tel:'',
|
||||
communityId:vc.getCurrentCommunity().communityId
|
||||
}
|
||||
}
|
||||
@ -64,6 +66,10 @@
|
||||
vc.component._listCouponPropertyPools(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
|
||||
},
|
||||
_openDeleteCouponPropertyPoolModel: function (_detail) {
|
||||
vc.emit('deleteCouponPropertyPoolDetail','openDeleteCouponPropertyPoolModal', _detail);
|
||||
},
|
||||
|
||||
_moreCondition: function () {
|
||||
if (vc.component.couponPropertyPoolDetailInfo.moreCondition) {
|
||||
vc.component.couponPropertyPoolDetailInfo.moreCondition = false;
|
||||
|
||||
@ -47,7 +47,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-4" >
|
||||
<div class="col-sm-4">
|
||||
<select class="custom-select" v-model="couponPropertyPoolManageInfo.conditions.toType">
|
||||
<option selected value="">{{vc.i18n('选择用途','couponPropertyPoolManage')}}
|
||||
</option>
|
||||
@ -105,7 +105,7 @@
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='有效期' namespace=' couponPropertyPoolManage'></vc:i18n>
|
||||
</span></th>
|
||||
<th class="text-center"><span>
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='创建时间' namespace=' couponPropertyPoolManage'></vc:i18n>
|
||||
</span></th>
|
||||
<th class="text-center"><span>
|
||||
@ -126,13 +126,19 @@
|
||||
<td class="text-center">{{couponPropertyPool.createTime}}</td>
|
||||
|
||||
<td class="text-center">
|
||||
<div class="btn-group" v-if="couponPropertyPool.fromType == '2002'">
|
||||
<div class="btn-group" v-if="couponPropertyPool.stock >0">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openGiftCouponPropertyPoolModel(couponPropertyPool)"><span>
|
||||
<vc:i18n name='手工赠送'></vc:i18n>
|
||||
</span></button>
|
||||
</div>
|
||||
<div class="btn-group" v-if="couponPropertyPool.fromType == '2002'">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openEditCouponPropertyPoolModel(couponPropertyPool)"><span>
|
||||
<vc:i18n name='修改'></vc:i18n>
|
||||
</span></button>
|
||||
</div>
|
||||
<div class="btn-group" v-if="couponPropertyPool.fromType == '2002'">
|
||||
<div class="btn-group" v-if="couponPropertyPool.fromType == '2002'">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openDeleteCouponPropertyPoolModel(couponPropertyPool)"><span>
|
||||
<vc:i18n name='删除'></vc:i18n>
|
||||
@ -161,6 +167,7 @@
|
||||
|
||||
<vc:create path="scm/addCouponPropertyPool" callBackListener="" callBackFunction=""></vc:create>
|
||||
<vc:create path="scm/editCouponPropertyPool"></vc:create>
|
||||
<vc:create path="scm/giftCouponPropertyPool"></vc:create>
|
||||
<vc:create path="scm/deleteCouponPropertyPool"></vc:create>
|
||||
|
||||
</div>
|
||||
@ -65,6 +65,9 @@
|
||||
_openEditCouponPropertyPoolModel: function (_couponPropertyPool) {
|
||||
vc.emit('editCouponPropertyPool', 'openEditCouponPropertyPoolModal', _couponPropertyPool);
|
||||
},
|
||||
_openGiftCouponPropertyPoolModel: function (_couponPropertyPool) {
|
||||
vc.emit('giftCouponPropertyPool', 'openGiftCouponPropertyPoolModal', _couponPropertyPool);
|
||||
},
|
||||
_openDeleteCouponPropertyPoolModel: function (_couponPropertyPool) {
|
||||
vc.emit('deleteCouponPropertyPool', 'openDeleteCouponPropertyPoolModal', _couponPropertyPool);
|
||||
},
|
||||
|
||||
@ -130,9 +130,7 @@
|
||||
<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>
|
||||
@ -144,21 +142,6 @@
|
||||
<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>
|
||||
|
||||
@ -71,15 +71,7 @@
|
||||
}
|
||||
);
|
||||
},
|
||||
_openAddCouponPropertyUserModal: function () {
|
||||
vc.emit('addCouponPropertyUser', 'openAddCouponPropertyUserModal', {});
|
||||
},
|
||||
_openEditCouponPropertyUserModel: function (_couponPropertyUser) {
|
||||
vc.emit('editCouponPropertyUser', 'openEditCouponPropertyUserModal', _couponPropertyUser);
|
||||
},
|
||||
_openDeleteCouponPropertyUserModel: function (_couponPropertyUser) {
|
||||
vc.emit('deleteCouponPropertyUser', 'openDeleteCouponPropertyUserModal', _couponPropertyUser);
|
||||
},
|
||||
|
||||
_queryCouponPropertyUserMethod: function () {
|
||||
vc.component._listCouponPropertyUsers(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user