Files
PropertyDeployment/resources/Web/MicroCommunityWeb/html/pages/scm/couponRule/couponRule.js
2025-12-09 20:22:03 +08:00

30 lines
1.0 KiB
JavaScript

(function(vc) {
var DEFAULT_PAGE = 1;
var DEFAULT_ROWS = 10;
vc.extends({
data: {
couponRuleInfo: {
curCouponRule: {},
tabName: 'couponRuleCpps'
},
},
_initMethod: function() {},
_initEvent: function() {
vc.on('couponRule', 'switchCouponRule', function(_param) {
$that.couponRuleInfo.curCouponRule = _param;
$that._changeCouponRuleTab('couponRuleCpps');
})
},
methods: {
_changeCouponRuleTab: function(_tabName) {
$that.couponRuleInfo.tabName = _tabName;
if (_tabName == 'couponRuleCpps') {
vc.emit('couponRuleCpps', 'switch', { ruleId: $that.couponRuleInfo.curCouponRule.ruleId });
}
if (_tabName == 'couponRuleFee') {
vc.emit('couponRuleFees', 'switch', { ruleId: $that.couponRuleInfo.curCouponRule.ruleId });
}
}
},
});
})(window.vc);