wuxw лет назад: 6
Родитель
Сommit
f2f5556b65

+ 1 - 1
Api/src/main/java/com/java110/api/listener/ownerRepair/DeleteOwnerRepairListener.java

@@ -86,7 +86,7 @@ public class DeleteOwnerRepairListener extends AbstractServiceApiListener {
         JSONObject businessOwnerRepair = new JSONObject();
         businessOwnerRepair.putAll(paramInJson);
         //计算 应收金额
-        business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessOwnerRepair", businessOwnerRepair);
+        business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessRepair", businessOwnerRepair);
         return business;
     }
 

+ 1 - 1
Api/src/main/java/com/java110/api/listener/ownerRepair/SaveOwnerRepairListener.java

@@ -92,7 +92,7 @@ public class SaveOwnerRepairListener extends AbstractServiceApiListener {
         businessOwnerRepair.put("state", StateConstant.REPAIR_NO_DISPATCH);
 
         //计算 应收金额
-        business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessOwnerRepair", businessOwnerRepair);
+        business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessRepair", businessOwnerRepair);
         return business;
     }
 

+ 1 - 1
Api/src/main/java/com/java110/api/listener/ownerRepair/UpdateOwnerRepairListener.java

@@ -90,7 +90,7 @@ public class UpdateOwnerRepairListener extends AbstractServiceApiListener {
         JSONObject businessOwnerRepair = new JSONObject();
         businessOwnerRepair.putAll(paramInJson);
         //计算 应收金额
-        business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessOwnerRepair", businessOwnerRepair);
+        business.getJSONObject(CommonConstant.HTTP_BUSINESS_DATAS).put("businessRepair", businessOwnerRepair);
         return business;
     }
 

+ 2 - 2
WebService/src/main/resources/components/ownerRepairPackage/add-ownerRepair/addOwnerRepair.html

@@ -43,13 +43,13 @@
                                 <label class="col-sm-2 col-form-label">预约时间</label>
                                 <div class="col-sm-10">
                                     <input v-model="addOwnerRepairInfo.appointmentTime" type="text"
-                                           placeholder="必填,请填写预约时间" class="form-control">
+                                           placeholder="必填,请填写预约时间" class="form-control addAppointmentTime">
                                 </div>
                             </div>
                             <div class="form-group row">
                                 <label class="col-sm-2 col-form-label">报修内容</label>
                                 <div class="col-sm-10">
-                                    <textarea placeholder="必填,请填写报修内容" class="form-control"
+                                    <textarea placeholder="必填,请填写报修内容" cols="15" class="form-control"
                                               v-model="addOwnerRepairInfo.context"></textarea></div>
                             </div>
 

+ 19 - 1
WebService/src/main/resources/components/ownerRepairPackage/add-ownerRepair/addOwnerRepair.js

@@ -19,7 +19,7 @@
             }
         },
          _initMethod:function(){
-
+            vc.component._initAddOwnerRepairInfo();
          },
          _initEvent:function(){
             vc.on('addOwnerRepair','openAddOwnerRepairModal',function(_ownerInfo){
@@ -184,6 +184,24 @@
                                 console.log('请求失败处理');
                              }
                            );
+            },
+            _initAddOwnerRepairInfo:function(){
+                    vc.component.addOwnerRepairInfo.appointmentTime = vc.dateFormat(new Date().getTime());
+                     $('.addAppointmentTime').datetimepicker({
+                        language: 'zh-CN',
+                        format: 'yyyy-mm-dd HH:ii:ss',
+                        initTime: true,
+                        initialDate: new Date(),
+                        autoClose: 1,
+                        todayBtn: true
+
+                    });
+                    $('.addAppointmentTime').datetimepicker()
+                        .on('changeDate', function (ev) {
+                            var value = $(".addAppointmentTime").val();
+                            vc.component.addOwnerRepairInfo.appointmentTime = value;
+                    });
+
             }
         }
     });

+ 3 - 3
WebService/src/main/resources/components/ownerRepairPackage/edit-ownerRepair/editOwnerRepair.html

@@ -42,19 +42,19 @@
                                 <label class="col-sm-2 col-form-label">预约时间</label>
                                 <div class="col-sm-10">
                                     <input v-model="editOwnerRepairInfo.appointmentTime" type="text"
-                                           placeholder="必填,请填写预约时间" class="form-control">
+                                           placeholder="必填,请填写预约时间" class="form-control editAppointmentTime">
                                 </div>
                             </div>
                             <div class="form-group row">
                                 <label class="col-sm-2 col-form-label">报修内容</label>
                                 <div class="col-sm-10">
-                                    <textarea placeholder="必填,请填写报修内容" class="form-control"
+                                    <textarea placeholder="必填,请填写报修内容" cols="15" class="form-control"
                                               v-model="editOwnerRepairInfo.context"></textarea></div>
                             </div>
 
                             <div class="ibox-content">
                                 <button class="btn btn-primary float-right" type="button"
-                                        v-on:click="editOwnerRepair()"><i class="fa fa-check"></i>&nbsp;保存
+                                        v-on:click="editOwnerRepair()"><i class="fa fa-check"></i>&nbsp;提交
                                 </button>
                                 <button type="button" class="btn btn-warning float-right" style="margin-right:20px;"
                                         data-dismiss="modal">取消

+ 29 - 11
WebService/src/main/resources/components/ownerRepairPackage/edit-ownerRepair/editOwnerRepair.js

@@ -15,7 +15,7 @@
             }
         },
          _initMethod:function(){
-
+               vc.component._initEditOwnerRepairInfo();
          },
          _initEvent:function(){
              vc.on('editOwnerRepair','openEditOwnerRepairModal',function(_params){
@@ -31,19 +31,19 @@
                             editOwnerRepairInfo:vc.component.editOwnerRepairInfo
                         },{
                             'editOwnerRepairInfo.repairType':[
-{
+                        {
                             limit:"required",
                             param:"",
                             errInfo:"报修类型不能为空"
                         },
- {
+                        {
                             limit:"maxin",
                             param:"2,50",
                             errInfo:"报修类型错误"
                         },
                     ],
-'editOwnerRepairInfo.repairName':[
-{
+                        'editOwnerRepairInfo.repairName':[
+                        {
                             limit:"required",
                             param:"",
                             errInfo:"报修人不能为空"
@@ -144,14 +144,32 @@
             refreshEditOwnerRepairInfo:function(){
                 vc.component.editOwnerRepairInfo= {
                   repairId:'',
-repairType:'',
-repairName:'',
-tel:'',
-roomId:'',
-appointmentTime:'',
-context:'',
+                    repairType:'',
+                    repairName:'',
+                    tel:'',
+                    roomId:'',
+                    appointmentTime:'',
+                    context:'',
 
                 }
+            },
+            _initEditOwnerRepairInfo:function(){
+                    //vc.component.editOwnerRepairInfo.startTime = vc.dateFormat(new Date().getTime());
+                     $('.editAppointmentTime').datetimepicker({
+                        language: 'zh-CN',
+                        format: 'yyyy-mm-dd HH:ii:ss',
+                        initTime: true,
+                        initialDate: new Date(),
+                        autoClose: 1,
+                        todayBtn: true
+
+                    });
+                    $('.editAppointmentTime').datetimepicker()
+                        .on('changeDate', function (ev) {
+                            var value = $(".editAppointmentTime").val();
+                            vc.component.editOwnerRepairInfo.appointmentTime = value;
+                    });
+
             }
         }
     });