wuxw
2019-10-20 925af35a2d738db792c0ed87e916b989bf30197d
WebService/src/main/resources/components/ownerRepairPackage/edit-ownerRepair/editOwnerRepair.js
@@ -4,17 +4,18 @@
        data:{
            editOwnerRepairInfo:{
                repairId:'',
repairType:'',
repairName:'',
tel:'',
roomId:'',
appointmentTime:'',
context:'',
                repairType:'',
                repairName:'',
                tel:'',
                roomId:'',
                roomName:'',
                appointmentTime:'',
                context:'',
            }
        },
         _initMethod:function(){
               vc.component._initEditOwnerRepairInfo();
         },
         _initEvent:function(){
             vc.on('editOwnerRepair','openEditOwnerRepairModal',function(_params){
@@ -30,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:"报修人不能为空"
@@ -115,6 +116,7 @@
                    vc.message(vc.validate.errInfo);
                    return ;
                }
                vc.component.editOwnerRepairInfo.communityId = vc.getCurrentCommunity().communityId;
                vc.http.post(
                    'editOwnerRepair',
@@ -142,14 +144,33 @@
            refreshEditOwnerRepairInfo:function(){
                vc.component.editOwnerRepairInfo= {
                  repairId:'',
repairType:'',
repairName:'',
tel:'',
roomId:'',
appointmentTime:'',
context:'',
                    repairType:'',
                    repairName:'',
                    tel:'',
                    roomId:'',
                    roomName:'',
                    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;
                    });
            }
        }
    });