mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 05:46:03 +08:00
优化代码
This commit is contained in:
parent
265a753aa0
commit
99273e2ff9
@ -24,10 +24,10 @@
|
||||
<vc:i18n name='用途' namespace='addCouponPropertyPool'></vc:i18n>
|
||||
</span></label>
|
||||
<div class="col-sm-10">
|
||||
<select class="custom-select" v-model="addCouponPropertyPoolInfo.toType">
|
||||
<select class="custom-select" v-model="addCouponPropertyPoolInfo.toType" @change="_addChangeToType()">
|
||||
<option selected disabled value="">{{vc.i18n('必填,请选择用途','addCouponPropertyPool')}}</option>
|
||||
</option>
|
||||
<option value="1001">{{vc.i18n('购物','addCouponPropertyPool')}}
|
||||
<option value="1011">{{vc.i18n('购物','addCouponPropertyPool')}}
|
||||
</option>
|
||||
<option value="2002">{{vc.i18n('缴费','addCouponPropertyPool')}}
|
||||
</option>
|
||||
@ -38,6 +38,13 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" v-for="(item,index) in addCouponPropertyPoolInfo.toTypes" :key="index">
|
||||
<label class="col-sm-2 col-form-label">{{item.name}}</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="item.columnValue" type="text"
|
||||
:placeholder="item.remark" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"><span>
|
||||
<vc:i18n name='数量' namespace='addCouponPropertyPool'></vc:i18n>
|
||||
@ -53,7 +60,7 @@
|
||||
</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="addCouponPropertyPoolInfo.validityDay" type="text"
|
||||
:placeholder="vc.i18n('必填,请填写有效期','addCouponPropertyPool')" class="form-control">
|
||||
:placeholder="vc.i18n('必填,请填写有效期(天)','addCouponPropertyPool')" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
toType: '',
|
||||
stock: '',
|
||||
validityDay: '',
|
||||
|
||||
toTypes:[]
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
@ -138,8 +138,33 @@
|
||||
toType: '',
|
||||
stock: '',
|
||||
validityDay: '',
|
||||
toTypes:[]
|
||||
|
||||
};
|
||||
},
|
||||
_addChangeToType:function(){
|
||||
if(!$that.addCouponPropertyPoolInfo.toType){
|
||||
return;
|
||||
}
|
||||
|
||||
let _param = {
|
||||
params:{
|
||||
beanName:$that.addCouponPropertyPoolInfo.toType,
|
||||
page:1,
|
||||
row:100
|
||||
}
|
||||
|
||||
}
|
||||
//发送get请求
|
||||
vc.http.apiGet('/couponKey.listCouponKey',
|
||||
_param,
|
||||
function (json, res) {
|
||||
let _marketSmsManageInfo = JSON.parse(json);
|
||||
$that.addCouponPropertyPoolInfo.toTypes = _marketSmsManageInfo.data;
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
<div id="editCouponPropertyPoolModel" class="modal fade" role="dialog" aria-labelledby="exampleModalLabel"
|
||||
<div id="editCouponPropertyPoolModel" 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="editCouponPropertyPool"></vc:i18n>
|
||||
<vc:i18n name="修改" namespace="editCouponPropertyPool"></vc:i18n>
|
||||
</span></h3>
|
||||
<div class="ibox-content">
|
||||
<div>
|
||||
@ -23,10 +23,10 @@
|
||||
<vc:i18n name='用途' namespace='editCouponPropertyPool'></vc:i18n>
|
||||
</span> </label>
|
||||
<div class="col-sm-10">
|
||||
<select class="custom-select" v-model="editCouponPropertyPoolInfo.toType">
|
||||
<select class="custom-select" v-model="editCouponPropertyPoolInfo.toType" @change="_editChangeToType()">
|
||||
<option selected disabled value="">{{vc.i18n('必填,请选择用途','editCouponPropertyPool')}}</option>
|
||||
</option>
|
||||
<option value="1001">{{vc.i18n('购物','editCouponPropertyPool')}}
|
||||
<option value="1011">{{vc.i18n('购物','editCouponPropertyPool')}}
|
||||
</option>
|
||||
<option value="2002">{{vc.i18n('缴费','editCouponPropertyPool')}}
|
||||
</option>
|
||||
@ -37,6 +37,12 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" v-for="(item,index) in editCouponPropertyPoolInfo.toTypes" :key="index">
|
||||
<label class="col-sm-2 col-form-label">{{item.name}}</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="item.columnValue" type="text" :placeholder="item.remark" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"><span>
|
||||
<vc:i18n name='数量' namespace='editCouponPropertyPool'></vc:i18n>
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
toType: '',
|
||||
stock: '',
|
||||
validityDay: '',
|
||||
|
||||
toTypes:[]
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
@ -20,6 +20,7 @@
|
||||
vc.component.refreshEditCouponPropertyPoolInfo();
|
||||
$('#editCouponPropertyPoolModel').modal('show');
|
||||
vc.copyObject(_params, vc.component.editCouponPropertyPoolInfo);
|
||||
$that.editCouponPropertyPoolInfo.toTypes = _params.configs;
|
||||
vc.component.editCouponPropertyPoolInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||
});
|
||||
},
|
||||
@ -118,12 +119,12 @@
|
||||
vc.emit('couponPropertyPoolManage', 'listCouponPropertyPool', {});
|
||||
return;
|
||||
}
|
||||
vc.message(_json.msg);
|
||||
vc.toast(_json.msg);
|
||||
},
|
||||
function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
|
||||
vc.message(errInfo);
|
||||
vc.toast(errInfo);
|
||||
});
|
||||
},
|
||||
refreshEditCouponPropertyPoolInfo: function () {
|
||||
@ -134,8 +135,32 @@
|
||||
toType: '',
|
||||
stock: '',
|
||||
validityDay: '',
|
||||
|
||||
toTypes:[]
|
||||
}
|
||||
},
|
||||
_editChangeToType:function(){
|
||||
if(!$that.editCouponPropertyPoolInfo.toType){
|
||||
return;
|
||||
}
|
||||
|
||||
let _param = {
|
||||
params:{
|
||||
beanName:$that.editCouponPropertyPoolInfo.toType,
|
||||
page:1,
|
||||
row:100
|
||||
}
|
||||
|
||||
}
|
||||
//发送get请求
|
||||
vc.http.apiGet('/couponKey.listCouponKey',
|
||||
_param,
|
||||
function (json, res) {
|
||||
let _marketSmsManageInfo = JSON.parse(json);
|
||||
$that.editCouponPropertyPoolInfo.toTypes = _marketSmsManageInfo.data;
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@ -240,6 +240,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<vc:create path="property/addOwner" notifyLoadDataComponentName="listOwner" componentTitle="业主"></vc:create>
|
||||
<vc:create path="property/editOwner" notifyLoadDataComponentName="listOwner" componentTitle="业主"></vc:create>
|
||||
<vc:create path="property/deleteOwner" notifyLoadDataComponentName="listOwner"></vc:create>
|
||||
|
||||
@ -105,6 +105,9 @@
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='有效期' namespace=' couponPropertyPoolManage'></vc:i18n>
|
||||
</span></th>
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='创建时间' namespace=' couponPropertyPoolManage'></vc:i18n>
|
||||
</span></th>
|
||||
<th class="text-center"><span>
|
||||
<vc:i18n name='操作'></vc:i18n>
|
||||
</span></th>
|
||||
@ -116,10 +119,12 @@
|
||||
<tr v-for="couponPropertyPool in couponPropertyPoolManageInfo.couponPropertyPools">
|
||||
<td class="text-center">{{couponPropertyPool.cppId}}</td>
|
||||
<td class="text-center">{{couponPropertyPool.couponName}}</td>
|
||||
<td class="text-center">{{couponPropertyPool.fromType}}</td>
|
||||
<td class="text-center">{{couponPropertyPool.toType}}</td>
|
||||
<td class="text-center">{{couponPropertyPool.fromTypeName}}</td>
|
||||
<td class="text-center">{{couponPropertyPool.toTypeName}}</td>
|
||||
<td class="text-center">{{couponPropertyPool.stock}}</td>
|
||||
<td class="text-center">{{couponPropertyPool.validityDay}}</td>
|
||||
<td class="text-center">{{couponPropertyPool.validityDay}}天</td>
|
||||
<td class="text-center">{{couponPropertyPool.createTime}}</td>
|
||||
|
||||
<td class="text-center">
|
||||
<div class="btn-group" v-if="couponPropertyPool.fromType == '2002'">
|
||||
<button class="btn-white btn btn-xs"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user