修复 日常收费 - 收费 清空选择日期时错误

This commit is contained in:
ryoeiken 2020-12-23 08:17:36 +08:00
parent 21416475a2
commit 422bd341ef

View File

@ -186,7 +186,7 @@
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="8"> <el-col :span="8">
<!-- <el-form-item label="上次结算日期" prop="lastBillingDate" v-if="lastBillFlag">--> <!-- <el-form-item label="上次结算日期" prop="lastBillingDate" v-if="lastBillFlag">-->
<el-form-item label="上次结算/用餐日期" prop="lastBillingDate"> <el-form-item label="上次结算 / 用餐日期" prop="lastBillingDate">
<!-- <el-input v-model="formAddNewSettlement.lastBillingDate" :disabled="true"/>--> <!-- <el-input v-model="formAddNewSettlement.lastBillingDate" :disabled="true"/>-->
<el-date-picker <el-date-picker
v-model="formAddNewSettlement.lastBillingDate" v-model="formAddNewSettlement.lastBillingDate"
@ -457,7 +457,7 @@ export default {
dateSpan = sDate2 - sDate1; dateSpan = sDate2 - sDate1;
if (dateSpan < 0) { if (dateSpan < 0) {
this.msgError("你现在的结算日期小于上一次结算日期"); this.msgError("你现在的结算日期小于上一次上次结算 / 用餐日期");
} else { } else {
dateSpan = Math.abs(dateSpan); dateSpan = Math.abs(dateSpan);
@ -465,12 +465,19 @@ export default {
this.formAddNewSettlement.settlementDays = iDays; this.formAddNewSettlement.settlementDays = iDays;
} }
showMealsWithSelect(this.formAddNewSettlement).then(response => { if (this.formAddNewSettlement.selectBillingDate!=null){
this.mealsList = response.data.reportMealsList; showMealsWithSelect(this.formAddNewSettlement).then(response => {
this.dinnerTotalPrice = response.data.reportMealsPrice.dinnerTotalPrice; this.mealsList = response.data.reportMealsList;
this.nutritionTotalPrice = response.data.reportMealsPrice.nutritionTotalPrice; this.dinnerTotalPrice = response.data.reportMealsPrice.dinnerTotalPrice;
this.sumTotalPrice = response.data.reportMealsPrice.sumTotalPrice; this.nutritionTotalPrice = response.data.reportMealsPrice.nutritionTotalPrice;
}) this.sumTotalPrice = response.data.reportMealsPrice.sumTotalPrice;
})
}else {
this.mealsList = null;
this.dinnerTotalPrice = 0;
this.nutritionTotalPrice = 0;
this.sumTotalPrice = 0;
}
}, },
// //
myGetUser() { myGetUser() {