From d752295f6e3fdb77822dc960c6621a5d2c6ea931 Mon Sep 17 00:00:00 2001 From: java110 <928255095@qq.com> Date: Mon, 16 Nov 2020 19:18:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../storeOrderCartManage.html | 2 + .../storeOrderCartManage.js | 3 +- .../storeOrderCartDetail.html | 119 ++++++++++++++ .../storeOrderCartDetail.js | 147 ++++++++++++++++++ 4 files changed, 269 insertions(+), 2 deletions(-) create mode 100644 public/pages/goods/storeOrderCartDetail/storeOrderCartDetail.html create mode 100644 public/pages/goods/storeOrderCartDetail/storeOrderCartDetail.js diff --git a/public/pages/admin/storeOrderCartManage/storeOrderCartManage.html b/public/pages/admin/storeOrderCartManage/storeOrderCartManage.html index 7cbdfc38a..2c884733b 100644 --- a/public/pages/admin/storeOrderCartManage/storeOrderCartManage.html +++ b/public/pages/admin/storeOrderCartManage/storeOrderCartManage.html @@ -66,6 +66,7 @@ 订单号 商品名称 商品规格 + 数量 用户名称 支付金额 订单状态 @@ -78,6 +79,7 @@ {{order.cartId}} {{order.prodName}} {{order.specValue}} + {{order.cartNum}} {{order.personName}} {{order.payPrice}} {{order.stateName}} diff --git a/public/pages/admin/storeOrderCartManage/storeOrderCartManage.js b/public/pages/admin/storeOrderCartManage/storeOrderCartManage.js index e8209074e..7c2cd0f28 100644 --- a/public/pages/admin/storeOrderCartManage/storeOrderCartManage.js +++ b/public/pages/admin/storeOrderCartManage/storeOrderCartManage.js @@ -68,8 +68,7 @@ vc.component._listOrders(DEFAULT_PAGE, DEFAULT_ROWS); }, _openOrderDetailModel:function(_order){ - vc.component.storeOrderCartManageInfo.orderDetail = true; - vc.emit('orderDetailManage','listOrderDetails',_order.cBusiness); + vc.jumpToPage('/admin.html#/pages/goods/storeOrderCartDetail?orderId='+_order.orderId+'&cartId='+_order.cartId); } } }); diff --git a/public/pages/goods/storeOrderCartDetail/storeOrderCartDetail.html b/public/pages/goods/storeOrderCartDetail/storeOrderCartDetail.html new file mode 100644 index 000000000..916991e9a --- /dev/null +++ b/public/pages/goods/storeOrderCartDetail/storeOrderCartDetail.html @@ -0,0 +1,119 @@ +
+
+
+
+
+
订单详情
+
+ +
+
+
+
+
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+
+
+
+
+
+ +
+
+
+
+
收货人信息
+
+ +
+
+
+
+
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
\ No newline at end of file diff --git a/public/pages/goods/storeOrderCartDetail/storeOrderCartDetail.js b/public/pages/goods/storeOrderCartDetail/storeOrderCartDetail.js new file mode 100644 index 000000000..ffc5fd960 --- /dev/null +++ b/public/pages/goods/storeOrderCartDetail/storeOrderCartDetail.js @@ -0,0 +1,147 @@ +(function (vc) { + + vc.extends({ + data: { + storeOrderCartDetailInfo: { + cartId: '', + repairType: '', + repairTypeName: '', + repairName: '', + tel: '', + roomId: '', + roomName: '', + repairObjName: '', + appointmentTime: '', + context: '', + stateName: '', + roomId: '', + userId: '', + userName: '', + repairUsers: [], + photos: [] + + + } + }, + _initMethod: function () { + let cartId = vc.getParam('cartId'); + + if (!vc.notNull(cartId)) { + vc.toast('非法操作'); + vc.getBack(); + return; + } + $that.storeOrderCartDetailInfo.cartId = cartId; + $that._listRepairPools() + + }, + _initEvent: function () { + + }, + methods: { + _getRoom: function () { + var param = { + params: { + roomId: vc.component.storeOrderCartDetailInfo.roomId, + communityId: vc.getCurrentCommunity().communityId, + page: 1, + row: 1 + } + }; + //查询房屋信息 业主信息 + vc.http.get('ownerRepairManage', + 'getRoom', + param, + function (json, res) { + if (res.status == 200) { + var _roomInfos = JSON.parse(json); + if (!_roomInfos.hasOwnProperty("rooms")) { + vc.toast("非法操作,未找到房屋信息"); + //vc.jumpToPage('/admin.html#/listOwner'); + return; + } + var _roomInfo = _roomInfos.rooms[0]; + vc.component.storeOrderCartDetailInfo.roomName = _roomInfo.floorNum + "号楼 " + _roomInfo.unitNum + "单元 " + _roomInfo.roomNum + "室"; + } else { + vc.toast("非法操作,未找到房屋信息"); + } + }, function (errInfo, error) { + console.log('请求失败处理'); + vc.toast("非法操作,未找到房屋信息"); + + } + ); + }, + _listRepairPools: function () { + var param = { + params: { + page: 1, + row: 1, + communityId: vc.getCurrentCommunity().communityId, + repairId: $that.storeOrderCartDetailInfo.repairId + } + }; + + //发送get请求 + vc.http.get('ownerRepairManage', + 'list', + param, + function (json, res) { + var _repairPoolManageInfo = JSON.parse(json); + let _repairs = _repairPoolManageInfo.data; + if (_repairs.length < 1) { + vc.toast("数据异常"); + vc.jumpToPage('/admin.html#/pages/property/repairPoolManage'); + + return; + + } + + vc.copyObject(_repairs[0], $that.storeOrderCartDetailInfo); + + + + //查询房屋信息 + //vc.component._getRoom(); + + //查询处理轨迹 + $that._loadRepairUser(); + + }, function (errInfo, error) { + console.log('请求失败处理'); + } + ); + }, + _loadRepairUser: function () { + var param = { + params: { + page: 1, + row: 100, + communityId: vc.getCurrentCommunity().communityId, + repairId: $that.storeOrderCartDetailInfo.repairId + } + }; + //发送get请求 + vc.http.apiGet('ownerRepair.listRepairStaffs', + param, + function (json, res) { + var _repairPoolManageInfo = JSON.parse(json); + let _repairs = _repairPoolManageInfo.data; + $that.storeOrderCartDetailInfo.repairUsers = _repairs; + }, function (errInfo, error) { + console.log('请求失败处理'); + } + ); + }, + _goBack: function () { + vc.goBack() + }, + openFile:function(_photo){ + vc.emit('viewImage','showImage',{ + url:_photo.url + }); + } + } + }); + +})(window.vc);