| | |
| | | return vc.validate.validate({ |
| | | addPayFeeConfigDiscountInfo: vc.component.addPayFeeConfigDiscountInfo |
| | | }, { |
| | | 'addPayFeeConfigDiscountInfo.configId': [ |
| | | { |
| | | limit: "required", |
| | | param: "", |
| | | errInfo: "费用项不能为空" |
| | | } |
| | | ], |
| | | 'addPayFeeConfigDiscountInfo.discountId': [ |
| | | { |
| | | limit: "required", |
| | | param: "", |
| | | errInfo: "折扣名称不能为空" |
| | | } |
| | | ], |
| | | 'addPayFeeConfigDiscountInfo.configId': [{ |
| | | limit: "required", |
| | | param: "", |
| | | errInfo: "费用项不能为空" |
| | | }], |
| | | 'addPayFeeConfigDiscountInfo.discountId': [{ |
| | | limit: "required", |
| | | param: "", |
| | | errInfo: "折扣名称不能为空" |
| | | }], |
| | | // 'addPayFeeConfigDiscountInfo.startTime': [ |
| | | // { |
| | | // limit: "required", |
| | |
| | | } |
| | | vc.http.apiPost( |
| | | '/payFeeConfigDiscount/savePayFeeConfigDiscount', |
| | | JSON.stringify(vc.component.addPayFeeConfigDiscountInfo), |
| | | { |
| | | JSON.stringify(vc.component.addPayFeeConfigDiscountInfo), { |
| | | emulateJSON: true |
| | | }, |
| | | function (json, res) { |
| | |
| | | function (json, res) { |
| | | let _feeDiscountManageInfo = JSON.parse(json); |
| | | $that.addPayFeeConfigDiscountInfo.discounts = _feeDiscountManageInfo.data; |
| | | }, function (errInfo, error) { |
| | | }, |
| | | function (errInfo, error) { |
| | | console.log('请求失败处理'); |
| | | } |
| | | ); |
| | | } |
| | | } |
| | | }); |
| | | })(window.vc); |
| | | })(window.vc); |
| | |
| | | <td class="text-center">{{payFeeConfigDiscount.discountType == '1001'?'优惠':'违约'}}</td> |
| | | <td class="text-center" v-if="!payFeeConfigDiscount.startTime&&!payFeeConfigDiscount.endTime"> |
| | | {{'-'}}</td> |
| | | <td class="text-center" v-else>{{payFeeConfigDiscount.startTime||'-'}}</br> |
| | | ~{{payFeeConfigDiscount.endTime||'-'}}</td> |
| | | <td class="text-center" v-else>{{formatDate(payFeeConfigDiscount.startTime) ||'-'}}</br> |
| | | ~{{formatDate(payFeeConfigDiscount.endTime) ||'-'}}</td> |
| | | <td class="text-center" |
| | | v-if="!payFeeConfigDiscount.payMaxStarTime&&!payFeeConfigDiscount.payMaxEndTime"> |
| | | {{'-'}}</td> |
| | | <td class="text-center" v-else>{{payFeeConfigDiscount.payMaxStarTime||'-'}}</br> |
| | | ~{{payFeeConfigDiscount.payMaxEndTime||'-'}}</td> |
| | | <td class="text-center" v-else>{{formatDate(payFeeConfigDiscount.payMaxStarTime) ||'-'}}</br> |
| | | ~{{formatDate(payFeeConfigDiscount.payMaxEndTime) ||'-'}}</td> |
| | | <td class="text-center"> |
| | | <div class="btn-group"> |
| | | <button class="btn-white btn btn-xs" |
| | |
| | | vc.component._listPayFeeConfigDiscounts(_currentPage, DEFAULT_ROWS); |
| | | }); |
| | | }, |
| | | // filters: { |
| | | // formatDate: function(value) { |
| | | // if (!value) return ''; |
| | | // return value.split(' ')[0]; |
| | | // } |
| | | // }, |
| | | methods: { |
| | | formatDate: function(dateString) { |
| | | if (!dateString) return ''; // 如果没有日期字符串,则返回空字符串 |
| | | return dateString.split(' ')[0]; // 返回日期部分 |
| | | }, |
| | | _listPayFeeConfigDiscounts: function (_page, _rows) { |
| | | let param = { |
| | | params: { |
| | |
| | | dataCount: vc.component.payFeeConfigDiscountManageInfo.total, |
| | | currentPage: _page |
| | | }); |
| | | }, function (errInfo, error) { |
| | | }, |
| | | function (errInfo, error) { |
| | | console.log('请求失败处理'); |
| | | } |
| | | ); |
| | |
| | | } |
| | | } |
| | | }); |
| | | })(window.vc); |
| | | })(window.vc); |