Procházet zdrojové kódy

优化 车位出售问题

wuxw před 6 roky
rodič
revize
d7923523b0

+ 3 - 3
WebService/src/main/java/com/java110/web/components/car/SellCarComponent.java

@@ -10,10 +10,10 @@ import org.springframework.http.ResponseEntity;
 import org.springframework.stereotype.Component;
 
 /**
- * 车辆管理
+ * 车位出售
  */
-@Component("sellCar")
-public class SellCarComponent {
+@Component("sellParkingSpace")
+public class SellParkingSpaceComponent {
 
     @Autowired
     private ICarServiceSMO carServiceSMOImpl;

+ 46 - 0
WebService/src/main/java/com/java110/web/components/parkingSpace/SellParkingSpaceFeeComponent.java

@@ -0,0 +1,46 @@
+package com.java110.web.components.parkingSpace;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.common.constant.FeeTypeConstant;
+import com.java110.core.context.IPageData;
+import com.java110.web.smo.IFeeServiceSMO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Component;
+
+/**
+ * @ClassName HireParkingSpaceFeeComponent
+ * @Description TODO
+ * @Author wuxw
+ * @Date 2019/9/14 17:51
+ * @Version 1.0
+ * add by wuxw 2019/9/14
+ **/
+@Component("sellParkingSpaceFee")
+public class SellParkingSpaceFeeComponent {
+
+    @Autowired
+    private IFeeServiceSMO feeServiceSMOImpl;
+
+
+    /**
+     * 查询出售费用配置
+     *
+     * @param pd 页面封装对象 包含页面请求数据
+     * @return ResponseEntity对象返回给页面
+     */
+    public ResponseEntity<String> loadSellParkingSpaceConfigData(IPageData pd) {
+        String paramIn = pd.getReqData();
+        JSONObject paramObj = JSONObject.parseObject(paramIn);
+        return feeServiceSMOImpl.loadPropertyConfigFee(pd, "1001".equals(paramObj.getString("typeCd"))
+                ? FeeTypeConstant.FEE_TYPE_SELL_UP_PARKING_SPACE : FeeTypeConstant.FEE_TYPE_SELL_DOWN_PARKING_SPACE);
+    }
+
+    public IFeeServiceSMO getFeeServiceSMOImpl() {
+        return feeServiceSMOImpl;
+    }
+
+    public void setFeeServiceSMOImpl(IFeeServiceSMO feeServiceSMOImpl) {
+        this.feeServiceSMOImpl = feeServiceSMOImpl;
+    }
+}

+ 54 - 18
WebService/src/main/java/com/java110/web/smo/impl/CarServiceSMOImpl.java

@@ -106,13 +106,18 @@ public class CarServiceSMOImpl extends BaseComponentSMO implements ICarServiceSM
         //数据校验是否 商户是否入驻该小区
         super.checkStoreEnterCommunity(pd, storeId, storeTypeCd, communityId, restTemplate);
 
-        JSONObject viewSelectParkingSpace = this.getObj(infos,"viewSelectParkingSpace");
-        JSONObject viewOwnerInfo = this.getObj(infos,"viewOwnerInfo");
-        JSONObject addCar = this.getObj(infos,"addCar");
-        JSONObject hireParkingSpaceFee = this.getObj(infos,"hireParkingSpaceFee");
+        JSONObject viewSelectParkingSpace = this.getObj(infos, "viewSelectParkingSpace");
+        JSONObject viewOwnerInfo = this.getObj(infos, "viewOwnerInfo");
+        JSONObject addCar = this.getObj(infos, "addCar");
+        JSONObject parkingSpaceFee = null;
+        if(hasThisFlowComponent(infos, "hireParkingSpaceFee")) {
+            parkingSpaceFee = this.getObj(infos, "hireParkingSpaceFee");
+        }else{
+            parkingSpaceFee = this.getObj(infos, "sellParkingSpaceFee");
+        }
         JSONObject newParamIn = new JSONObject();
         newParamIn.putAll(addCar);
-        newParamIn.putAll(hireParkingSpaceFee);
+        newParamIn.putAll(parkingSpaceFee);
         newParamIn.put("communityId", communityId);
         newParamIn.put("ownerId", viewOwnerInfo.getString("ownerId"));
         newParamIn.put("psId", viewSelectParkingSpace.getString("psId"));
@@ -240,7 +245,7 @@ public class CarServiceSMOImpl extends BaseComponentSMO implements ICarServiceSM
 
         JSONArray infos = info.getJSONArray("data");
 
-        if(infos.size() != 4){
+        if (infos.size() != 4) {
             throw new IllegalArgumentException("数据被篡改");
         }
 
@@ -250,28 +255,36 @@ public class CarServiceSMOImpl extends BaseComponentSMO implements ICarServiceSM
         Assert.hasKeyByFlowData(infos, "addCar", "carBrand", "请求报文中未包含carBrand");
         Assert.hasKeyByFlowData(infos, "addCar", "carType", "请求报文中未包含carType");
         Assert.hasKeyByFlowData(infos, "addCar", "carColor", "未包含carColor");
-        Assert.hasKeyByFlowData(infos, "hireParkingSpaceFee", "receivedAmount", "未包含receivedAmount");
-        Assert.hasKeyByFlowData(infos, "hireParkingSpaceFee", "sellOrHire", "未包含sellOrHire");
 
-       JSONObject viewSelectParkingSpace = this.getObj(infos,"viewSelectParkingSpace");
-       JSONObject viewOwnerInfo = this.getObj(infos,"viewOwnerInfo");
-       JSONObject addCar = this.getObj(infos,"addCar");
-       JSONObject hireParkingSpaceFee = this.getObj(infos,"hireParkingSpaceFee");
+        JSONObject parkingSpaceFee = null;
+        if (hasThisFlowComponent(infos, "hireParkingSpaceFee")) {
+            Assert.hasKeyByFlowData(infos, "hireParkingSpaceFee", "receivedAmount", "未包含receivedAmount");
+            Assert.hasKeyByFlowData(infos, "hireParkingSpaceFee", "sellOrHire", "未包含sellOrHire");
+             parkingSpaceFee = this.getObj(infos, "hireParkingSpaceFee");
+        }else{
+            Assert.hasKeyByFlowData(infos, "sellParkingSpaceFee", "receivedAmount", "未包含receivedAmount");
+            Assert.hasKeyByFlowData(infos, "sellParkingSpaceFee", "sellOrHire", "未包含sellOrHire");
+            parkingSpaceFee = this.getObj(infos, "sellParkingSpaceFee");
+        }
+
+        JSONObject viewSelectParkingSpace = this.getObj(infos, "viewSelectParkingSpace");
+        JSONObject viewOwnerInfo = this.getObj(infos, "viewOwnerInfo");
+        JSONObject addCar = this.getObj(infos, "addCar");
 
 
         Assert.hasLength(info.getString("communityId"), "小区ID不能为空");
         Assert.hasLength(viewOwnerInfo.getString("ownerId"), "ownerId不能为空");
         Assert.hasLength(viewSelectParkingSpace.getString("psId"), "psId不能为空");
-        Assert.hasLength(hireParkingSpaceFee.getString("receivedAmount"), "receivedAmount不能为空");
+        Assert.hasLength(parkingSpaceFee.getString("receivedAmount"), "receivedAmount不能为空");
 
-        if(!"H".equals(hireParkingSpaceFee.getString("sellOrHire"))
-                && !"S".equals(hireParkingSpaceFee.getString("sellOrHire"))){
+        if (!"H".equals(parkingSpaceFee.getString("sellOrHire"))
+                && !"S".equals(parkingSpaceFee.getString("sellOrHire"))) {
             throw new IllegalArgumentException("入参错误,无法识别该操作");
         }
 
-        if("H".equals(hireParkingSpaceFee.getString("sellOrHire"))){
-            Assert.jsonObjectHaveKey(hireParkingSpaceFee, "cycles", "未包含cycles");
-            Assert.hasLength(hireParkingSpaceFee.getString("cycles"), "cycles不能为空");
+        if ("H".equals(parkingSpaceFee.getString("sellOrHire"))) {
+            Assert.jsonObjectHaveKey(parkingSpaceFee, "cycles", "未包含cycles");
+            Assert.hasLength(parkingSpaceFee.getString("cycles"), "cycles不能为空");
         }
     }
 
@@ -297,6 +310,7 @@ public class CarServiceSMOImpl extends BaseComponentSMO implements ICarServiceSM
         }
 
     }
+
     /**
      * 校验查询小区楼信息
      *
@@ -329,6 +343,28 @@ public class CarServiceSMOImpl extends BaseComponentSMO implements ICarServiceSM
         throw new IllegalArgumentException("未找到组件编码为【" + flowComponent + "】数据");
     }
 
+    /**
+     * 是否有 这个组件
+     *
+     * @param infos                所有组件信息
+     * @param currentFlowComponent 当前组件
+     * @return
+     */
+    private boolean hasThisFlowComponent(JSONArray infos, String currentFlowComponent) {
+        JSONObject serviceInfo = null;
+
+        for (int infoIndex = 0; infoIndex < infos.size(); infoIndex++) {
+            serviceInfo = infos.getJSONObject(infoIndex);
+
+            if (currentFlowComponent.equals(serviceInfo.getString("flowComponent"))) {
+                return true;
+            }
+
+        }
+
+        return false;
+    }
+
 
     public RestTemplate getRestTemplate() {
         return restTemplate;

+ 0 - 52
WebService/src/main/resources/components/carPackage/sell-car/sellCar.html

@@ -1,52 +0,0 @@
-<div id="component" >
-
-    <vc:create name="addCar"
-               callBackComponent="sellCar"
-               callBackFunction="notify"
-    ></vc:create>
-
-    <!-- 选择 业主信息 -->
-    <vc:create name="sellRoomSelectOwner"
-               callBackComponent = "sellCar"
-               callBackFunction="notify"
-    ></vc:create>
-
-    <!-- 选择停车位 -->
-    <vc:create name="viewSelectParkingSpace"
-               callBackComponent="sellCar"
-               callBackFunction="notify"
-    ></vc:create>
-
-    <div class="row">
-        <div class="col-lg-12">
-            <div class="ibox ">
-                <div class="ibox-title">
-                    <h5>收费信息</h5>
-                </div>
-                <div class="ibox-content">
-                    <div>
-                        <div>
-                            <div class="form-group row">
-                                <label class="col-sm-2 col-form-label">应收费用</label>
-                                <div class="col-sm-10">
-                                    <input v-model="sellCarInfo.receivableAmount" type="text" disabled class="form-control">
-                                </div>
-                            </div>
-                            <div class="form-group row">
-                                <label class="col-sm-2 col-form-label">实收费用</label>
-                                <div class="col-sm-10">
-                                    <input v-model="sellCarInfo.receivedAmount" type="text" placeholder="必填,请填写实际收取费用" class="form-control">
-                                </div>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-            </div>
-        </div>
-    </div>
-
-    <div style="height:50px">
-        <button class="btn btn-primary float-right" type="button" v-on:click="doSellCar()" ><i class="fa fa-check"></i>&nbsp;我要售卖</button>
-    </div>
-
-</div>

+ 0 - 188
WebService/src/main/resources/components/carPackage/sell-car/sellCar.js

@@ -1,188 +0,0 @@
-/**
-    入驻小区
-**/
-(function(vc){
-    vc.extends({
-        data:{
-            sellCarInfo:{
-                ownerId:'',
-                carNum:'',
-                carBrand:'',
-                carType:'',
-                carColor:'',
-                carRemark:"",
-                psId:'',
-                typeCd:'',
-                receivableAmount: "0.00",
-                receivedAmount:"0.00",
-                sellOrHire:"S",
-                ownerInfo:{
-                    ownerId:"",
-                    name:"",
-                    age:"",
-                    sex:"",
-                    userName:"",
-                    remark:"",
-                    link:"",
-                },
-            }
-        },
-        _initMethod:function(){
-
-        },
-        _initEvent:function(){
-            vc.on('sellCar','notify',function(_param){
-                  vc.copyObject(_param,vc.component.sellCarInfo);
-                  vc.copyObject(_param,vc.component.sellCarInfo.ownerInfo);
-
-
-                  if(_param.hasOwnProperty("typeCd")){
-                        vc.component.computeReceivableAmount();
-                  }
-
-            });
-        },
-        methods:{
-            sellCarValidate:function(){
-                        return vc.validate.validate({
-                            sellCarInfo:vc.component.sellCarInfo
-                        },{
-                            'sellCarInfo.ownerId':[
-                                {
-                                    limit:"required",
-                                    param:"",
-                                    errInfo:"未选择业主"
-                                }
-                            ],
-                            'sellCarInfo.psId':[
-                                {
-                                    limit:"required",
-                                    param:"",
-                                    errInfo:"未选择停车位"
-                                }
-                            ],
-                            'sellCarInfo.carNum':[
-                                {
-                                    limit:"required",
-                                    param:"",
-                                    errInfo:"车牌号不能为空"
-                                },
-                                {
-                                    limit:"maxin",
-                                    param:"2,12",
-                                    errInfo:"车牌号不正确"
-                                }
-                            ],
-                            'sellCarInfo.carBrand':[
-                                {
-                                    limit:"required",
-                                    param:"",
-                                    errInfo:"车品牌不能为空"
-                                },
-                                {
-                                    limit:"maxLength",
-                                    param:"50",
-                                    errInfo:"车品牌超出限制"
-                                }
-                            ],
-                            'sellCarInfo.carType':[
-                                {
-                                    limit:"required",
-                                    param:"",
-                                    errInfo:"车类型不能为空"
-                                }
-                            ],
-                            'sellCarInfo.carColor':[
-                                {
-                                    limit:"required",
-                                    param:"",
-                                    errInfo:"车颜色不能为空"
-                                },
-                                {
-                                    limit:"maxLength",
-                                    param:"12",
-                                    errInfo:"车颜色超出限制"
-                                }
-                            ],
-                            'sellCarInfo.receivedAmount':[
-                                {
-                                    limit:"required",
-                                    param:"",
-                                    errInfo:"实收金额不能为空"
-                                },
-                                {
-                                    limit:"money",
-                                    param:"",
-                                    errInfo:"实收金额格式错误,如3.00"
-                                }
-                            ]
-                        });
-             },
-
-            doSellCar:function(){
-                //
-                if(!vc.component.sellCarValidate()){
-                    vc.message(vc.validate.errInfo);
-                    return ;
-                }
-                //改remark
-                vc.component.sellCarInfo.remark = vc.component.sellCarInfo.carRemark;
-
-                vc.component.sellCarInfo.communityId=vc.getCurrentCommunity().communityId;
-            vc.http.post(
-                    'sellCar',
-                    'sell',
-                    JSON.stringify(vc.component.sellCarInfo),
-                    {
-                        emulateJSON:true
-                     },
-                     function(json,res){
-                        //vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
-                        if(res.status == 200){
-                            //关闭model
-                            vc.jumpToPage("/flow/ownerParkingSpaceFlow?" + vc.objToGetParam(vc.component.sellCarInfo.ownerInfo));
-                            return ;
-                        }
-                        vc.message(json);
-                     },
-                     function(errInfo,error){
-                        console.log('请求失败处理');
-
-                        vc.message(errInfo);
-                     });
-
-            },
-            computeReceivableAmount:function(){
-                //
-                var param = {
-                        params:{
-                            communityId:vc.getCurrentCommunity().communityId,
-                            typeCd:vc.component.sellCarInfo.typeCd
-                        }
-                    };
-                    vc.http.get(
-                        'sellCar',
-                        'loadSellParkingSpaceConfigData',
-                         param,
-                         function(json,res){
-                            //vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
-                            if(res.status == 200){
-                                //关闭model
-                                var configFee = JSON.parse(json);
-
-                                vc.component.sellCarInfo.receivableAmount = configFee.additionalAmount;
-                                vc.component.sellCarInfo.receivedAmount = configFee.additionalAmount;
-                                return ;
-                            }
-                            vc.message(json);
-                         },
-                         function(errInfo,error){
-                            console.log('请求失败处理');
-
-                            vc.message(errInfo);
-                         });
-
-            }
-        }
-    });
-})(window.vc);

+ 6 - 0
WebService/src/main/resources/components/ownerPackage/list-owner/listOwner.html

@@ -138,6 +138,12 @@
                                         </p>
                                     </div>
                                 </div>
+
+                                <div class="btn-group">
+                                    <button class="btn-white btn btn-xs "
+                                            v-on:click="_openOwnerDetailModel(owner)">详情
+                                    </button>
+                                </div>
                             </td>
                         </tr>
                         </tbody>

+ 6 - 0
WebService/src/main/resources/components/ownerPackage/list-owner/listOwner.js

@@ -75,6 +75,12 @@
             },
             _openHireParkingSpace:function(_owner){
                 vc.jumpToPage("/flow/hireParkingSpaceFlow?ownerId="+_owner.ownerId);
+            },
+            _openHireParkingSpace:function(_owner){
+                vc.jumpToPage("/flow/sellParkingSpaceFlow?ownerId="+_owner.ownerId);
+            },
+            _openOwnerDetailModel:function(_owner){
+                vc.jumpToPage("/flow/ownerRoomFlow?ownerId="+_owner.ownerId);
             }
         }
     })

