liuhj 7 months ago
parent
commit
13e6c6c4c2
2 changed files with 37 additions and 9 deletions
  1. 36 8
      src/components/OP/HotelReservations.vue
  2. 1 1
      src/components/OP/SuppliesInventory.vue

+ 36 - 8
src/components/OP/HotelReservations.vue

@@ -141,7 +141,7 @@
                         <el-button type="primary" @click="DownloadVOUCHER">VOUCHER</el-button>
                         <el-button type="primary" @click="ConfirmWord">确认单</el-button>
                         <el-button type="primary" @click="BookingCost">预订成本</el-button>
-                        <el-button type="primary" @click="AddToggle">新增切换</el-button>
+                        <el-button type="primary" @click="AddToggle(1)">新增切换</el-button>
                         <el-button type="primary" @click="AddBtn('RequiredParameters')">保存设置</el-button>
                     </div>
                 </div>
@@ -338,7 +338,7 @@
                             </div>
                             <div style="width: 395px;">
                                 <el-form-item label="消费日期:" label-width="110px">
-                                    <el-date-picker value-format="yyyy-MM-dd" v-model="roomtaxobj.consumptionDate" consumptionDate="消费日期"
+                                    <el-date-picker value-format="yyyy-MM-dd" v-model="roomtaxobj.consumptionDate" placeholder="消费日期"
                                         type="date" style="width: 100%;">
                                     </el-date-picker>
                                 </el-form-item>
@@ -1286,7 +1286,9 @@ export default {
                 }
             }).then(function (res) {
                 if (res.data.code == 200) {
-                    that.PostHotelReservationsBasicsDataInit()
+                    setTimeout(function () {
+                        that.PostHotelReservationsBasicsDataInit()
+                    },500)
                     that.tableDatas=res.data.data;
                 }
             }).catch(function (error) {
@@ -1300,6 +1302,7 @@ export default {
         },
         //酒店预订 基础数据
         PostHotelReservationsBasicsDataInit() {
+            this.GuestNamelist=[];
             var url = "/api/Groups/PostHotelReservationsBasicsDataInit"
             var that = this
             this.$axios({
@@ -1677,6 +1680,26 @@ export default {
                 this.Hotelbreakfastobj.bankNo='';
                 this.Hotelbreakfastobj.cardholderName='';
             }
+            if(this.roomtaxobj.price>0){
+                if (this.roomtaxobj.consumptionDate==""||this.roomtaxobj.consumptionDate==null) {
+                    return this.$message.error("酒店房费有消费金额,请检查消费日期是否填写");
+                }
+            }
+            if(this.Citytaxobj.price>0){
+                if (this.Citytaxobj.consumptionDate==""||this.Citytaxobj.consumptionDate==null) {
+                    return this.$message.error("城市税有消费金额,请检查消费日期是否填写");
+                }
+            }
+            if(this.landtaxobj.price>0){
+                if (this.landtaxobj.consumptionDate==""||this.landtaxobj.consumptionDate==null) {
+                    return this.$message.error("地税有消费金额,请检查消费日期是否填写");
+                }
+            }
+            if(this.Hotelbreakfastobj.price>0){
+                if (this.Hotelbreakfastobj.consumptionDate==""||this.Hotelbreakfastobj.consumptionDate==null) {
+                    return this.$message.error("酒店早餐有消费金额,请检查消费日期是否填写");
+                }
+            }
             this.loading=true;
             var url = "/api/Groups/PostHotelReservationsAddOrEdit"
             var that = this
@@ -1734,7 +1757,7 @@ export default {
                     });
                     that.PostHotelReservationsItemsByDiId()
                     setTimeout(() => {
-                        that.AddToggle()
+                        that.AddToggle();
                         that.loading=false;
                     }, 500);
                 }else{
@@ -1889,7 +1912,7 @@ export default {
             
         },
         //新增切换
-        AddToggle(){
+        AddToggle(val){
             this.modifieds=0;
             this.inifid=0;
             //必填参数
@@ -2058,7 +2081,9 @@ export default {
                     this.$refs['RequiredParameters'].clearValidate();
                 })
             }
-            this.PostHotelReservationsBasicsDataInit();
+            if(val==1){
+                this.PostHotelReservationsBasicsDataInit();
+            }
         },
         //计算日期
         CalculateTade(){
@@ -2134,12 +2159,15 @@ export default {
         },
         //切换团组
         delegationSelectChange(val) {
+            var that = this
             this.delegationInfo=[];
-            
             this.PostGroupListByCTableAndUserId();
             this.AddToggle();
             this.getcostbudgeting();
-            this.PostTourClientListByDiId(val);
+            // setTimeout(function () {
+            //     that.PostTourClientListByDiId(val);
+            // },500)
+            
         },
         
        

+ 1 - 1
src/components/OP/SuppliesInventory.vue

@@ -907,7 +907,7 @@ export default {
                     that.AddMaterialTypearr=res.data.data.goodsTypeData;
                     that.userNameData=res.data.data.userNameData;
                     that.groupNameData=res.data.data.groupNameData;
-                    that.MaterialType=that.MaterialTypearr[0].id;
+                    // that.MaterialType=that.MaterialTypearr[0].id;
                     that.MaterialTypechange();
                     for (let k = 0; k < that.MaterialTypearr.length; k++) {
                         for (let l = 0; l < that.MaterialTypearr[k].subTypeItems.length; l++) {