Commit 12d0046c3997d36ca093d1eb3cde484d20b1f8bd
1 parent
c3360b89
feat: 新增清运派单新增应用用户管理
Showing
13 changed files
with
1117 additions
and
78 deletions
trash-garbage/src/main/java/com/trash/garbage/controller/GarbageOrderController.java
| 1 | 1 | package com.trash.garbage.controller; |
| 2 | 2 | |
| 3 | 3 | |
| 4 | +import com.github.pagehelper.PageHelper; | |
| 5 | +import com.trash.common.annotation.Log; | |
| 4 | 6 | import com.trash.common.config.trashConfig; |
| 7 | +import com.trash.common.core.domain.AjaxResult; | |
| 8 | +import com.trash.common.core.page.PageDomain; | |
| 9 | +import com.trash.common.core.page.TableSupport; | |
| 10 | +import com.trash.common.enums.BusinessType; | |
| 11 | +import com.trash.common.utils.StringUtils; | |
| 5 | 12 | import com.trash.common.utils.file.FileUploadUtils; |
| 13 | +import com.trash.common.utils.poi.ExcelUtil; | |
| 14 | +import com.trash.common.utils.sql.SqlUtil; | |
| 6 | 15 | import com.trash.framework.config.ServerConfig; |
| 7 | 16 | import com.trash.garbage.custom.BizException; |
| 8 | 17 | import com.trash.garbage.global.Result; |
| 9 | 18 | import com.trash.garbage.global.ResultCode; |
| 10 | -import com.trash.garbage.pojo.dto.EvaluateDto; | |
| 11 | -import com.trash.garbage.pojo.dto.OrderDto; | |
| 12 | -import com.trash.garbage.pojo.dto.OrderUpdateDto; | |
| 13 | -import com.trash.garbage.pojo.dto.UploadDto; | |
| 19 | +import com.trash.garbage.pojo.domain.GarOrder; | |
| 20 | +import com.trash.garbage.pojo.dto.*; | |
| 14 | 21 | import com.trash.garbage.pojo.vo.OrderDetailVo; |
| 15 | 22 | import com.trash.garbage.service.GarOrderService; |
| 16 | 23 | import org.springframework.beans.factory.annotation.Autowired; |
| 24 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 17 | 25 | import org.springframework.validation.annotation.Validated; |
| 18 | 26 | import org.springframework.web.bind.annotation.*; |
| 19 | 27 | import org.springframework.web.multipart.MultipartFile; |
| 20 | 28 | |
| 21 | 29 | import java.io.IOException; |
| 22 | 30 | import java.util.HashMap; |
| 31 | +import java.util.List; | |
| 23 | 32 | import java.util.Map; |
| 24 | 33 | |
| 25 | 34 | /** |
| ... | ... | @@ -84,4 +93,38 @@ public class GarbageOrderController { |
| 84 | 93 | return Result.OK(garOrderService.uploadImageUrlByType(dto)); |
| 85 | 94 | } |
| 86 | 95 | |
| 96 | + /** | |
| 97 | + * 导出清运派单列表 | |
| 98 | + */ | |
| 99 | + @PreAuthorize("@ss.hasPermi('garbage:order:export')") | |
| 100 | + @Log(title = "清运派单", businessType = BusinessType.EXPORT) | |
| 101 | + @GetMapping("/export") | |
| 102 | + public AjaxResult export(GarOrder garOrder) { | |
| 103 | + List<GarOrder> list = garOrderService.queryOrderListByGarOrder(garOrder); | |
| 104 | + ExcelUtil<GarOrder> util = new ExcelUtil<GarOrder>(GarOrder.class); | |
| 105 | + return util.exportExcel(list, "order"); | |
| 106 | + } | |
| 107 | + | |
| 108 | + @GetMapping("list") | |
| 109 | + public Result<?> queryOrderList(OrderWebDto dto) { | |
| 110 | + startPage(); | |
| 111 | + return Result.OK(garOrderService.queryOrderListByGarOrderPage(dto)); | |
| 112 | + } | |
| 113 | + | |
| 114 | + | |
| 115 | + @GetMapping("/webDetail/{id}") | |
| 116 | + public Result<OrderDetailVo> queryOrderWebDetail(@PathVariable("id") String id) { | |
| 117 | + return Result.OK(garOrderService.queryOrderWebDetail(id)); | |
| 118 | + } | |
| 119 | + | |
| 120 | + protected void startPage() { | |
| 121 | + PageDomain pageDomain = TableSupport.buildPageRequest(); | |
| 122 | + Integer pageNum = pageDomain.getPageNum(); | |
| 123 | + Integer pageSize = pageDomain.getPageSize(); | |
| 124 | + if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)) { | |
| 125 | + String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy()); | |
| 126 | + PageHelper.startPage(pageNum, pageSize, orderBy); | |
| 127 | + } | |
| 128 | + } | |
| 129 | + | |
| 87 | 130 | } | ... | ... |
trash-garbage/src/main/java/com/trash/garbage/controller/GarbageUserController.java
| 1 | 1 | package com.trash.garbage.controller; |
| 2 | 2 | |
| 3 | 3 | |
| 4 | +import com.github.pagehelper.PageHelper; | |
| 5 | +import com.trash.common.annotation.Log; | |
| 6 | +import com.trash.common.core.domain.AjaxResult; | |
| 7 | +import com.trash.common.core.page.PageDomain; | |
| 8 | +import com.trash.common.core.page.TableSupport; | |
| 9 | +import com.trash.common.enums.BusinessType; | |
| 10 | +import com.trash.common.utils.StringUtils; | |
| 11 | +import com.trash.common.utils.poi.ExcelUtil; | |
| 12 | +import com.trash.common.utils.sql.SqlUtil; | |
| 4 | 13 | import com.trash.garbage.global.Result; |
| 5 | 14 | import com.trash.garbage.pojo.domain.GarAddress; |
| 6 | 15 | import com.trash.garbage.pojo.domain.GarUser; |
| ... | ... | @@ -8,7 +17,7 @@ import com.trash.garbage.pojo.dto.AddressDto; |
| 8 | 17 | import com.trash.garbage.pojo.dto.LoginDto; |
| 9 | 18 | import com.trash.garbage.service.GarUserService; |
| 10 | 19 | import org.springframework.beans.factory.annotation.Autowired; |
| 11 | -import org.springframework.http.HttpRequest; | |
| 20 | +import org.springframework.security.access.prepost.PreAuthorize; | |
| 12 | 21 | import org.springframework.validation.annotation.Validated; |
| 13 | 22 | import org.springframework.web.bind.annotation.*; |
| 14 | 23 | |
| ... | ... | @@ -87,5 +96,49 @@ public class GarbageUserController { |
| 87 | 96 | return Result.OK(); |
| 88 | 97 | } |
| 89 | 98 | |
| 99 | + @PreAuthorize("@ss.hasPermi('GarUser:GarUser:list')") | |
| 100 | + @GetMapping("/list") | |
| 101 | + public Result<?> list(GarUser garUser) { | |
| 102 | + startPage(); | |
| 103 | + return Result.OK(garUserService.queryListByUserPages(garUser)); | |
| 104 | + } | |
| 105 | + | |
| 106 | + protected void startPage() { | |
| 107 | + PageDomain pageDomain = TableSupport.buildPageRequest(); | |
| 108 | + Integer pageNum = pageDomain.getPageNum(); | |
| 109 | + Integer pageSize = pageDomain.getPageSize(); | |
| 110 | + if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)) { | |
| 111 | + String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy()); | |
| 112 | + PageHelper.startPage(pageNum, pageSize, orderBy); | |
| 113 | + } | |
| 114 | + } | |
| 115 | + | |
| 116 | + /** | |
| 117 | + * 导出建筑垃圾-用户列表 | |
| 118 | + */ | |
| 119 | + @PreAuthorize("@ss.hasPermi('GarUser:GarUser:export')") | |
| 120 | + @Log(title = "建筑垃圾-用户", businessType = BusinessType.EXPORT) | |
| 121 | + @GetMapping("/export") | |
| 122 | + public AjaxResult export(GarUser garUser) { | |
| 123 | + List<GarUser> list = garUserService.queryListByUser(garUser); | |
| 124 | + ExcelUtil<GarUser> util = new ExcelUtil<GarUser>(GarUser.class); | |
| 125 | + return util.exportExcel(list, "GarUser"); | |
| 126 | + } | |
| 127 | + | |
| 128 | + /** | |
| 129 | + * 获取建筑垃圾-用户详细信息 | |
| 130 | + */ | |
| 131 | + @PreAuthorize("@ss.hasPermi('GarUser:GarUser:query')") | |
| 132 | + @GetMapping(value = "/{garUserId}") | |
| 133 | + public Result<?> getInfo(@PathVariable("garUserId") String garUserId) { | |
| 134 | + return Result.OK(garUserService.getById(garUserId)); | |
| 135 | + } | |
| 136 | + | |
| 137 | + @PostMapping | |
| 138 | + public AjaxResult addGarUser(GarUser garUser) { | |
| 139 | + List<GarUser> list = garUserService.queryListByUser(garUser); | |
| 140 | + ExcelUtil<GarUser> util = new ExcelUtil<GarUser>(GarUser.class); | |
| 141 | + return util.exportExcel(list, "GarUser"); | |
| 142 | + } | |
| 90 | 143 | |
| 91 | 144 | } | ... | ... |
trash-garbage/src/main/java/com/trash/garbage/pojo/dto/OrderWebDto.java
0 → 100644
| 1 | +package com.trash.garbage.pojo.dto; | |
| 2 | + | |
| 3 | +import lombok.ToString; | |
| 4 | + | |
| 5 | +import javax.validation.constraints.NotEmpty; | |
| 6 | + | |
| 7 | +@ToString | |
| 8 | +public class OrderWebDto { | |
| 9 | + /** | |
| 10 | + * 公司名称 | |
| 11 | + */ | |
| 12 | + @NotEmpty(message = "公司名称不能为空") | |
| 13 | + private String garOrderCompanyName; | |
| 14 | + | |
| 15 | + /** | |
| 16 | + * 取消订单 | |
| 17 | + */ | |
| 18 | + private Integer garCancelFlag; | |
| 19 | + private Integer garOrderHandlerStatus; | |
| 20 | + | |
| 21 | + public String getGarOrderCompanyName() { | |
| 22 | + return garOrderCompanyName; | |
| 23 | + } | |
| 24 | + | |
| 25 | + public void setGarOrderCompanyName(String garOrderCompanyName) { | |
| 26 | + this.garOrderCompanyName = garOrderCompanyName; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public Integer getGarCancelFlag() { | |
| 30 | + return garCancelFlag; | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void setGarCancelFlag(Integer garCancelFlag) { | |
| 34 | + this.garCancelFlag = garCancelFlag; | |
| 35 | + } | |
| 36 | + | |
| 37 | + public Integer getGarOrderHandlerStatus() { | |
| 38 | + return garOrderHandlerStatus; | |
| 39 | + } | |
| 40 | + | |
| 41 | + public void setGarOrderHandlerStatus(Integer garOrderHandlerStatus) { | |
| 42 | + this.garOrderHandlerStatus = garOrderHandlerStatus; | |
| 43 | + } | |
| 44 | +} | ... | ... |
trash-garbage/src/main/java/com/trash/garbage/service/GarOrderService.java
| ... | ... | @@ -3,10 +3,7 @@ package com.trash.garbage.service; |
| 3 | 3 | import com.baomidou.mybatisplus.extension.service.IService; |
| 4 | 4 | import com.github.pagehelper.PageInfo; |
| 5 | 5 | import com.trash.garbage.pojo.domain.GarOrder; |
| 6 | -import com.trash.garbage.pojo.dto.EvaluateDto; | |
| 7 | -import com.trash.garbage.pojo.dto.OrderDto; | |
| 8 | -import com.trash.garbage.pojo.dto.OrderUpdateDto; | |
| 9 | -import com.trash.garbage.pojo.dto.UploadDto; | |
| 6 | +import com.trash.garbage.pojo.dto.*; | |
| 10 | 7 | import com.trash.garbage.pojo.vo.OrderDetailVo; |
| 11 | 8 | |
| 12 | 9 | import java.util.List; |
| ... | ... | @@ -57,4 +54,10 @@ public interface GarOrderService extends IService<GarOrder> { |
| 57 | 54 | String uploadImageUrlByType(UploadDto dto); |
| 58 | 55 | |
| 59 | 56 | String evaluateOrder(EvaluateDto dto); |
| 57 | + | |
| 58 | + List<GarOrder> queryOrderListByGarOrder(GarOrder garOrder); | |
| 59 | + | |
| 60 | + PageInfo queryOrderListByGarOrderPage(OrderWebDto dto); | |
| 61 | + | |
| 62 | + OrderDetailVo queryOrderWebDetail(String id); | |
| 60 | 63 | } | ... | ... |
trash-garbage/src/main/java/com/trash/garbage/service/GarUserService.java
| 1 | 1 | package com.trash.garbage.service; |
| 2 | 2 | |
| 3 | 3 | import com.aliyuncs.exceptions.ClientException; |
| 4 | +import com.github.pagehelper.PageInfo; | |
| 4 | 5 | import com.trash.garbage.pojo.domain.GarAddress; |
| 5 | 6 | import com.trash.garbage.pojo.domain.GarUser; |
| 6 | 7 | import com.baomidou.mybatisplus.extension.service.IService; |
| 7 | 8 | import com.trash.garbage.pojo.dto.AddressDto; |
| 8 | 9 | import com.trash.garbage.pojo.dto.LoginDto; |
| 9 | -import org.springframework.http.HttpRequest; | |
| 10 | 10 | |
| 11 | 11 | import javax.servlet.http.HttpServletRequest; |
| 12 | 12 | import java.util.List; |
| ... | ... | @@ -33,4 +33,8 @@ public interface GarUserService extends IService<GarUser> { |
| 33 | 33 | void updateUserInfo(GarUser user); |
| 34 | 34 | |
| 35 | 35 | String logout(HttpServletRequest request); |
| 36 | + | |
| 37 | + PageInfo queryListByUserPages(GarUser garUser); | |
| 38 | + | |
| 39 | + List<GarUser> queryListByUser(GarUser garUser); | |
| 36 | 40 | } | ... | ... |
trash-garbage/src/main/java/com/trash/garbage/service/impl/GarOrderServiceImpl.java
| ... | ... | @@ -3,10 +3,12 @@ package com.trash.garbage.service.impl; |
| 3 | 3 | import java.util.ArrayList; |
| 4 | 4 | import java.util.Collections; |
| 5 | 5 | import java.util.List; |
| 6 | +import java.util.Objects; | |
| 6 | 7 | |
| 7 | -import com.trash.common.utils.StringUtils; | |
| 8 | 8 | import com.trash.enterprise.domain.TransportationEnterprise; |
| 9 | 9 | import com.trash.enterprise.service.ITransportationEnterpriseService; |
| 10 | +import com.trash.garbage.pojo.dto.*; | |
| 11 | +import org.apache.commons.lang3.StringUtils; | |
| 10 | 12 | import org.springframework.beans.factory.annotation.Autowired; |
| 11 | 13 | import org.springframework.stereotype.Service; |
| 12 | 14 | import org.springframework.transaction.annotation.Transactional; |
| ... | ... | @@ -26,10 +28,6 @@ import com.trash.garbage.pojo.domain.GarOrder; |
| 26 | 28 | import com.trash.garbage.pojo.domain.GarOrderEvaluate; |
| 27 | 29 | import com.trash.garbage.pojo.domain.GarOrderImage; |
| 28 | 30 | import com.trash.garbage.pojo.domain.GarUser; |
| 29 | -import com.trash.garbage.pojo.dto.EvaluateDto; | |
| 30 | -import com.trash.garbage.pojo.dto.OrderDto; | |
| 31 | -import com.trash.garbage.pojo.dto.OrderUpdateDto; | |
| 32 | -import com.trash.garbage.pojo.dto.UploadDto; | |
| 33 | 31 | import com.trash.garbage.pojo.vo.OrderDetailVo; |
| 34 | 32 | import com.trash.garbage.service.GarOrderEvaluateService; |
| 35 | 33 | import com.trash.garbage.service.GarOrderImageService; |
| ... | ... | @@ -265,6 +263,64 @@ public class GarOrderServiceImpl extends ServiceImpl<GarOrderMapper, GarOrder> |
| 265 | 263 | return "已评价"; |
| 266 | 264 | } |
| 267 | 265 | |
| 266 | + @Override | |
| 267 | + public List<GarOrder> queryOrderListByGarOrder(GarOrder garOrder) { | |
| 268 | + LambdaQueryWrapper<GarOrder> qw = createQueryWrapper(garOrder); | |
| 269 | + return list(qw); | |
| 270 | + } | |
| 271 | + | |
| 272 | + private LambdaQueryWrapper<GarOrder> createQueryWrapper(GarOrder garOrder) { | |
| 273 | + return new LambdaQueryWrapper<GarOrder>() | |
| 274 | + .eq(StringUtils.isNotEmpty(garOrder.getGarOrderAddress()), GarOrder::getGarOrderAddress, garOrder.getGarOrderAddress()) | |
| 275 | + .eq(!Objects.isNull(garOrder.getGarCancelFlag()), GarOrder::getGarCancelFlag, garOrder.getGarCancelFlag()) | |
| 276 | + .eq(!Objects.isNull(garOrder.getGarOrderHandlerStatus()), GarOrder::getGarOrderHandlerStatus, garOrder.getGarOrderHandlerStatus()) | |
| 277 | + .eq(!Objects.isNull(garOrder.getGarEvaluateFlag()), GarOrder::getGarEvaluateFlag, garOrder.getGarEvaluateFlag()); | |
| 278 | + } | |
| 279 | + | |
| 280 | + @Override | |
| 281 | + public PageInfo queryOrderListByGarOrderPage(OrderWebDto dto) { | |
| 282 | + LambdaQueryWrapper<GarOrder> qw = new LambdaQueryWrapper<>(); | |
| 283 | + qw.eq(StringUtils.isNotEmpty(dto.getGarOrderCompanyName()), GarOrder::getGarOrderCompanyName, dto.getGarOrderCompanyName()) | |
| 284 | + .eq(dto.getGarOrderHandlerStatus() != null, GarOrder::getGarOrderHandlerStatus, dto.getGarOrderHandlerStatus()) | |
| 285 | + .eq(dto.getGarCancelFlag() != null, GarOrder::getGarCancelFlag, dto.getGarCancelFlag()); | |
| 286 | + List<GarOrder> list = list(qw); | |
| 287 | + PageInfo<GarOrder> pageInfo = new PageInfo<>(list); | |
| 288 | + return pageInfo; | |
| 289 | + } | |
| 290 | + | |
| 291 | + @Override | |
| 292 | + public OrderDetailVo queryOrderWebDetail(String id) { | |
| 293 | + GarOrder order = this.getById(id); | |
| 294 | + LambdaQueryWrapper<GarOrderImage> qwi = new LambdaQueryWrapper<>(); | |
| 295 | + qwi.eq(GarOrderImage::getGarOrderId, id); | |
| 296 | + OrderDetailVo vo = new OrderDetailVo(); | |
| 297 | + List<DriverVo> driverVos = null; | |
| 298 | + BeanUtils.copyBeanProp(vo, order); | |
| 299 | + List<GarOrderImage> imageList = garOrderImageService.list(qwi); | |
| 300 | + for (GarOrderImage image : imageList) { | |
| 301 | + if (GlobalStatus.GarOrderStatus.CANCEL_FLAG_NO.getValue().equals(image.getGarOrderImageType())) { | |
| 302 | + vo.getCurrentImages().add(image.getGarOrderImageUrl()); | |
| 303 | + } | |
| 304 | + if (GlobalStatus.GarOrderStatus.IMAGE_TYPE_PUT_ON.getValue().equals(image.getGarOrderImageType())) { | |
| 305 | + vo.getPutOnImages().add(image.getGarOrderImageUrl()); | |
| 306 | + } | |
| 307 | + if (GlobalStatus.GarOrderStatus.IMAGE_TYPE_PUT_DOWN.getValue().equals(image.getGarOrderImageType())) { | |
| 308 | + vo.getPutDownImages().add(image.getGarOrderImageUrl()); | |
| 309 | + } | |
| 310 | + } | |
| 311 | + if (StringUtils.isNotEmpty(vo.getGarOrderHandlerId())) { | |
| 312 | + GarUser handleUser = garUserService.getById(vo.getGarOrderHandlerId()); | |
| 313 | + DriverVo driverVo = new DriverVo(); | |
| 314 | + driverVo.setPhoneNo(handleUser.getGarUserTel()); | |
| 315 | + driverVos = driverService.selectDriverList(driverVo); | |
| 316 | + if (CollectionUtil.isNotEmpty(driverVos)) { | |
| 317 | + vo.setGarOrderHandleName(driverVos.get(0).getName()); | |
| 318 | + vo.setGarOrderHandleTel(driverVos.get(0).getPhoneNo()); | |
| 319 | + } | |
| 320 | + } | |
| 321 | + return vo; | |
| 322 | + } | |
| 323 | + | |
| 268 | 324 | private void evaluate(EvaluateDto dto, GarOrder order, GarUser user) { |
| 269 | 325 | GarOrderEvaluate evaluate = new GarOrderEvaluate(); |
| 270 | 326 | evaluate.setGarOrderId(order.getGarOrderId()); | ... | ... |
trash-garbage/src/main/java/com/trash/garbage/service/impl/GarUserServiceImpl.java
| ... | ... | @@ -7,11 +7,14 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| 7 | 7 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| 8 | 8 | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| 9 | 9 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| 10 | +import com.github.pagehelper.PageHelper; | |
| 11 | +import com.github.pagehelper.PageInfo; | |
| 10 | 12 | import com.trash.common.core.domain.entity.SysRole; |
| 11 | 13 | import com.trash.common.core.domain.entity.SysUser; |
| 12 | 14 | import com.trash.common.core.domain.model.LoginUser; |
| 13 | 15 | import com.trash.common.core.redis.RedisCache; |
| 14 | 16 | import com.trash.common.utils.SecurityUtils; |
| 17 | +import com.trash.common.utils.StringUtils; | |
| 15 | 18 | import com.trash.framework.web.service.TokenService; |
| 16 | 19 | import com.trash.garbage.config.WxConfig; |
| 17 | 20 | import com.trash.garbage.custom.BizException; |
| ... | ... | @@ -224,6 +227,30 @@ public class GarUserServiceImpl extends ServiceImpl<GarUserMapper, GarUser> |
| 224 | 227 | return "退出登录"; |
| 225 | 228 | } |
| 226 | 229 | |
| 230 | + @Override | |
| 231 | + public PageInfo queryListByUserPages(GarUser garUser) { | |
| 232 | + LambdaQueryWrapper<GarUser> qw = createQueryWrapperByUser(garUser); | |
| 233 | + List<GarUser> userList = list(qw); | |
| 234 | + PageInfo<GarUser> pageInfo = new PageInfo<>(userList); | |
| 235 | + return pageInfo; | |
| 236 | + } | |
| 237 | + | |
| 238 | + @Override | |
| 239 | + public List<GarUser> queryListByUser(GarUser garUser) { | |
| 240 | + LambdaQueryWrapper<GarUser> qw = createQueryWrapperByUser(garUser); | |
| 241 | + return list(qw); | |
| 242 | + } | |
| 243 | + | |
| 244 | + private LambdaQueryWrapper<GarUser> createQueryWrapperByUser(GarUser garUser) { | |
| 245 | + return new LambdaQueryWrapper<GarUser>() | |
| 246 | + .eq(StringUtils.isNotEmpty(garUser.getGarUserId()), GarUser::getGarUserId, garUser.getGarUserId()) | |
| 247 | + .eq(StringUtils.isNotEmpty(garUser.getGarUserType()), GarUser::getGarUserType, garUser.getGarUserType()) | |
| 248 | + .eq(StringUtils.isNotEmpty(garUser.getGarUserName()), GarUser::getGarUserName, garUser.getGarUserName()) | |
| 249 | + .eq(StringUtils.isNotEmpty(garUser.getGarUserTel()), GarUser::getGarUserTel, garUser.getGarUserTel()) | |
| 250 | + .eq(StringUtils.isNotEmpty(garUser.getGarRemark()), GarUser::getGarRemark, garUser.getGarRemark()); | |
| 251 | + | |
| 252 | + } | |
| 253 | + | |
| 227 | 254 | |
| 228 | 255 | /** |
| 229 | 256 | * 微信小程序解密 |
| ... | ... | @@ -246,39 +273,38 @@ public class GarUserServiceImpl extends ServiceImpl<GarUserMapper, GarUser> |
| 246 | 273 | return new String(cipher.doFinal(encrypData), "UTF-8"); |
| 247 | 274 | } |
| 248 | 275 | |
| 249 | - public WxConfig getWxConfig() { | |
| 250 | - return wxConfig; | |
| 251 | - } | |
| 276 | + public WxConfig getWxConfig() { | |
| 277 | + return wxConfig; | |
| 278 | + } | |
| 252 | 279 | |
| 253 | - public void setWxConfig(WxConfig wxConfig) { | |
| 254 | - this.wxConfig = wxConfig; | |
| 255 | - } | |
| 280 | + public void setWxConfig(WxConfig wxConfig) { | |
| 281 | + this.wxConfig = wxConfig; | |
| 282 | + } | |
| 256 | 283 | |
| 257 | - public GarAddressService getGarAddressService() { | |
| 258 | - return garAddressService; | |
| 259 | - } | |
| 284 | + public GarAddressService getGarAddressService() { | |
| 285 | + return garAddressService; | |
| 286 | + } | |
| 260 | 287 | |
| 261 | - public void setGarAddressService(GarAddressService garAddressService) { | |
| 262 | - this.garAddressService = garAddressService; | |
| 263 | - } | |
| 288 | + public void setGarAddressService(GarAddressService garAddressService) { | |
| 289 | + this.garAddressService = garAddressService; | |
| 290 | + } | |
| 264 | 291 | |
| 265 | - public RedisCache getRedisCache() { | |
| 266 | - return redisCache; | |
| 267 | - } | |
| 292 | + public RedisCache getRedisCache() { | |
| 293 | + return redisCache; | |
| 294 | + } | |
| 268 | 295 | |
| 269 | - public void setRedisCache(RedisCache redisCache) { | |
| 270 | - this.redisCache = redisCache; | |
| 271 | - } | |
| 296 | + public void setRedisCache(RedisCache redisCache) { | |
| 297 | + this.redisCache = redisCache; | |
| 298 | + } | |
| 272 | 299 | |
| 273 | - public TokenService getTokenService() { | |
| 274 | - return tokenService; | |
| 275 | - } | |
| 300 | + public TokenService getTokenService() { | |
| 301 | + return tokenService; | |
| 302 | + } | |
| 276 | 303 | |
| 277 | - public void setTokenService(TokenService tokenService) { | |
| 278 | - this.tokenService = tokenService; | |
| 279 | - } | |
| 304 | + public void setTokenService(TokenService tokenService) { | |
| 305 | + this.tokenService = tokenService; | |
| 306 | + } | |
| 280 | 307 | |
| 281 | - | |
| 282 | 308 | |
| 283 | 309 | } |
| 284 | 310 | ... | ... |
trash-ui/src/api/gar/order.js
0 → 100644
| 1 | +import request from '@/utils/request' | |
| 2 | + | |
| 3 | +// 查询清运派单列表 | |
| 4 | +export function listOrder(query) { | |
| 5 | + return request({ | |
| 6 | + url: '/order/list', | |
| 7 | + method: 'get', | |
| 8 | + params: query | |
| 9 | + }) | |
| 10 | +} | |
| 11 | + | |
| 12 | +// 查询清运派单详细 | |
| 13 | +export function getOrder(garOrderId) { | |
| 14 | + return request({ | |
| 15 | + url: '/order/webDetail/' + garOrderId, | |
| 16 | + method: 'get' | |
| 17 | + }) | |
| 18 | +} | |
| 19 | + | |
| 20 | + | |
| 21 | +// 导出清运派单 | |
| 22 | +export function exportOrder(query) { | |
| 23 | + return request({ | |
| 24 | + url: '/order/export', | |
| 25 | + method: 'get', | |
| 26 | + params: query | |
| 27 | + }) | |
| 28 | +} | ... | ... |
trash-ui/src/api/gar/user.js
0 → 100644
| 1 | +import request from '@/utils/request' | |
| 2 | + | |
| 3 | +// 查询建筑垃圾-用户列表 | |
| 4 | +export function listGarUser(query) { | |
| 5 | + return request({ | |
| 6 | + url: '/user/list', | |
| 7 | + method: 'get', | |
| 8 | + params: query | |
| 9 | + }) | |
| 10 | +} | |
| 11 | + | |
| 12 | +// 查询建筑垃圾-用户详细 | |
| 13 | +export function getGarUser(garUserId) { | |
| 14 | + return request({ | |
| 15 | + url: '/user/' + garUserId, | |
| 16 | + method: 'get' | |
| 17 | + }) | |
| 18 | +} | |
| 19 | + | |
| 20 | +// 新增建筑垃圾-用户 | |
| 21 | +export function addGarUser(data) { | |
| 22 | + return request({ | |
| 23 | + url: '/user', | |
| 24 | + method: 'post', | |
| 25 | + data: data | |
| 26 | + }) | |
| 27 | +} | |
| 28 | + | |
| 29 | + | |
| 30 | +// 删除建筑垃圾-用户 | |
| 31 | +export function delGarUser(garUserId) { | |
| 32 | + return request({ | |
| 33 | + url: '/user/' + garUserId, | |
| 34 | + method: 'delete' | |
| 35 | + }) | |
| 36 | +} | |
| 37 | + | |
| 38 | +// 导出建筑垃圾-用户 | |
| 39 | +export function exportGarUser(query) { | |
| 40 | + return request({ | |
| 41 | + url: '/user/export', | |
| 42 | + method: 'get', | |
| 43 | + params: query | |
| 44 | + }) | |
| 45 | +} | ... | ... |
trash-ui/src/layout/index.vue
| 1 | 1 | <template> |
| 2 | - <app-main /> | |
| 2 | + <div :class="classObj" class="app-wrapper"> | |
| 3 | + <sidebar class="sidebar-container"/> | |
| 4 | + <div :class="{hasTagsView:needTagsView}" class="main-container"> | |
| 5 | + <tags-view v-if="needTagsView"/> | |
| 6 | + <app-main/> | |
| 7 | + | |
| 8 | + </div> | |
| 9 | + </div> | |
| 3 | 10 | </template> |
| 4 | 11 | |
| 5 | 12 | <script> |
| 6 | 13 | import RightPanel from '@/components/RightPanel' |
| 7 | -import { AppMain, Navbar, Settings, Sidebar, TagsView } from './components' | |
| 14 | +import {AppMain, Navbar, Settings, Sidebar, TagsView} from './components' | |
| 8 | 15 | import ResizeMixin from './mixin/ResizeHandler' |
| 9 | -import { mapState } from 'vuex' | |
| 16 | +import {mapState} from 'vuex' | |
| 10 | 17 | |
| 11 | 18 | export default { |
| 12 | 19 | name: 'Layout', |
| ... | ... | @@ -38,52 +45,63 @@ export default { |
| 38 | 45 | }, |
| 39 | 46 | methods: { |
| 40 | 47 | handleClickOutside() { |
| 41 | - this.$store.dispatch('app/closeSideBar', { withoutAnimation: false }) | |
| 48 | + this.$store.dispatch('app/closeSideBar', {withoutAnimation: false}) | |
| 42 | 49 | } |
| 43 | 50 | } |
| 44 | 51 | } |
| 45 | 52 | </script> |
| 46 | 53 | |
| 47 | 54 | <style lang="scss" scoped> |
| 48 | - @import "~@/assets/styles/mixin.scss"; | |
| 49 | - @import "~@/assets/styles/variables.scss"; | |
| 50 | - | |
| 51 | - .app-wrapper { | |
| 52 | - @include clearfix; | |
| 53 | - position: relative; | |
| 54 | - height: 100%; | |
| 55 | - width: 100%; | |
| 56 | - | |
| 57 | - &.mobile.openSidebar { | |
| 58 | - position: fixed; | |
| 59 | - top: 0; | |
| 60 | - } | |
| 61 | - } | |
| 55 | +@import "~@/assets/styles/mixin.scss"; | |
| 56 | +@import "~@/assets/styles/variables.scss"; | |
| 62 | 57 | |
| 63 | - .drawer-bg { | |
| 64 | - background: #000; | |
| 65 | - opacity: 0.3; | |
| 66 | - width: 100%; | |
| 67 | - top: 0; | |
| 68 | - height: 100%; | |
| 69 | - position: absolute; | |
| 70 | - z-index: 999; | |
| 71 | - } | |
| 58 | +.app-wrapper { | |
| 59 | + @include clearfix; | |
| 60 | + position: relative; | |
| 61 | + height: 100%; | |
| 62 | + width: 100%; | |
| 72 | 63 | |
| 73 | - .fixed-header { | |
| 64 | + &.mobile.openSidebar { | |
| 74 | 65 | position: fixed; |
| 75 | 66 | top: 0; |
| 76 | - right: 0; | |
| 77 | - z-index: 9; | |
| 78 | - width: calc(100% - #{$sideBarWidth}); | |
| 79 | - transition: width 0.28s; | |
| 80 | 67 | } |
| 68 | +} | |
| 81 | 69 | |
| 82 | - .hideSidebar .fixed-header { | |
| 83 | - width: calc(100% - 54px) | |
| 84 | - } | |
| 70 | +.drawer-bg { | |
| 71 | + background: #000; | |
| 72 | + opacity: 0.3; | |
| 73 | + width: 100%; | |
| 74 | + top: 0; | |
| 75 | + height: 100%; | |
| 76 | + position: absolute; | |
| 77 | + z-index: 999; | |
| 78 | +} | |
| 85 | 79 | |
| 86 | - .mobile .fixed-header { | |
| 87 | - width: 100%; | |
| 88 | - } | |
| 80 | +.fixed-header { | |
| 81 | + position: fixed; | |
| 82 | + top: 0; | |
| 83 | + right: 0; | |
| 84 | + z-index: 9; | |
| 85 | + width: calc(100% - #{$sideBarWidth}); | |
| 86 | + transition: width 0.28s; | |
| 87 | +} | |
| 88 | + | |
| 89 | +.hideSidebar .fixed-header { | |
| 90 | + width: calc(100% - 54px) | |
| 91 | +} | |
| 92 | + | |
| 93 | +.mobile .fixed-header { | |
| 94 | + width: 100%; | |
| 95 | +} | |
| 96 | + | |
| 97 | +.preview figure { | |
| 98 | + float: left; | |
| 99 | + width: 30%; | |
| 100 | + height:calc(30vw - 0px); | |
| 101 | + margin: 1.5%; | |
| 102 | +} | |
| 103 | + | |
| 104 | +.preview figure img { | |
| 105 | + width: 400px; | |
| 106 | +} | |
| 89 | 107 | </style> | ... | ... |
trash-ui/src/layout/index3.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <app-main /> | |
| 3 | +</template> | |
| 4 | + | |
| 5 | +<script> | |
| 6 | +import RightPanel from '@/components/RightPanel' | |
| 7 | +import { AppMain, Navbar, Settings, Sidebar, TagsView } from './components' | |
| 8 | +import ResizeMixin from './mixin/ResizeHandler' | |
| 9 | +import { mapState } from 'vuex' | |
| 10 | + | |
| 11 | +export default { | |
| 12 | + name: 'Layout', | |
| 13 | + components: { | |
| 14 | + AppMain, | |
| 15 | + Navbar, | |
| 16 | + RightPanel, | |
| 17 | + Settings, | |
| 18 | + Sidebar, | |
| 19 | + TagsView | |
| 20 | + }, | |
| 21 | + mixins: [ResizeMixin], | |
| 22 | + computed: { | |
| 23 | + ...mapState({ | |
| 24 | + sidebar: state => state.app.sidebar, | |
| 25 | + device: state => state.app.device, | |
| 26 | + showSettings: state => state.settings.showSettings, | |
| 27 | + needTagsView: state => state.settings.tagsView, | |
| 28 | + fixedHeader: state => state.settings.fixedHeader | |
| 29 | + }), | |
| 30 | + classObj() { | |
| 31 | + return { | |
| 32 | + hideSidebar: !this.sidebar.opened, | |
| 33 | + openSidebar: this.sidebar.opened, | |
| 34 | + withoutAnimation: this.sidebar.withoutAnimation, | |
| 35 | + mobile: this.device === 'mobile' | |
| 36 | + } | |
| 37 | + } | |
| 38 | + }, | |
| 39 | + methods: { | |
| 40 | + handleClickOutside() { | |
| 41 | + this.$store.dispatch('app/closeSideBar', { withoutAnimation: false }) | |
| 42 | + } | |
| 43 | + } | |
| 44 | +} | |
| 45 | +</script> | |
| 46 | + | |
| 47 | +<style lang="scss" scoped> | |
| 48 | + @import "~@/assets/styles/mixin.scss"; | |
| 49 | + @import "~@/assets/styles/variables.scss"; | |
| 50 | + | |
| 51 | + .app-wrapper { | |
| 52 | + @include clearfix; | |
| 53 | + position: relative; | |
| 54 | + height: 100%; | |
| 55 | + width: 100%; | |
| 56 | + | |
| 57 | + &.mobile.openSidebar { | |
| 58 | + position: fixed; | |
| 59 | + top: 0; | |
| 60 | + } | |
| 61 | + } | |
| 62 | + | |
| 63 | + .drawer-bg { | |
| 64 | + background: #000; | |
| 65 | + opacity: 0.3; | |
| 66 | + width: 100%; | |
| 67 | + top: 0; | |
| 68 | + height: 100%; | |
| 69 | + position: absolute; | |
| 70 | + z-index: 999; | |
| 71 | + } | |
| 72 | + | |
| 73 | + .fixed-header { | |
| 74 | + position: fixed; | |
| 75 | + top: 0; | |
| 76 | + right: 0; | |
| 77 | + z-index: 9; | |
| 78 | + width: calc(100% - #{$sideBarWidth}); | |
| 79 | + transition: width 0.28s; | |
| 80 | + } | |
| 81 | + | |
| 82 | + .hideSidebar .fixed-header { | |
| 83 | + width: calc(100% - 54px) | |
| 84 | + } | |
| 85 | + | |
| 86 | + .mobile .fixed-header { | |
| 87 | + width: 100%; | |
| 88 | + } | |
| 89 | +</style> | ... | ... |
trash-ui/src/views/gar/order/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="app-container"> | |
| 3 | + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> | |
| 4 | + | |
| 5 | + <el-form-item label="经营单位" prop="garOrderCompanyName"> | |
| 6 | + <el-input v-model="queryParams.garOrderCompanyName" placeholder="请输入经营单位" clearable size="small" | |
| 7 | + @keyup.enter.native="handleQuery" /> | |
| 8 | + </el-form-item> | |
| 9 | + <el-form-item label="处理状态" prop="garOrderHandlerStatus"> | |
| 10 | + <el-select v-model="queryParams.garOrderHandlerStatus" placeholder="请选择处理状态" clearable size="small"> | |
| 11 | + <el-option label="未处理" value="0" /> | |
| 12 | + <el-option label="处理中" value="1" /> | |
| 13 | + <el-option label="已处理" value="3" /> | |
| 14 | + </el-select> | |
| 15 | + </el-form-item> | |
| 16 | + <el-form-item label="是否取消" prop="garCancelFlag"> | |
| 17 | + <el-select v-model="queryParams.garCancelFlag" placeholder="请选择处理状态" clearable size="small"> | |
| 18 | + <el-option label="未取消" value="0" /> | |
| 19 | + <el-option label="已取消" value="1" /> | |
| 20 | + </el-select> | |
| 21 | + </el-form-item> | |
| 22 | + <el-form-item> | |
| 23 | + <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | |
| 24 | + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | |
| 25 | + </el-form-item> | |
| 26 | + </el-form> | |
| 27 | + | |
| 28 | + <el-row :gutter="10" class="mb8"> | |
| 29 | + <el-col :span="1.5"> | |
| 30 | + <el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport" | |
| 31 | + v-hasPermi="['garbage:order:export']">导出</el-button> | |
| 32 | + </el-col> | |
| 33 | + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> | |
| 34 | + </el-row> | |
| 35 | + | |
| 36 | + <el-table v-loading="loading" :data="orderList" @selection-change="handleSelectionChange"> | |
| 37 | + <el-table-column type="selection" width="55" align="center" /> | |
| 38 | + <el-table-column label="订单号" width="180" align="center" prop="garOrderId" /> | |
| 39 | + <el-table-column label="用户姓名" align="center" prop="garOrderContactName" /> | |
| 40 | + <el-table-column label="订单地址" width="200px" align="center" prop="garOrderAddress" /> | |
| 41 | + <el-table-column label="订单详细地址" width="200px" align="center" prop="garOrderAddressDetails" /> | |
| 42 | + <el-table-column label="垃圾类型" align="center" prop="garOrderTrashType" /> | |
| 43 | + <el-table-column label="订单人电话" width="200px" align="center" prop="garOrderContactTel" /> | |
| 44 | + <el-table-column label="经营单位" width="200px" align="center" prop="garOrderCompanyName" /> | |
| 45 | + <el-table-column label="公司负责人电话" width="200px" align="center" prop="garOrderCompanyTel" /> | |
| 46 | + <el-table-column label="处理状态" align="center" prop="garOrderHandlerStatus"> | |
| 47 | + <template slot-scope="scope"> | |
| 48 | + {{ computedHandleStatusString(scope.row.garOrderHandlerStatus).toString() }} | |
| 49 | + </template> | |
| 50 | + </el-table-column> | |
| 51 | + <el-table-column label="约定时间" width="180" align="center" prop="garOrderAgreementTime" /> | |
| 52 | + <el-table-column label="备注" align="center" prop="garRemark" /> | |
| 53 | + <el-table-column label="取消原因" width="200px" align="center" prop="garReason" /> | |
| 54 | + <el-table-column label="是否取消" align="center" prop="garCancelFlag"> | |
| 55 | + <template slot-scope="scope"> | |
| 56 | + {{ computedCancelFlagString(scope.row.garCancelFlag).toString() }} | |
| 57 | + </template> | |
| 58 | + </el-table-column> | |
| 59 | + <el-table-column label="车子数量" align="center" prop="garOrderCarNumber" /> | |
| 60 | + <el-table-column label="车子类型" width="200px" align="center" prop="garOrderCarType" /> | |
| 61 | + <el-table-column fixed="right" label="操作" width="200px" align="center" class-name="small-padding fixed-width"> | |
| 62 | + <template slot-scope="scope"> | |
| 63 | + <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" | |
| 64 | + v-hasPermi="['garbage:order:edit']">详情</el-button> | |
| 65 | + </template> | |
| 66 | + </el-table-column> | |
| 67 | + </el-table> | |
| 68 | + | |
| 69 | + <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" | |
| 70 | + @pagination="getList" /> | |
| 71 | + | |
| 72 | + <!-- 添加或修改清运派单对话框 --> | |
| 73 | + <el-dialog label-position="left" :visible.sync="open" width="800px" append-to-body> | |
| 74 | + <div class="handle-box-title" style="display: flex; align-items: center;margin: 10px 0;"> | |
| 75 | + <div class="handle-box-title-ui" style="height: 30px; width: 10px; background-color: #409EFF;margin-right: 15px;"> | |
| 76 | + </div> | |
| 77 | + <div class="handle-box-title-text" style="color: #409EFF; font-size: 25px;">派单基本信息</div> | |
| 78 | + </div> | |
| 79 | + <el-form ref="form" :model="form" :inline="true"> | |
| 80 | + <el-form-item label="处理状态"> | |
| 81 | + {{ computedHandleStatusString(form.garOrderHandlerStatus).toString() }} | |
| 82 | + </el-form-item> | |
| 83 | + <el-form-item label="是否取消" prop="garCancelFlag"> | |
| 84 | + {{ computedCancelFlagString(form.garCancelFlag).toString() }} | |
| 85 | + </el-form-item> | |
| 86 | + <el-form-item v-if="form.garCancelFlag === 1" label="原因" prop="garReason"> | |
| 87 | + <div class="text" style="color: red;">{{ form.garReason }}</div> | |
| 88 | + </el-form-item> | |
| 89 | + <el-form-item label="订单姓名" prop="garOrderContactName"> | |
| 90 | + <el-input :disabled="true" v-model="form.garOrderContactName" placeholder="请输入订单姓名" /> | |
| 91 | + </el-form-item> | |
| 92 | + <el-form-item label="垃圾类型" prop="garOrderTrashType"> | |
| 93 | + <el-input :disabled="true" v-model="form.garOrderTrashType" placeholder="请输入垃圾类型" /> | |
| 94 | + </el-form-item> | |
| 95 | + <el-form-item label="订单人电话" prop="garOrderContactTel"> | |
| 96 | + <el-input :disabled="true" v-model="form.garOrderContactTel" placeholder="请输入订单人电话" /> | |
| 97 | + </el-form-item> | |
| 98 | + <el-form-item label="经营单位" prop="garOrderCompanyName"> | |
| 99 | + <el-input :disabled="true" v-model="form.garOrderCompanyName" placeholder="请输入公司名称" /> | |
| 100 | + </el-form-item> | |
| 101 | + <el-form-item label="公司负责人电话" prop="garOrderCompanyTel"> | |
| 102 | + <el-input :disabled="true" v-model="form.garOrderCompanyTel" placeholder="请输入公司负责人电话" /> | |
| 103 | + </el-form-item> | |
| 104 | + <el-form-item label="约定时间" prop="garOrderAgreementTime"> | |
| 105 | + <el-input :disabled="true" v-model="form.garOrderAgreementTime" placeholder="请输入约定时间" /> | |
| 106 | + </el-form-item> | |
| 107 | + <el-form-item label="订单创建时间" prop="garCreateTime"> | |
| 108 | + <el-date-picker :disabled="true" clearable size="small" style="width: 200px" v-model="form.garCreateTime" | |
| 109 | + type="date" value-format="yyyy-MM-dd" placeholder="选择订单创建时间"> | |
| 110 | + </el-date-picker> | |
| 111 | + </el-form-item> | |
| 112 | + <el-form-item label="备注" prop="garRemark"> | |
| 113 | + <el-input :disabled="true" v-model="form.garRemark" type="textarea" placeholder="请输入内容" /> | |
| 114 | + </el-form-item> | |
| 115 | + | |
| 116 | + <el-form-item label="车子数量" prop="garOrderCarNumber"> | |
| 117 | + <el-input :disabled="true" v-model="form.garOrderCarNumber" placeholder="请输入车子数量" /> | |
| 118 | + </el-form-item> | |
| 119 | + <el-form-item label="车子类型" prop="garOrderCarType"> | |
| 120 | + <el-input :disabled="true" v-model="form.garOrderCarType" placeholder="请输入车子类型" /> | |
| 121 | + </el-form-item> | |
| 122 | + <el-form-item v-if="form.currentImages" label="现场图片" prop="currentImages"> | |
| 123 | + <el-image style="width: 100px; height: 100px" :src="form.currentImages[0]" | |
| 124 | + :preview-src-list="form.currentImages"> | |
| 125 | + </el-image> | |
| 126 | + </el-form-item> | |
| 127 | + </el-form> | |
| 128 | + <div class="handle-box" v-if="form.garOrderHandlerStatus == 3"> | |
| 129 | + <div class="handle-box-title" style="display: flex; align-items: center;margin: 10px 0;"> | |
| 130 | + <div class="handle-box-title-ui" | |
| 131 | + style="height: 30px; width: 10px; background-color: #409EFF;margin-right: 15px;"></div> | |
| 132 | + <div class="handle-box-title-text" style="color: #409EFF; font-size: 25px;">派单处理信息</div> | |
| 133 | + </div> | |
| 134 | + <el-form :inline="true" :model="form"> | |
| 135 | + <el-form-item label="派单负责人" prop="garOrderHandler"> | |
| 136 | + <el-input v-model="form.garOrderHandleName" placeholder="派单负责人" /> | |
| 137 | + </el-form-item> | |
| 138 | + <el-form-item label="派单负责人电话" prop="garOrderHandlerTel"> | |
| 139 | + <el-input v-model="form.garOrderHandleTel" placeholder="派单负责人电话" /> | |
| 140 | + </el-form-item> | |
| 141 | + | |
| 142 | + <el-form-item v-if="form.putOnImages" label="现场图片" prop="putOnImages"> | |
| 143 | + <el-image style="width: 100px; height: 100px" :src="form.putOnImages[0]" :preview-src-list="form.putOnImages"> | |
| 144 | + </el-image> | |
| 145 | + </el-form-item> | |
| 146 | + <el-form-item v-if="form.putDownImages" label="现场图片" prop="putDownImages"> | |
| 147 | + <el-image style="width: 100px; height: 100px" :src="form.putDownImages[0]" | |
| 148 | + :preview-src-list="form.putDownImages"> | |
| 149 | + </el-image> | |
| 150 | + </el-form-item> | |
| 151 | + </el-form> | |
| 152 | + </div> | |
| 153 | + | |
| 154 | + <div slot="footer" class="dialog-footer"> | |
| 155 | + <el-button type="primary" @click="submitForm">确 定</el-button> | |
| 156 | + </div> | |
| 157 | + </el-dialog> | |
| 158 | + </div> | |
| 159 | +</template> | |
| 160 | + | |
| 161 | +<script> | |
| 162 | +import { delOrder, exportOrder, getOrder, listOrder } from "@/api/gar/order"; | |
| 163 | + | |
| 164 | +export default { | |
| 165 | + name: "Order", | |
| 166 | + data() { | |
| 167 | + return { | |
| 168 | + // 遮罩层 | |
| 169 | + loading: true, | |
| 170 | + // 选中数组 | |
| 171 | + ids: [], | |
| 172 | + // 非单个禁用 | |
| 173 | + single: true, | |
| 174 | + // 非多个禁用 | |
| 175 | + multiple: true, | |
| 176 | + // 显示搜索条件 | |
| 177 | + showSearch: true, | |
| 178 | + // 总条数 | |
| 179 | + total: 0, | |
| 180 | + // 清运派单表格数据 | |
| 181 | + orderList: [], | |
| 182 | + // 弹出层标题 | |
| 183 | + title: "", | |
| 184 | + // 是否显示弹出层 | |
| 185 | + open: false, | |
| 186 | + // 查询参数 | |
| 187 | + queryParams: { | |
| 188 | + pageNum: 1, | |
| 189 | + pageSize: 10, | |
| 190 | + garOrderUserId: null, | |
| 191 | + garOrderHandlerId: null, | |
| 192 | + garOrderAddress: null, | |
| 193 | + garOrderAddressDetails: null, | |
| 194 | + garOrderContactName: null, | |
| 195 | + garOrderTrashType: null, | |
| 196 | + garOrderContactTel: null, | |
| 197 | + garOrderCompanyId: null, | |
| 198 | + garOrderCompanyName: null, | |
| 199 | + garOrderCompanyTel: null, | |
| 200 | + garOrderHandlerStatus: null, | |
| 201 | + garOrderAgreementTime: null, | |
| 202 | + garCreateTime: null, | |
| 203 | + garUpdateTime: null, | |
| 204 | + garCreateBy: null, | |
| 205 | + garUpdateBy: null, | |
| 206 | + garRemark: null, | |
| 207 | + garReason: null, | |
| 208 | + garCancelFlag: null, | |
| 209 | + garEvaluateFlag: null, | |
| 210 | + garOrderCarNumber: null, | |
| 211 | + garOrderCarType: null, | |
| 212 | + garHandlerEvaluateFlag: null | |
| 213 | + }, | |
| 214 | + // 表单参数 | |
| 215 | + form: {}, | |
| 216 | + // 表单校验 | |
| 217 | + rules: { | |
| 218 | + } | |
| 219 | + }; | |
| 220 | + }, | |
| 221 | + created() { | |
| 222 | + this.getList(); | |
| 223 | + }, | |
| 224 | + methods: { | |
| 225 | + computedCancelFlagString(val) { | |
| 226 | + if (val === 0) { | |
| 227 | + return '未取消' | |
| 228 | + } | |
| 229 | + if (val === 1) { | |
| 230 | + return '已取消' | |
| 231 | + } | |
| 232 | + return "" | |
| 233 | + }, | |
| 234 | + computedHandleStatusString(val) { | |
| 235 | + console.log(val); | |
| 236 | + if (val === 0) { | |
| 237 | + return '未处理' | |
| 238 | + } | |
| 239 | + if (val === 1) { | |
| 240 | + return '处理中' | |
| 241 | + } | |
| 242 | + if (val === 3) { | |
| 243 | + return '已处理' | |
| 244 | + } | |
| 245 | + return "" | |
| 246 | + }, | |
| 247 | + /** 查询清运派单列表 */ | |
| 248 | + getList() { | |
| 249 | + this.loading = true; | |
| 250 | + listOrder(this.queryParams).then(response => { | |
| 251 | + this.orderList = response.data.list; | |
| 252 | + this.total = response.data.total; | |
| 253 | + this.loading = false; | |
| 254 | + }); | |
| 255 | + }, | |
| 256 | + // 取消按钮 | |
| 257 | + cancel() { | |
| 258 | + this.open = false; | |
| 259 | + this.reset(); | |
| 260 | + }, | |
| 261 | + // 表单重置 | |
| 262 | + reset() { | |
| 263 | + this.form = { | |
| 264 | + garOrderId: null, | |
| 265 | + garOrderUserId: null, | |
| 266 | + garOrderHandlerId: null, | |
| 267 | + garOrderAddress: null, | |
| 268 | + garOrderAddressDetails: null, | |
| 269 | + garOrderContactName: null, | |
| 270 | + garOrderTrashType: null, | |
| 271 | + garOrderContactTel: null, | |
| 272 | + garOrderCompanyId: null, | |
| 273 | + garOrderCompanyName: null, | |
| 274 | + garOrderCompanyTel: null, | |
| 275 | + garOrderHandlerStatus: 0, | |
| 276 | + garOrderAgreementTime: null, | |
| 277 | + currentImages: [], | |
| 278 | + putDownImages: [], | |
| 279 | + putOnImages: [], | |
| 280 | + garCreateTime: null, | |
| 281 | + garUpdateTime: null, | |
| 282 | + garCreateBy: null, | |
| 283 | + garUpdateBy: null, | |
| 284 | + garRemark: null, | |
| 285 | + garReason: null, | |
| 286 | + garCancelFlag: null, | |
| 287 | + garEvaluateFlag: null, | |
| 288 | + garOrderCarNumber: null, | |
| 289 | + garOrderCarType: null, | |
| 290 | + garHandlerEvaluateFlag: null | |
| 291 | + }; | |
| 292 | + this.resetForm("form"); | |
| 293 | + } | |
| 294 | + , | |
| 295 | + /** 搜索按钮操作 */ | |
| 296 | + handleQuery() { | |
| 297 | + this.queryParams.pageNum = 1; | |
| 298 | + this.getList(); | |
| 299 | + }, | |
| 300 | + /** 重置按钮操作 */ | |
| 301 | + resetQuery() { | |
| 302 | + this.resetForm("queryForm"); | |
| 303 | + this.handleQuery(); | |
| 304 | + }, | |
| 305 | + // 多选框选中数据 | |
| 306 | + handleSelectionChange(selection) { | |
| 307 | + this.ids = selection.map(item => item.garOrderId) | |
| 308 | + this.single = selection.length !== 1 | |
| 309 | + this.multiple = !selection.length | |
| 310 | + }, | |
| 311 | + /** 修改按钮操作 */ | |
| 312 | + handleUpdate(row) { | |
| 313 | + this.reset(); | |
| 314 | + const garOrderId = row.garOrderId || this.ids | |
| 315 | + getOrder(garOrderId).then(response => { | |
| 316 | + this.form = response.data; | |
| 317 | + this.form.currentImages = this.form.currentImages.map(map => process.env.VUE_APP_BASE_API + map) | |
| 318 | + this.form.putDownImages = this.form.putDownImages.map(map => process.env.VUE_APP_BASE_API + map) | |
| 319 | + this.form.putOnImages = this.form.putOnImages.map(map => process.env.VUE_APP_BASE_API + map) | |
| 320 | + this.open = true; | |
| 321 | + this.title = "清运派单详情"; | |
| 322 | + }); | |
| 323 | + }, | |
| 324 | + /** 提交按钮 */ | |
| 325 | + submitForm() { | |
| 326 | + this.open = false; | |
| 327 | + this.getList(); | |
| 328 | + }, | |
| 329 | + /** 删除按钮操作 */ | |
| 330 | + handleDelete(row) { | |
| 331 | + const garOrderIds = row.garOrderId || this.ids; | |
| 332 | + this.$confirm('是否确认删除清运派单编号为"' + garOrderIds + '"的数据项?', "警告", { | |
| 333 | + confirmButtonText: "确定", | |
| 334 | + cancelButtonText: "取消", | |
| 335 | + type: "warning" | |
| 336 | + }).then(function () { | |
| 337 | + return delOrder(garOrderIds); | |
| 338 | + }).then(() => { | |
| 339 | + this.getList(); | |
| 340 | + this.msgSuccess("删除成功"); | |
| 341 | + }) | |
| 342 | + }, | |
| 343 | + /** 导出按钮操作 */ | |
| 344 | + handleExport() { | |
| 345 | + const queryParams = this.queryParams; | |
| 346 | + this.$confirm('是否确认导出所有清运派单数据项?', "警告", { | |
| 347 | + confirmButtonText: "确定", | |
| 348 | + cancelButtonText: "取消", | |
| 349 | + type: "warning" | |
| 350 | + }).then(function () { | |
| 351 | + return exportOrder(queryParams); | |
| 352 | + }).then(response => { | |
| 353 | + this.download(response.msg); | |
| 354 | + }) | |
| 355 | + } | |
| 356 | + } | |
| 357 | +}; | |
| 358 | +</script> | ... | ... |
trash-ui/src/views/gar/user/index.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div class="app-container"> | |
| 3 | + <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> | |
| 4 | + <el-form-item label="手机号" prop="garUserTel"> | |
| 5 | + <el-input v-model="queryParams.garUserTel" placeholder="请输入手机号" clearable size="small" | |
| 6 | + @keyup.enter.native="handleQuery" /> | |
| 7 | + </el-form-item> | |
| 8 | + <el-form-item label="用户名" prop="garUserName"> | |
| 9 | + <el-input v-model="queryParams.garUserName" placeholder="请输入用户名" clearable size="small" | |
| 10 | + @keyup.enter.native="handleQuery" /> | |
| 11 | + </el-form-item> | |
| 12 | + <el-form-item label="用户类型" prop="garUserType"> | |
| 13 | + <el-select v-model="queryParams.garUserType" placeholder="请选择用户类型" clearable size="small"> | |
| 14 | + <el-option label="居民用户" value="居民用户" /> | |
| 15 | + <el-option label="管理负责人" value="管理负责人" /> | |
| 16 | + </el-select> | |
| 17 | + </el-form-item> | |
| 18 | + <el-form-item label="创建时间" prop="garCreateTime"> | |
| 19 | + <el-date-picker clearable size="small" style="width: 200px" v-model="queryParams.garCreateTime" type="date" | |
| 20 | + value-format="yyyy-MM-dd" placeholder="选择创建时间"> | |
| 21 | + </el-date-picker> | |
| 22 | + </el-form-item> | |
| 23 | + <el-form-item label="修改时间" prop="garUpdateTime"> | |
| 24 | + <el-date-picker clearable size="small" style="width: 200px" v-model="queryParams.garUpdateTime" type="date" | |
| 25 | + value-format="yyyy-MM-dd" placeholder="选择修改时间"> | |
| 26 | + </el-date-picker> | |
| 27 | + </el-form-item> | |
| 28 | + <el-form-item> | |
| 29 | + <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | |
| 30 | + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | |
| 31 | + </el-form-item> | |
| 32 | + </el-form> | |
| 33 | + | |
| 34 | + <el-row :gutter="10" class="mb8"> | |
| 35 | + <el-col :span="1.5"> | |
| 36 | + <el-button type="danger" icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" | |
| 37 | + v-hasPermi="['GarUser:GarUser:remove']">删除</el-button> | |
| 38 | + </el-col> | |
| 39 | + <el-col :span="1.5"> | |
| 40 | + </el-col> | |
| 41 | + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> | |
| 42 | + </el-row> | |
| 43 | + | |
| 44 | + <el-table v-loading="loading" :data="GarUserList" @selection-change="handleSelectionChange"> | |
| 45 | + <el-table-column type="selection" width="55" align="center" /> | |
| 46 | + <el-table-column label="手机号" align="center" prop="garUserTel" /> | |
| 47 | + <el-table-column label="用户名" align="center" prop="garUserName" /> | |
| 48 | + <el-table-column label="用户类型" align="center" prop="garUserType" /> | |
| 49 | + <el-table-column label="创建时间" align="center" prop="garCreateTime" width="180"> | |
| 50 | + <template slot-scope="scope"> | |
| 51 | + <span>{{ parseTime(scope.row.garCreateTime, '{y}-{m}-{d}') }}</span> | |
| 52 | + </template> | |
| 53 | + </el-table-column> | |
| 54 | + <el-table-column label="修改时间" align="center" prop="garUpdateTime" width="180"> | |
| 55 | + <template slot-scope="scope"> | |
| 56 | + <span>{{ parseTime(scope.row.garUpdateTime, '{y}-{m}-{d}') }}</span> | |
| 57 | + </template> | |
| 58 | + </el-table-column> | |
| 59 | + <el-table-column label="备注" align="center" prop="garRemark" /> | |
| 60 | + <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | |
| 61 | + <template slot-scope="scope"> | |
| 62 | + | |
| 63 | + <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" | |
| 64 | + v-hasPermi="['GarUser:GarUser:remove']">删除</el-button> | |
| 65 | + </template> | |
| 66 | + </el-table-column> | |
| 67 | + </el-table> | |
| 68 | + | |
| 69 | + <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" | |
| 70 | + @pagination="getList" /> | |
| 71 | + | |
| 72 | + <!-- 添加或修改建筑垃圾-用户对话框 --> | |
| 73 | + <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> | |
| 74 | + <el-form ref="form" :model="form" :rules="rules" label-width="80px"> | |
| 75 | + <el-form-item label="手机号" prop="garUserTel"> | |
| 76 | + <el-input v-model="form.garUserTel" placeholder="请输入手机号" /> | |
| 77 | + </el-form-item> | |
| 78 | + <el-form-item label="用户名" prop="garUserName"> | |
| 79 | + <el-input v-model="form.garUserName" placeholder="请输入用户名" /> | |
| 80 | + </el-form-item> | |
| 81 | + <el-form-item label="用户类型" prop="garUserType"> | |
| 82 | + <el-select v-model="form.garUserType" placeholder="请选择用户类型" clearable size="small"> | |
| 83 | + <el-option label="居民用户" value="居民用户" /> | |
| 84 | + <el-option label="管理负责人" value="管理负责人" /> | |
| 85 | + </el-select> | |
| 86 | + </el-form-item> | |
| 87 | + <el-form-item label="创建时间" prop="garCreateTime"> | |
| 88 | + <el-date-picker clearable size="small" style="width: 200px" v-model="form.garCreateTime" type="date" | |
| 89 | + value-format="yyyy-MM-dd" placeholder="选择创建时间"> | |
| 90 | + </el-date-picker> | |
| 91 | + </el-form-item> | |
| 92 | + <el-form-item label="修改时间" prop="garUpdateTime"> | |
| 93 | + <el-date-picker clearable size="small" style="width: 200px" v-model="form.garUpdateTime" type="date" | |
| 94 | + value-format="yyyy-MM-dd" placeholder="选择修改时间"> | |
| 95 | + </el-date-picker> | |
| 96 | + </el-form-item> | |
| 97 | + <el-form-item label="备注" prop="garRemark"> | |
| 98 | + <el-input v-model="form.garRemark" placeholder="请输入备注" /> | |
| 99 | + </el-form-item> | |
| 100 | + </el-form> | |
| 101 | + <div slot="footer" class="dialog-footer"> | |
| 102 | + <el-button type="primary" @click="submitForm">确 定</el-button> | |
| 103 | + <el-button @click="cancel">取 消</el-button> | |
| 104 | + </div> | |
| 105 | + </el-dialog> | |
| 106 | + </div> | |
| 107 | +</template> | |
| 108 | + | |
| 109 | +<script> | |
| 110 | +import { addGarUser, delGarUser, exportGarUser, getGarUser, listGarUser, updateGarUser } from "@/api/gar/user"; | |
| 111 | + | |
| 112 | +export default { | |
| 113 | + name: "GarUser", | |
| 114 | + data() { | |
| 115 | + return { | |
| 116 | + // 遮罩层 | |
| 117 | + loading: true, | |
| 118 | + // 选中数组 | |
| 119 | + ids: [], | |
| 120 | + // 非单个禁用 | |
| 121 | + single: true, | |
| 122 | + // 非多个禁用 | |
| 123 | + multiple: true, | |
| 124 | + // 显示搜索条件 | |
| 125 | + showSearch: true, | |
| 126 | + // 总条数 | |
| 127 | + total: 0, | |
| 128 | + // 建筑垃圾-用户表格数据 | |
| 129 | + GarUserList: [], | |
| 130 | + // 弹出层标题 | |
| 131 | + title: "", | |
| 132 | + // 是否显示弹出层 | |
| 133 | + open: false, | |
| 134 | + // 查询参数 | |
| 135 | + queryParams: { | |
| 136 | + pageNum: 1, | |
| 137 | + pageSize: 10, | |
| 138 | + garUserTel: null, | |
| 139 | + garUserName: null, | |
| 140 | + garUserType: null, | |
| 141 | + garUserCarNum: null, | |
| 142 | + garUserDelFlag: null, | |
| 143 | + garCreateTime: null, | |
| 144 | + garUpdateTime: null, | |
| 145 | + garRemark: null | |
| 146 | + }, | |
| 147 | + // 表单参数 | |
| 148 | + form: {}, | |
| 149 | + // 表单校验 | |
| 150 | + rules: { | |
| 151 | + garUserTel: [ | |
| 152 | + { required: true, message: "手机号不能为空", trigger: "blur" } | |
| 153 | + ], | |
| 154 | + } | |
| 155 | + }; | |
| 156 | + }, | |
| 157 | + created() { | |
| 158 | + this.getList(); | |
| 159 | + }, | |
| 160 | + methods: { | |
| 161 | + /** 查询建筑垃圾-用户列表 */ | |
| 162 | + getList() { | |
| 163 | + this.loading = true; | |
| 164 | + listGarUser(this.queryParams).then(response => { | |
| 165 | + console.log(response); | |
| 166 | + this.GarUserList = response.data.list; | |
| 167 | + this.total = response.data.total; | |
| 168 | + this.loading = false; | |
| 169 | + }); | |
| 170 | + }, | |
| 171 | + // 取消按钮 | |
| 172 | + cancel() { | |
| 173 | + this.open = false; | |
| 174 | + this.reset(); | |
| 175 | + }, | |
| 176 | + // 表单重置 | |
| 177 | + reset() { | |
| 178 | + this.form = { | |
| 179 | + garUserId: null, | |
| 180 | + garUserTel: null, | |
| 181 | + garUserName: null, | |
| 182 | + garUserType: null, | |
| 183 | + garUserCarNum: null, | |
| 184 | + garUserDelFlag: null, | |
| 185 | + garCreateTime: null, | |
| 186 | + garUpdateTime: null, | |
| 187 | + garRemark: null | |
| 188 | + }; | |
| 189 | + this.resetForm("form"); | |
| 190 | + }, | |
| 191 | + /** 搜索按钮操作 */ | |
| 192 | + handleQuery() { | |
| 193 | + this.queryParams.pageNum = 1; | |
| 194 | + this.getList(); | |
| 195 | + }, | |
| 196 | + /** 重置按钮操作 */ | |
| 197 | + resetQuery() { | |
| 198 | + this.resetForm("queryForm"); | |
| 199 | + this.handleQuery(); | |
| 200 | + }, | |
| 201 | + // 多选框选中数据 | |
| 202 | + handleSelectionChange(selection) { | |
| 203 | + this.ids = selection.map(item => item.garUserId) | |
| 204 | + this.single = selection.length !== 1 | |
| 205 | + this.multiple = !selection.length | |
| 206 | + }, | |
| 207 | + /** 新增按钮操作 */ | |
| 208 | + handleAdd() { | |
| 209 | + this.reset(); | |
| 210 | + this.open = true; | |
| 211 | + this.title = "添加建筑垃圾-用户"; | |
| 212 | + }, | |
| 213 | + /** 修改按钮操作 */ | |
| 214 | + handleUpdate(row) { | |
| 215 | + this.reset(); | |
| 216 | + const garUserId = row.garUserId || this.ids | |
| 217 | + getGarUser(garUserId).then(response => { | |
| 218 | + this.form = response.data; | |
| 219 | + this.open = true; | |
| 220 | + this.title = "修改建筑垃圾-用户"; | |
| 221 | + }); | |
| 222 | + }, | |
| 223 | + /** 提交按钮 */ | |
| 224 | + submitForm() { | |
| 225 | + this.$refs["form"].validate(valid => { | |
| 226 | + if (valid) { | |
| 227 | + if (this.form.garUserId != null) { | |
| 228 | + updateGarUser(this.form).then(response => { | |
| 229 | + this.msgSuccess("修改成功"); | |
| 230 | + this.open = false; | |
| 231 | + this.getList(); | |
| 232 | + }); | |
| 233 | + } else { | |
| 234 | + addGarUser(this.form).then(response => { | |
| 235 | + this.msgSuccess("新增成功"); | |
| 236 | + this.open = false; | |
| 237 | + this.getList(); | |
| 238 | + }); | |
| 239 | + } | |
| 240 | + } | |
| 241 | + }); | |
| 242 | + }, | |
| 243 | + /** 删除按钮操作 */ | |
| 244 | + handleDelete(row) { | |
| 245 | + const garUserIds = row.garUserId || this.ids; | |
| 246 | + this.$confirm('是否确认删除建筑垃圾-用户编号为"' + garUserIds + '"的数据项?', "警告", { | |
| 247 | + confirmButtonText: "确定", | |
| 248 | + cancelButtonText: "取消", | |
| 249 | + type: "warning" | |
| 250 | + }).then(function () { | |
| 251 | + return delGarUser(garUserIds); | |
| 252 | + }).then(() => { | |
| 253 | + this.getList(); | |
| 254 | + this.msgSuccess("删除成功"); | |
| 255 | + }) | |
| 256 | + }, | |
| 257 | + /** 导出按钮操作 */ | |
| 258 | + handleExport() { | |
| 259 | + const queryParams = this.queryParams; | |
| 260 | + this.$confirm('是否确认导出所有建筑垃圾-用户数据项?', "警告", { | |
| 261 | + confirmButtonText: "确定", | |
| 262 | + cancelButtonText: "取消", | |
| 263 | + type: "warning" | |
| 264 | + }).then(function () { | |
| 265 | + return exportGarUser(queryParams); | |
| 266 | + }).then(response => { | |
| 267 | + this.download(response.msg); | |
| 268 | + }) | |
| 269 | + } | |
| 270 | + } | |
| 271 | +}; | |
| 272 | +</script> | ... | ... |