+ 27 - 0
WebService/src/main/resources/components/parkingSpacePackage/sell-parking-space-fee/sellParkingSpaceFee.html

@@ -0,0 +1,27 @@
+<div class="row">
+    <div class="col-lg-12">
+        <div class="ibox ">
+            <div class="ibox-title">
+                <h5>收费信息</h5>
+            </div>
+            <div class="ibox-content">
+                <div>
+                    <div>
+                        <div class="form-group row">
+                            <label class="col-sm-2 col-form-label">应收费用</label>
+                            <div class="col-sm-10">
+                                <input v-model="sellParkingSpaceFeeInfo.receivableAmount" type="text" disabled class="form-control">
+                            </div>
+                        </div>
+                        <div class="form-group row">
+                            <label class="col-sm-2 col-form-label">实收费用</label>
+                            <div class="col-sm-10">
+                                <input v-model="sellParkingSpaceFeeInfo.receivedAmount" type="text" placeholder="必填,请填写实际收取费用" class="form-control">
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+</div>

+ 104 - 0
WebService/src/main/resources/components/parkingSpacePackage/sell-parking-space-fee/sellParkingSpaceFee.js

@@ -0,0 +1,104 @@
+/**
+    出租车辆费用
+**/
+(function(vc){
+
+    vc.extends({
+        propTypes: {
+            callBackComponent:vc.propTypes.string,
+            callBackFunction:vc.propTypes.string
+        },
+        data:{
+            sellParkingSpaceFeeInfo:{
+                flowComponent:'sellParkingSpaceFeeInfo',
+                receivableAmount: "0.00",
+                receivedAmount:"0.00",
+                additionalAmount:'0.00',
+                sellOrHire:"S",
+                typeCd:'',
+            }
+        },
+        watch:{
+            sellParkingSpaceFeeInfo:{
+                deep: true,
+                handler:function(){
+                    //console.log("hireParkingSpaceFeeInfo 被调用")
+                    vc.component.saveHireParkingSpaceFee();
+                }
+             }
+        },
+        _initMethod:function(){
+
+        },
+        _initEvent:function(){
+            vc.on('sellParkingSpaceFee', 'onIndex', function(_index){
+                vc.component.hireParkingSpaceFeeInfo.index = _index;
+            });
+
+            vc.on('sellParkingSpaceFee', 'parkingSpaceInfo',function(_parkingSpaceInfo){
+                vc.component.hireParkingSpaceFeeInfo.typeCd = _parkingSpaceInfo.typeCd;
+                vc.component._loadFireParkingSpaceFee();
+            });
+
+        },
+        methods:{
+            sellParkingSpaceFeeValidate:function(){
+                    return vc.validate.validate({
+                            sellParkingSpaceFeeInfo:vc.component.sellParkingSpaceFeeInfo
+                        },{
+                            'sellParkingSpaceFeeInfo.receivedAmount':[
+                                {
+                                    limit:"required",
+                                    param:"",
+                                    errInfo:"实收金额不能为空"
+                                },
+                                {
+                                    limit:"money",
+                                    param:"",
+                                    errInfo:"实收金额格式错误,如3.00"
+                                }
+                            ]
+                        });
+            },
+            saveSellParkingSpaceFee:function(){
+                if(vc.component.sellParkingSpaceFeeValidate()){
+                    //侦听回传
+                    vc.emit($props.callBackComponent,$props.callBackFunction, vc.component.sellParkingSpaceFeeInfo);
+                    return ;
+                }
+            },
+            _loadFireParkingSpaceFee:function(){
+                //
+                var param = {
+                        params:{
+                            communityId:vc.getCurrentCommunity().communityId,
+                            typeCd:vc.component.sellParkingSpaceFeeInfo.typeCd
+                        }
+                    };
+                    vc.http.get(
+                        'sellParkingSpaceFee',
+                        'loadSellParkingSpaceConfigData',
+                         param,
+                         function(json,res){
+                            //vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
+                            if(res.status == 200){
+                                //关闭model
+                                var configFee = JSON.parse(json);
+                                vc.component.sellParkingSpaceFeeInfo.additionalAmount = configFee.additionalAmount;
+                                vc.component.sellParkingSpaceFeeInfo.receivedAmount = configFee.additionalAmount;
+
+                                return ;
+                            }
+                            vc.message(json);
+                         },
+                         function(errInfo,error){
+                            console.log('请求失败处理');
+
+                            vc.message(errInfo);
+                         });
+
+            }
+        }
+    });
+
+})(window.vc);

+ 58 - 0
WebService/src/main/resources/components/parkingSpacePackage/sell-parking-space-info/sellParkingSpaceInfo.html

@@ -0,0 +1,58 @@
+<div id="component">
+
+    <div class="java110_step">
+        <div id="step"></div>
+    </div>
+
+    <!-- 选择 应用信息 -->
+    <div v-if="sellParkingSpaceInfo.index == 0">
+
+        <!-- 选择停车位 -->
+        <vc:create name="viewSelectParkingSpace"
+                   callBackComponent="sellParkingSpace"
+                   callBackFunction="notify"
+        ></vc:create>
+    </div>
+    <div v-if="sellParkingSpaceInfo.index == 1">
+        <vc:create name="viewOwnerInfo"
+                   callBackListener="sellParkingSpace"
+                   callBackFunction="notify"
+        ></vc:create>
+    </div>
+    <div v-if="sellParkingSpaceInfo.index == 2">
+        <vc:create name="addCar"
+                   callBackComponent="sellParkingSpace"
+                   callBackFunction="notify"
+        >
+
+        </vc:create>
+    </div>
+
+    <div v-if="sellParkingSpaceInfo.index == 3">
+        <vc:create name="sellParkingSpaceFee"
+                   callBackComponent="sellCar"
+                   callBackFunction="notify"
+        ></vc:create>
+    </div>
+
+
+    <div class="row">
+        <div class="col-md-10"></div>
+        <div class="col-md-2 " style="margin-bottom:10px; text-align:right">
+            <button type="button" class="btn btn-secondary" v-on:click="_prevStep()">上一步</button>
+            <button v-if="sellParkingSpaceInfo.index != 3" type="button" class="btn btn-primary"
+                    style="margin-left:10px;"
+                    v-on:click="_nextStep()">下一步
+            </button>
+            <button v-if="sellParkingSpaceInfo.index == 3" type="button" class="btn btn-primary"
+                    style="margin-left:10px;"
+                    v-on:click="_finishStep()">出售
+            </button>
+        </div>
+    </div>
+
+</div>
+
+
+
+

+ 108 - 0
WebService/src/main/resources/components/parkingSpacePackage/sell-parking-space-info/sellParkingSpaceInfo.js

@@ -0,0 +1,108 @@
+/**
+    入驻小区
+**/
+(function(vc){
+    vc.extends({
+        data:{
+            sellParkingSpaceInfo:{
+                $step:{},
+                index:0,
+                infos:[],
+            }
+        },
+        _initMethod:function(){
+            vc.component._initStep();
+        },
+
+        _initEvent:function(){
+
+           vc.on("sellParkingSpace", "notify", function(_info){
+                vc.component.sellParkingSpaceInfo.infos[vc.component.sellParkingSpaceInfo.index] = _info;
+
+                /*if(vc.component.sellParkingSpaceInfo.index == 0){
+                    vc.emit('searchRoom','listenerFloorInfo',_info);
+                }*/
+            });
+
+        },
+        methods:{
+            _initStep:function(){
+                vc.component.sellParkingSpaceInfo.$step = $("#step");
+                vc.component.sellParkingSpaceInfo.$step.step({
+                    index: 0,
+                    time: 500,
+                    title: ["选择车位","业主信息","车辆信息","收费信息"]
+                });
+                vc.component.sellParkingSpaceInfo.index = vc.component.sellParkingSpaceInfo.$step.getIndex();
+            },
+            _prevStep:function(){
+                vc.component.sellParkingSpaceInfo.$step.prevStep();
+                vc.component.sellParkingSpaceInfo.index = vc.component.sellParkingSpaceInfo.$step.getIndex();
+
+                vc.emit('viewSelectParkingSpace', 'onIndex', vc.component.sellParkingSpaceInfo.index);
+                vc.emit('viewOwnerInfo', 'onIndex', vc.component.sellParkingSpaceInfo.index);
+                vc.emit('addCar', 'onIndex', vc.component.sellParkingSpaceInfo.index);
+                vc.emit('parkingSpaceFee', 'onIndex', vc.component.sellParkingSpaceInfo.index);
+
+                if(vc.component.sellParkingSpaceInfo.index == 1){
+                    vc.emit('viewOwnerInfo','callBackOwnerInfo',{});
+                }
+
+            },
+            _nextStep:function(){
+                var _currentData = vc.component.sellParkingSpaceInfo.infos[vc.component.sellParkingSpaceInfo.index];
+                if( _currentData == null || _currentData == undefined){
+                    vc.message("请选择或填写必选信息");
+                    return ;
+                }
+                vc.component.sellParkingSpaceInfo.$step.nextStep();
+                vc.component.sellParkingSpaceInfo.index = vc.component.sellParkingSpaceInfo.$step.getIndex();
+
+                vc.emit('viewSelectParkingSpace', 'onIndex', vc.component.sellParkingSpaceInfo.index);
+                vc.emit('viewOwnerInfo', 'onIndex', vc.component.sellParkingSpaceInfo.index);
+                vc.emit('addCar', 'onIndex', vc.component.sellParkingSpaceInfo.index);
+                vc.emit('parkingSpaceFee', 'onIndex', vc.component.sellParkingSpaceInfo.index);
+                if(vc.component.sellParkingSpaceInfo.index == 1){
+                    vc.emit('viewOwnerInfo','callBackOwnerInfo',{});
+                }
+
+            },
+            _finishStep:function(){
+
+
+                var _currentData = vc.component.sellParkingSpaceInfo.infos[vc.component.sellParkingSpaceInfo.index];
+                if( _currentData == null || _currentData == undefined){
+                    vc.message("请选择或填写必选信息");
+                    return ;
+                }
+
+                var param = {
+                    communityId:vc.getCurrentCommunity().communityId,
+                    data:vc.component.sellParkingSpaceInfo.infos
+                }
+
+               vc.http.post(
+                   'sellParkingSpace',
+                   'sell',
+                   JSON.stringify(param),
+                   {
+                       emulateJSON:true
+                    },
+                    function(json,res){
+                       //vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
+                       if(res.status == 200){
+                           //关闭model
+                           vc.jumpToPage("/flow/ownerParkingSpaceFlow?" + vc.objToGetParam(JSON.parse(json)));
+                           return ;
+                       }
+                       vc.message(json);
+                    },
+                    function(errInfo,error){
+                       console.log('请求失败处理');
+
+                       vc.message(errInfo);
+                    });
+            }
+        }
+    });
+})(window.vc);

+ 3 - 1
WebService/src/main/resources/views/sellOwnerCarFlow.html

@@ -7,6 +7,8 @@
     <meta charset="UTF-8"/>
     <title>车位出售|java110</title>
     <vc:create name="commonTop"></vc:create>
+    <link href="/css/jquery.step.css" rel="stylesheet"/>
+    <script src="/js/jquery.step.min.js" ></script>
 </head>
 <body>
 <vc:create name="bodyTop"></vc:create>
@@ -23,7 +25,7 @@
         </div>
         <!-- id="component" -->
         <div class="wrapper wrapper-content animated fadeInRight">
-            <vc:create name="sellCar"></vc:create>
+            <vc:create name="sellParkingSpace"></vc:create>
         </div>
 
         <vc:create name="copyright"></vc:create>