Merge remote-tracking branch 'origin/old-version'
This commit is contained in:
commit
9109c692a1
|
|
@ -0,0 +1,136 @@
|
||||||
|
package com.ghy.web.controller.order;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ghy.order.domain.OrderCallRecord;
|
||||||
|
import com.ghy.order.service.IOrderCallRecordService;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.ModelMap;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import com.ghy.common.annotation.Log;
|
||||||
|
import com.ghy.common.enums.BusinessType;
|
||||||
|
import com.ghy.common.core.controller.BaseController;
|
||||||
|
import com.ghy.common.core.domain.AjaxResult;
|
||||||
|
import com.ghy.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ghy.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单约单记录Controller
|
||||||
|
*
|
||||||
|
* @author clunt
|
||||||
|
* @date 2023-06-04
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
@RequestMapping("/order/record")
|
||||||
|
public class OrderCallRecordController extends BaseController
|
||||||
|
{
|
||||||
|
private String prefix = "order/record";
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IOrderCallRecordService orderCallRecordService;
|
||||||
|
|
||||||
|
@RequiresPermissions("worker:record:view")
|
||||||
|
@GetMapping()
|
||||||
|
public String record()
|
||||||
|
{
|
||||||
|
return prefix + "/record";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询订单约单记录列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("worker:record:list")
|
||||||
|
@PostMapping("/list")
|
||||||
|
@ResponseBody
|
||||||
|
public TableDataInfo list(OrderCallRecord orderCallRecord)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<OrderCallRecord> list = orderCallRecordService.selectOrderCallRecordList(orderCallRecord);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* App查询订单约单记录列表
|
||||||
|
*/
|
||||||
|
@PostMapping("/app/list")
|
||||||
|
@ResponseBody
|
||||||
|
public TableDataInfo appList(@RequestBody OrderCallRecord orderCallRecord)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<OrderCallRecord> list = orderCallRecordService.selectOrderCallRecordList(orderCallRecord);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出订单约单记录列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("worker:record:export")
|
||||||
|
@Log(title = "订单约单记录", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult export(OrderCallRecord orderCallRecord)
|
||||||
|
{
|
||||||
|
List<OrderCallRecord> list = orderCallRecordService.selectOrderCallRecordList(orderCallRecord);
|
||||||
|
ExcelUtil<OrderCallRecord> util = new ExcelUtil<OrderCallRecord>(OrderCallRecord.class);
|
||||||
|
return util.exportExcel(list, "订单约单记录数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增订单约单记录
|
||||||
|
*/
|
||||||
|
@GetMapping("/add")
|
||||||
|
public String add()
|
||||||
|
{
|
||||||
|
return prefix + "/add";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增保存订单约单记录
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("worker:record:add")
|
||||||
|
@Log(title = "订单约单记录", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/add")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult addSave(OrderCallRecord orderCallRecord)
|
||||||
|
{
|
||||||
|
return toAjax(orderCallRecordService.insertOrderCallRecord(orderCallRecord));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改订单约单记录
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("worker:record:edit")
|
||||||
|
@GetMapping("/edit/{id}")
|
||||||
|
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||||
|
{
|
||||||
|
OrderCallRecord orderCallRecord = orderCallRecordService.selectOrderCallRecordById(id);
|
||||||
|
mmap.put("orderCallRecord", orderCallRecord);
|
||||||
|
return prefix + "/edit";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改保存订单约单记录
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("worker:record:edit")
|
||||||
|
@Log(title = "订单约单记录", businessType = BusinessType.UPDATE)
|
||||||
|
@PostMapping("/edit")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult editSave(OrderCallRecord orderCallRecord)
|
||||||
|
{
|
||||||
|
return toAjax(orderCallRecordService.updateOrderCallRecord(orderCallRecord));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除订单约单记录
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("worker:record:remove")
|
||||||
|
@Log(title = "订单约单记录", businessType = BusinessType.DELETE)
|
||||||
|
@PostMapping( "/remove")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult remove(String ids)
|
||||||
|
{
|
||||||
|
return toAjax(orderCallRecordService.deleteOrderCallRecordByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -225,6 +225,7 @@ public class OrderController extends BaseController {
|
||||||
orderMaster.setCustomerId(customer.getCustomerId());
|
orderMaster.setCustomerId(customer.getCustomerId());
|
||||||
orderMaster.setGoodsId(goods.getGoodsId());
|
orderMaster.setGoodsId(goods.getGoodsId());
|
||||||
orderMaster.setPayType(0);
|
orderMaster.setPayType(0);
|
||||||
|
orderMaster.setOrderMode(request.getOrderMode());
|
||||||
// 服务时间
|
// 服务时间
|
||||||
String[] split = request.getServTime().split("-");
|
String[] split = request.getServTime().split("-");
|
||||||
try {
|
try {
|
||||||
|
|
@ -296,7 +297,7 @@ public class OrderController extends BaseController {
|
||||||
FinancialMaster fmUpdate = new FinancialMaster();
|
FinancialMaster fmUpdate = new FinancialMaster();
|
||||||
fmUpdate.setId(financialMaster.getId());
|
fmUpdate.setId(financialMaster.getId());
|
||||||
fmUpdate.setServerMoney(serverMoney);
|
fmUpdate.setServerMoney(serverMoney);
|
||||||
financialMasterService.updateFinancialMaster(financialMaster);
|
financialMasterService.updateFinancialMaster(fmUpdate);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -112,6 +112,31 @@ public class OrderDetailController extends BaseController {
|
||||||
@PostMapping("/list")
|
@PostMapping("/list")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public TableDataInfo list(OrderDetail orderDetail) {
|
public TableDataInfo list(OrderDetail orderDetail) {
|
||||||
|
if (orderDetail.getSearchAfterList() !=null && orderDetail.getSearchAfterList()) {
|
||||||
|
return this.afterServiceList(orderDetail);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(StringUtils.isNotEmpty(orderDetail.getWorkerName()) || StringUtils.isNotEmpty(orderDetail.getWorkerPhone())){
|
||||||
|
Worker param = new Worker();
|
||||||
|
param.setName(orderDetail.getWorkerName());
|
||||||
|
param.setPhone(orderDetail.getWorkerPhone());
|
||||||
|
List<Worker> workList = workerService.getWorkList(param);
|
||||||
|
List<Long> ids = workList.stream().map(Worker::getWorkerId).collect(Collectors.toList());
|
||||||
|
orderDetail.setWorkerIds(ids);
|
||||||
|
if(CollectionUtils.isEmpty(ids)){
|
||||||
|
return getDataTable(new ArrayList<>());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(orderDetail.getSysPayStatus() != null){
|
||||||
|
FinancialMaster param = new FinancialMaster();
|
||||||
|
param.setPayStatus(orderDetail.getSysPayStatus());
|
||||||
|
List<FinancialMaster> financialMasters = financialMasterService.selectFinancialMasterList(param);
|
||||||
|
List<Long> masterIds = financialMasters.stream().map(FinancialMaster::getOrderMasterId).collect(Collectors.toList());
|
||||||
|
orderDetail.setMasterIds(masterIds);
|
||||||
|
if(CollectionUtils.isEmpty(masterIds)){
|
||||||
|
return getDataTable(new ArrayList<>());
|
||||||
|
}
|
||||||
|
}
|
||||||
startPage();
|
startPage();
|
||||||
if (this.getSysUser().getDept().getParentId() != 101) {
|
if (this.getSysUser().getDept().getParentId() != 101) {
|
||||||
orderDetail.setDeptId(this.getSysUser().getDept().getParentId());
|
orderDetail.setDeptId(this.getSysUser().getDept().getParentId());
|
||||||
|
|
@ -578,6 +603,7 @@ public class OrderDetailController extends BaseController {
|
||||||
orderListResponse.setOrderDetailCode(detail.getCode());
|
orderListResponse.setOrderDetailCode(detail.getCode());
|
||||||
orderListResponse.setOrderMasterId(detail.getOrderMasterId());
|
orderListResponse.setOrderMasterId(detail.getOrderMasterId());
|
||||||
orderListResponse.setOrderMasterCode(detail.getOrderMasterCode());
|
orderListResponse.setOrderMasterCode(detail.getOrderMasterCode());
|
||||||
|
orderListResponse.setGoods(goods);
|
||||||
orderListResponse.setGoodsName(goods.getGoodsName());
|
orderListResponse.setGoodsName(goods.getGoodsName());
|
||||||
orderListResponse.setGoodsLogoUrl(goods.getGoodsImgUrl());
|
orderListResponse.setGoodsLogoUrl(goods.getGoodsImgUrl());
|
||||||
orderListResponse.setDiscountMoney(financialDetail.getDiscountMoney());
|
orderListResponse.setDiscountMoney(financialDetail.getDiscountMoney());
|
||||||
|
|
@ -650,6 +676,14 @@ public class OrderDetailController extends BaseController {
|
||||||
return "/order/pay-qrcode";
|
return "/order/pay-qrcode";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/orderWorker/{orderId}")
|
||||||
|
public String orderWorker(@PathVariable("orderId") Long orderId, ModelMap mmap) {
|
||||||
|
List<Worker> workList = workerService.getWorkList(new Worker());
|
||||||
|
mmap.put("orderId", orderId);
|
||||||
|
mmap.put("workers", workList);
|
||||||
|
return "order/orderWorker";
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改保存详细订单
|
* 修改保存详细订单
|
||||||
*/
|
*/
|
||||||
|
|
@ -966,4 +1000,57 @@ public class OrderDetailController extends BaseController {
|
||||||
int i = orderDetailService.insertOrderAddSubtract(body);
|
int i = orderDetailService.insertOrderAddSubtract(body);
|
||||||
return AjaxResult.success(i);
|
return AjaxResult.success(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/differentStatus/count")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult differentStatusOrderCount(OrderDetail orderDetail) {
|
||||||
|
return AjaxResult.success(orderDetailService.differentStatusOrderCount(orderDetail));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/count")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult OrderDetailCount(OrderDetail orderDetail) {
|
||||||
|
if(StringUtils.isNotEmpty(orderDetail.getWorkerName()) || StringUtils.isNotEmpty(orderDetail.getWorkerPhone())){
|
||||||
|
Worker param = new Worker();
|
||||||
|
param.setName(orderDetail.getWorkerName());
|
||||||
|
param.setPhone(orderDetail.getWorkerPhone());
|
||||||
|
List<Worker> workList = workerService.getWorkList(param);
|
||||||
|
List<Long> ids = workList.stream().map(Worker::getWorkerId).collect(Collectors.toList());
|
||||||
|
orderDetail.setWorkerIds(ids);
|
||||||
|
if(CollectionUtils.isEmpty(ids)){
|
||||||
|
return AjaxResult.success(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(orderDetail.getSysPayStatus() != null){
|
||||||
|
FinancialMaster param = new FinancialMaster();
|
||||||
|
param.setPayStatus(orderDetail.getSysPayStatus());
|
||||||
|
List<FinancialMaster> financialMasters = financialMasterService.selectFinancialMasterList(param);
|
||||||
|
List<Long> masterIds = financialMasters.stream().map(FinancialMaster::getOrderMasterId).collect(Collectors.toList());
|
||||||
|
orderDetail.setMasterIds(masterIds);
|
||||||
|
if(CollectionUtils.isEmpty(masterIds)){
|
||||||
|
return AjaxResult.success(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.getSysUser().getDept().getParentId() != 101) {
|
||||||
|
orderDetail.setDeptId(this.getSysUser().getDept().getParentId());
|
||||||
|
}
|
||||||
|
return AjaxResult.success(orderDetailService.countOrderDetailList(orderDetail));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/after/count")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult AfterDetailOrderCount(OrderDetail orderDetail) {
|
||||||
|
AfterServiceRecord afterServiceRecord = new AfterServiceRecord();
|
||||||
|
afterServiceRecord.setExcludeAfterServiceFinished(Boolean.TRUE);
|
||||||
|
List<AfterServiceRecord> afterServiceRecordList = afterServiceRecordService.selectAfterServiceRecordList(afterServiceRecord);
|
||||||
|
// 踢重后的子单ids
|
||||||
|
List<Long> detailIds = afterServiceRecordList.stream().map(AfterServiceRecord::getOrderDetailId).distinct().collect(Collectors.toList());
|
||||||
|
String ids = StringUtils.join(detailIds, ",");
|
||||||
|
if (StringUtils.isNotEmpty(ids)) {
|
||||||
|
orderDetail.setOrderDetailIds(ids);
|
||||||
|
} else {
|
||||||
|
orderDetail.setOrderDetailIds("0");
|
||||||
|
}
|
||||||
|
return AjaxResult.success(orderDetailService.countOrderDetailList(orderDetail));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,14 +24,8 @@ import com.ghy.goods.service.GoodsAreaService;
|
||||||
import com.ghy.goods.service.GoodsImgsService;
|
import com.ghy.goods.service.GoodsImgsService;
|
||||||
import com.ghy.goods.service.GoodsService;
|
import com.ghy.goods.service.GoodsService;
|
||||||
import com.ghy.goods.service.GoodsStandardService;
|
import com.ghy.goods.service.GoodsStandardService;
|
||||||
import com.ghy.order.domain.AfterServiceRecord;
|
import com.ghy.order.domain.*;
|
||||||
import com.ghy.order.domain.OrderDetail;
|
import com.ghy.order.service.*;
|
||||||
import com.ghy.order.domain.OrderGoods;
|
|
||||||
import com.ghy.order.domain.OrderMaster;
|
|
||||||
import com.ghy.order.service.IAfterServiceRecordService;
|
|
||||||
import com.ghy.order.service.OrderDetailService;
|
|
||||||
import com.ghy.order.service.OrderGoodsService;
|
|
||||||
import com.ghy.order.service.OrderMasterService;
|
|
||||||
import com.ghy.payment.domain.FinancialChangeRecord;
|
import com.ghy.payment.domain.FinancialChangeRecord;
|
||||||
import com.ghy.payment.domain.FinancialDetail;
|
import com.ghy.payment.domain.FinancialDetail;
|
||||||
import com.ghy.payment.domain.FinancialMaster;
|
import com.ghy.payment.domain.FinancialMaster;
|
||||||
|
|
@ -110,6 +104,8 @@ public class OrderMasterController extends BaseController {
|
||||||
private IAfterServiceRecordService afterServiceRecordService;
|
private IAfterServiceRecordService afterServiceRecordService;
|
||||||
@Resource
|
@Resource
|
||||||
private FinancialChangeRecordService financialChangeRecordService;
|
private FinancialChangeRecordService financialChangeRecordService;
|
||||||
|
@Autowired
|
||||||
|
private IOrderCallRecordService orderCallRecordService;
|
||||||
|
|
||||||
@RequiresPermissions("order:master:view")
|
@RequiresPermissions("order:master:view")
|
||||||
@GetMapping()
|
@GetMapping()
|
||||||
|
|
@ -123,7 +119,7 @@ public class OrderMasterController extends BaseController {
|
||||||
@GetMapping("/payQrcode/{orderId}")
|
@GetMapping("/payQrcode/{orderId}")
|
||||||
public String payQrcode(@PathVariable("orderId") String orderId, ModelMap mmap) {
|
public String payQrcode(@PathVariable("orderId") String orderId, ModelMap mmap) {
|
||||||
mmap.put("orderId", orderId);
|
mmap.put("orderId", orderId);
|
||||||
return "/order/master-qrcode";
|
return "order/master-qrcode";
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/pc")
|
@GetMapping("/pc")
|
||||||
|
|
@ -131,6 +127,25 @@ public class OrderMasterController extends BaseController {
|
||||||
return "order/pc-master";
|
return "order/pc-master";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/manager")
|
||||||
|
public String orderManager() {
|
||||||
|
return "order/orderManager";
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/orderWorker/{orderId}")
|
||||||
|
public String orderWorker(@PathVariable("orderId") Long orderId, ModelMap mmap) {
|
||||||
|
List<Worker> workList = workerService.getWorkList(new Worker());
|
||||||
|
mmap.put("orderId", orderId);
|
||||||
|
mmap.put("workers", workList);
|
||||||
|
return "order/orderWorker";
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/assignWholeOrder/{orderId}")
|
||||||
|
public String assignWholeOrder(@PathVariable("orderId") Long orderId, ModelMap mmap) {
|
||||||
|
mmap.put("orderId", orderId);
|
||||||
|
return "order/assignWholeOrder";
|
||||||
|
}
|
||||||
|
|
||||||
@PostMapping("/app/list")
|
@PostMapping("/app/list")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public TableDataInfo appList(@RequestBody OrderMaster orderMaster) {
|
public TableDataInfo appList(@RequestBody OrderMaster orderMaster) {
|
||||||
|
|
@ -222,6 +237,7 @@ public class OrderMasterController extends BaseController {
|
||||||
orderListResponse.setTimeout(master.getTimeout());
|
orderListResponse.setTimeout(master.getTimeout());
|
||||||
orderListResponse.setTimeoutFineTimes(master.getTimeoutFineTimes());
|
orderListResponse.setTimeoutFineTimes(master.getTimeoutFineTimes());
|
||||||
orderListResponse.setAfterServiceRecordList(afterServiceRecords);
|
orderListResponse.setAfterServiceRecordList(afterServiceRecords);
|
||||||
|
orderListResponse.setServerMoney(master.getServerMoney());
|
||||||
orderListResponses.add(orderListResponse);
|
orderListResponses.add(orderListResponse);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
@ -595,6 +611,7 @@ public class OrderMasterController extends BaseController {
|
||||||
orderListResponse.setTimeoutFineTimes(orderMaster.getTimeoutFineTimes());
|
orderListResponse.setTimeoutFineTimes(orderMaster.getTimeoutFineTimes());
|
||||||
orderListResponse.setFinalRecvMoney(finalRecvMoney);
|
orderListResponse.setFinalRecvMoney(finalRecvMoney);
|
||||||
orderListResponse.setGoodsAreaList(goods.getGoodsAreaList());
|
orderListResponse.setGoodsAreaList(goods.getGoodsAreaList());
|
||||||
|
orderListResponse.setOrderMode(orderMaster.getOrderMode());
|
||||||
|
|
||||||
return AjaxResult.success(orderListResponse);
|
return AjaxResult.success(orderListResponse);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
@ -726,6 +743,25 @@ public class OrderMasterController extends BaseController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/callCustomer")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult callCustomer(@RequestBody OrderMaster orderMaster) {
|
||||||
|
try {
|
||||||
|
int i = orderMasterService.updateOrderMaster(orderMaster);
|
||||||
|
if(i > 0){
|
||||||
|
OrderCallRecord param = new OrderCallRecord();
|
||||||
|
param.setOrderId(orderMaster.getId());
|
||||||
|
param.setCallTime(new Date());
|
||||||
|
param.setOrderType("01");
|
||||||
|
orderCallRecordService.insertOrderCallRecord(param);
|
||||||
|
}
|
||||||
|
return AjaxResult.success();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return AjaxResult.error();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验主订单编码
|
* 校验主订单编码
|
||||||
*/
|
*/
|
||||||
|
|
@ -858,4 +894,16 @@ public class OrderMasterController extends BaseController {
|
||||||
int i = orderMasterService.reject(orderMaster);
|
int i = orderMasterService.reject(orderMaster);
|
||||||
return AjaxResult.success(i);
|
return AjaxResult.success(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/differentStatus/count")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult differentStatusOrderCount() {
|
||||||
|
return AjaxResult.success(orderMasterService.differentStatusOrderCount());
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/count")
|
||||||
|
@ResponseBody
|
||||||
|
public AjaxResult OrderMasterCount(OrderMaster orderMaster) {
|
||||||
|
return AjaxResult.success(orderMasterService.countOrderMasterList(orderMaster));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ import com.ghy.worker.domain.WorkerArea;
|
||||||
import com.ghy.worker.domain.WorkerBank;
|
import com.ghy.worker.domain.WorkerBank;
|
||||||
import com.ghy.worker.domain.WorkerGoodsCategory;
|
import com.ghy.worker.domain.WorkerGoodsCategory;
|
||||||
import com.ghy.worker.service.*;
|
import com.ghy.worker.service.*;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.apache.shiro.util.Assert;
|
import org.apache.shiro.util.Assert;
|
||||||
|
|
@ -81,7 +82,7 @@ public class WorkerController extends BaseController {
|
||||||
public AjaxResult login(@RequestBody Worker worker){
|
public AjaxResult login(@RequestBody Worker worker){
|
||||||
try {
|
try {
|
||||||
Assert.notNull(worker.getPhone(), "手机号码为空");
|
Assert.notNull(worker.getPhone(), "手机号码为空");
|
||||||
List<Worker> workerList = workerService.getWorkList(worker);
|
List<Worker> workerList = workerService.getWorkByPhoneAndPwd(worker);
|
||||||
if(workerList.size() > 0){
|
if(workerList.size() > 0){
|
||||||
return AjaxResult.success(workerList.get(0));
|
return AjaxResult.success(workerList.get(0));
|
||||||
}else {
|
}else {
|
||||||
|
|
@ -154,6 +155,7 @@ public class WorkerController extends BaseController {
|
||||||
worker.setDeptId(this.getSysUser().getDept().getParentId());
|
worker.setDeptId(this.getSysUser().getDept().getParentId());
|
||||||
}
|
}
|
||||||
List<Worker> list = workerService.getWorkList(worker);
|
List<Worker> list = workerService.getWorkList(worker);
|
||||||
|
TableDataInfo dataTable = getDataTable(list);
|
||||||
list.forEach(w -> {
|
list.forEach(w -> {
|
||||||
Goods goods = new Goods();
|
Goods goods = new Goods();
|
||||||
goods.setWorkerId(w.getWorkerId());
|
goods.setWorkerId(w.getWorkerId());
|
||||||
|
|
@ -164,13 +166,18 @@ public class WorkerController extends BaseController {
|
||||||
workerListResponse.setGoodsCategories(workerGoodsCategoryService.getByWorker(w.getWorkerId()));
|
workerListResponse.setGoodsCategories(workerGoodsCategoryService.getByWorker(w.getWorkerId()));
|
||||||
workerListResponse.setSpecialSkills(specialSkillService.getByWorker(w.getWorkerId()));
|
workerListResponse.setSpecialSkills(specialSkillService.getByWorker(w.getWorkerId()));
|
||||||
resList.add(workerListResponse);
|
resList.add(workerListResponse);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
TableDataInfo rspData = new TableDataInfo();
|
||||||
|
rspData.setCode(0);
|
||||||
|
rspData.setRows(resList);
|
||||||
|
rspData.setTotal(dataTable.getTotal());
|
||||||
|
return rspData;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
logger.error(ExceptionUtil.getExceptionMessage(e));
|
logger.error(ExceptionUtil.getExceptionMessage(e));
|
||||||
|
return getDataTable(new ArrayList<>());
|
||||||
}
|
}
|
||||||
|
|
||||||
return getDataTable(resList);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/app/list")
|
@PostMapping("/app/list")
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package com.ghy.web.pojo.vo;
|
||||||
|
|
||||||
import com.alibaba.fastjson.annotation.JSONField;
|
import com.alibaba.fastjson.annotation.JSONField;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.ghy.goods.domain.Goods;
|
||||||
import com.ghy.goods.domain.GoodsArea;
|
import com.ghy.goods.domain.GoodsArea;
|
||||||
import com.ghy.order.domain.AfterServiceRecord;
|
import com.ghy.order.domain.AfterServiceRecord;
|
||||||
import com.ghy.payment.domain.FinancialChangeRecord;
|
import com.ghy.payment.domain.FinancialChangeRecord;
|
||||||
|
|
@ -147,4 +148,8 @@ public class OrderListResponse {
|
||||||
* 超时扣款次数
|
* 超时扣款次数
|
||||||
*/
|
*/
|
||||||
private Integer timeoutFineTimes;
|
private Integer timeoutFineTimes;
|
||||||
|
|
||||||
|
private String orderMode;
|
||||||
|
|
||||||
|
private Goods goods;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
<html lang="en" xmlns:th="http://www.thymeleaf.org">
|
<html lang="en" xmlns:th="http://www.thymeleaf.org">
|
||||||
<head>
|
<head>
|
||||||
<th:block th:include="include :: header('模板新增')"/>
|
<th:block th:include="include :: header('模板新增')"/>
|
||||||
|
<th:block th:include="include :: layout-latest-css"/>
|
||||||
|
<th:block th:include="include :: bootstrap-fileinput-css"/>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
|
|
@ -173,7 +175,7 @@
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
<div class="input-group date">
|
<div class="input-group date">
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
<input type="text" class="form-control" id="servDate" name="servDate" required>
|
<input type="text" class="form-control" id="servDate" name="servDate" required readonly style="background: white;">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
|
|
@ -201,9 +203,8 @@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-2 control-label is-required">图片上传:</label>
|
<label class="col-sm-2 control-label is-required">图片上传:</label>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<div class="file-loading">
|
<input type="text" name="imageUrl" value="" hidden>
|
||||||
<input id="multipleFile" name="files" type="file" multiple>
|
<input type="file" name="imageUrlStr" id="imageUrlStr" multiple class="file" />
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -245,15 +246,15 @@
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-2 control-label is-required">下单模式:</label>
|
<label class="col-sm-2 control-label is-required">下单模式:</label>
|
||||||
<div class="col-sm-8 row">
|
<div class="col-sm-8 row" id="orderModeRadioGroup">
|
||||||
<div class="col-sm-2">
|
<div class="col-sm-2">
|
||||||
<label><input type="radio" checked="" value="1" name="orderMode"> 带价发布</label>
|
<label><input id="publishWithPrice" type="radio" value="02" name="orderMode" checked onclick="selectPublishWithPrice(this)"> 带价发布</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-2">
|
<div class="col-sm-2">
|
||||||
<label><input type="radio" value="2" name="orderMode"> 一票价发布</label>
|
<label><input type="radio" value="01" name="orderMode"> 一票价发布</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-2">
|
<div class="col-sm-2">
|
||||||
<label><input type="radio" value="3" name="orderMode"> 回收模式</label>
|
<label><input type="radio" value="01" name="orderMode"> 回收模式</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -274,7 +275,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-2">
|
<div class="col-sm-2">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input type="text" name="informationFee" class="form-control" required placeholder="信息费">
|
<input type="text" name="informationFee" class="form-control" placeholder="信息费">
|
||||||
<div class="input-group-btn">
|
<div class="input-group-btn">
|
||||||
<button data-toggle="dropdown" class="btn btn-white dropdown-toggle dropdown-btn" type="button" id="informationFeeUnit">单位<span class="caret"></span></button>
|
<button data-toggle="dropdown" class="btn btn-white dropdown-toggle dropdown-btn" type="button" id="informationFeeUnit">单位<span class="caret"></span></button>
|
||||||
<ul class="dropdown-menu pull-right">
|
<ul class="dropdown-menu pull-right">
|
||||||
|
|
@ -347,8 +348,7 @@
|
||||||
<div class="oper-banner-end col-sm-5">
|
<div class="oper-banner-end col-sm-5">
|
||||||
<div class="m-r">
|
<div class="m-r">
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<label>
|
<label><input id="payOnDoorMode" type="checkbox" value="02" name="orderMode" onclick="changePayOnDoorMode(this)">上门到付/保外单</label>
|
||||||
<input type="checkbox" value="1" name="isPayOffline">线下到付</label>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="m-r">
|
<div class="m-r">
|
||||||
|
|
@ -364,8 +364,10 @@
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<th:block th:include="include :: footer"/>
|
<th:block th:include="include :: footer"/>
|
||||||
|
<th:block th:include="include :: layout-latest-js"/>
|
||||||
<th:block th:include="include :: jquery-cxselect-js" />
|
<th:block th:include="include :: jquery-cxselect-js" />
|
||||||
<th:block th:include="include :: datetimepicker-js" />
|
<th:block th:include="include :: datetimepicker-js" />
|
||||||
|
<th:block th:include="include :: bootstrap-fileinput-js"/>
|
||||||
<script th:src="@{/js/plugins/miniCascader/cascader.js}"></script>
|
<script th:src="@{/js/plugins/miniCascader/cascader.js}"></script>
|
||||||
<script th:src="@{/data/four-level-area.js}"></script>
|
<script th:src="@{/data/four-level-area.js}"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
@ -531,6 +533,18 @@
|
||||||
<!-- })-->
|
<!-- })-->
|
||||||
<!-- }-->
|
<!-- }-->
|
||||||
|
|
||||||
|
function selectPublishWithPrice(e) {
|
||||||
|
<!-- if ($(e).is(':checked')) {-->
|
||||||
|
<!-- $('#payOnDoorMode').prop("checked", false);-->
|
||||||
|
<!-- }-->
|
||||||
|
}
|
||||||
|
|
||||||
|
function changePayOnDoorMode(e) {
|
||||||
|
<!-- if ($(e).is(':checked')) {-->
|
||||||
|
<!-- $('#publishWithPrice').prop("checked", false);-->
|
||||||
|
<!-- }-->
|
||||||
|
}
|
||||||
|
|
||||||
function validSpecialComponent() {
|
function validSpecialComponent() {
|
||||||
// 类目
|
// 类目
|
||||||
let categoryIds = categoryCascader.getCheckedByID();
|
let categoryIds = categoryCascader.getCheckedByID();
|
||||||
|
|
@ -539,6 +553,12 @@
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 图片是否上传
|
||||||
|
if (!$('input[name=imageUrl]').val()) {
|
||||||
|
$.modal.msgError("图片未上传")
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// 地区
|
// 地区
|
||||||
let checkedAreaPathList = areaCascader.getCheckedPaths();
|
let checkedAreaPathList = areaCascader.getCheckedPaths();
|
||||||
if (!checkedAreaPathList || checkedAreaPathList.length === 0) {
|
if (!checkedAreaPathList || checkedAreaPathList.length === 0) {
|
||||||
|
|
@ -546,13 +566,16 @@
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 下单模式
|
||||||
|
if (!$('#orderModeRadioGroup input[name=orderMode]').is(':checked')) {
|
||||||
|
$.modal.msgError("请录入完整必填信息")
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function submitOrder() {
|
function translateForm(data) {
|
||||||
if (!validSpecialComponent()) return;
|
|
||||||
if ($.validate.form()) {
|
|
||||||
var data = $("#addTemplateForm").serializeArray();
|
|
||||||
var params = {};
|
var params = {};
|
||||||
data.forEach(function (item){
|
data.forEach(function (item){
|
||||||
params[item.name] = item.value;
|
params[item.name] = item.value;
|
||||||
|
|
@ -575,6 +598,38 @@
|
||||||
params.districtId = areaCascader.getCheckedPaths()[0][2];
|
params.districtId = areaCascader.getCheckedPaths()[0][2];
|
||||||
params.streetId = areaCascader.getCheckedPaths()[0][3];
|
params.streetId = areaCascader.getCheckedPaths()[0][3];
|
||||||
|
|
||||||
|
return params;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 营业执照上传
|
||||||
|
$('#imageUrlStr').fileinput({
|
||||||
|
language: 'zh', //设置语言
|
||||||
|
dropZoneEnabled: false, //是否显示拖拽区域
|
||||||
|
showPreview: false,
|
||||||
|
uploadExtraData: {
|
||||||
|
"name": "imageUrlStr"
|
||||||
|
},
|
||||||
|
dropZoneTitle: "可以将图片拖放到这里", //拖拽区域显示文字
|
||||||
|
uploadUrl: ctx + 'tool/qiniu/dept/upload', //上传路径
|
||||||
|
allowedFileExtensions: ['jpg', 'png', 'gif', 'jpeg'], //指定上传文件类型
|
||||||
|
maxFileSize: 0,
|
||||||
|
maxFileSize: 2048, //上传文件最大值,单位kb
|
||||||
|
uploadAsync: true, //异步上传
|
||||||
|
maxFileCount: 2 //上传文件最大个数。
|
||||||
|
}).on("fileuploaded", function(event,data) { //异步上传成功后回调
|
||||||
|
if(data.response.code === 0){
|
||||||
|
$("input[name='imageUrl']").val(data.response.url)
|
||||||
|
}else {
|
||||||
|
alert("上传失败!");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function submitOrder() {
|
||||||
|
if (!validSpecialComponent()) return;
|
||||||
|
if ($.validate.form()) {
|
||||||
|
var data = $("#addTemplateForm").serializeArray();
|
||||||
|
var params= translateForm(data);
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
dataType:"json",
|
dataType:"json",
|
||||||
|
|
@ -583,12 +638,29 @@
|
||||||
contentType: 'application/json',
|
contentType: 'application/json',
|
||||||
success: function (result) {
|
success: function (result) {
|
||||||
if (result.code == web_status.SUCCESS) {
|
if (result.code == web_status.SUCCESS) {
|
||||||
$.modal.msgSuccess("提交成功")
|
layer.open({
|
||||||
|
type: 0,
|
||||||
|
area: ['250px', '180px'],
|
||||||
|
fix: false,
|
||||||
|
//不固定
|
||||||
|
maxmin: true,
|
||||||
|
shade: 0.3,
|
||||||
|
title: '系统通知',
|
||||||
|
content: '发单成功,是否前往发单管理?',
|
||||||
|
btn: ['确定','继续下单'],
|
||||||
|
// 弹层外区域关闭
|
||||||
|
shadeClose: true,
|
||||||
|
yes: function(index) {
|
||||||
|
$.modal.parentTab('发单管理', 'order/master/pc');
|
||||||
|
}
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
$.modal.msgError("请求失败")
|
$.modal.msgError("请求失败")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
$.modal.msgError("请录入完整必填信息")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -596,27 +668,7 @@
|
||||||
if (!validSpecialComponent()) return;
|
if (!validSpecialComponent()) return;
|
||||||
if ($.validate.form()) {
|
if ($.validate.form()) {
|
||||||
var data = $("#addTemplateForm").serializeArray();
|
var data = $("#addTemplateForm").serializeArray();
|
||||||
var params= {};
|
var params= translateForm(data);
|
||||||
data.forEach(function (item){
|
|
||||||
params[item.name] = item.value;
|
|
||||||
});
|
|
||||||
|
|
||||||
let categoryIds = categoryCascader.getCheckedByID();
|
|
||||||
let orderGoodsStandards = [];
|
|
||||||
categoryIds.forEach(function (item){
|
|
||||||
orderGoodsStandards.push({
|
|
||||||
deptCategoryId: item,
|
|
||||||
goodsStandardNum: $(".goodsNum[name=goodsNum" + item + "]").val()
|
|
||||||
});
|
|
||||||
});
|
|
||||||
params.orderGoodsStandards = orderGoodsStandards;
|
|
||||||
params.categoryId1 = categoryCascader.getCheckedPaths()[0][0];
|
|
||||||
params.categoryId2 = categoryCascader.getCheckedPaths()[0][1];
|
|
||||||
params.categoryId3 = categoryCascader.getCheckedPaths()[0][2];
|
|
||||||
params.provinceId = areaCascader.getCheckedPaths()[0][0];
|
|
||||||
params.cityId = areaCascader.getCheckedPaths()[0][1];
|
|
||||||
params.districtId = areaCascader.getCheckedPaths()[0][2];
|
|
||||||
params.streetId = areaCascader.getCheckedPaths()[0][3];
|
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,289 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('指派师傅')"/>
|
||||||
|
<th:block th:include="include :: layout-latest-css"/>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.custom-container {
|
||||||
|
padding: 0 30px 20px 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flex-board {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flex-board-no-wrap {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flex-board.select-content {
|
||||||
|
flex-basis: 100%
|
||||||
|
}
|
||||||
|
|
||||||
|
.flex-board.select-content .flex-board-no-wrap {
|
||||||
|
flex-basis: 90%
|
||||||
|
}
|
||||||
|
|
||||||
|
.flex-board.input-content {
|
||||||
|
flex-basis: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flex-board.input-content input {
|
||||||
|
flex-basis: 75%
|
||||||
|
}
|
||||||
|
|
||||||
|
.specCanAssignNum {
|
||||||
|
text-align: center;
|
||||||
|
line-height: 31px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="gray-bg">
|
||||||
|
<div class="animated fadeInRight row custom-container">
|
||||||
|
<div class="col-sm-12 search-collapse">
|
||||||
|
<form class="m" id="canAssignSpecForm">
|
||||||
|
<div id="canAssignSpecList" class="m-b">
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-4">
|
||||||
|
<span>派单金额:</span>
|
||||||
|
<span id="moneyCanAssign"></span>
|
||||||
|
<span>元</span>
|
||||||
|
</div>
|
||||||
|
<!-- <div class="col-sm-5">-->
|
||||||
|
<!-- <div class="flex-board input-content">-->
|
||||||
|
<!-- <label class="form-control-label">派出金额:</label>-->
|
||||||
|
<!-- <input name="totalPay" type="number" class="form-control">-->
|
||||||
|
<!-- </div>-->
|
||||||
|
<!-- </div>-->
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-sm-12 search-collapse">
|
||||||
|
<form class="flex-board m" id="workerForm">
|
||||||
|
<div class="flex-board select-content m-t">
|
||||||
|
<label class="form-control-label">区域筛选:</label>
|
||||||
|
<div id="areaCxSelect" class="flex-board-no-wrap">
|
||||||
|
<select class="province form-control cx-select-input m-r" name="province" id="province" data-first-title="选择省" onchange="selectRegion('province', 'city')"></select>
|
||||||
|
<select class="city form-control cx-select-input m-r" name="city" id="city" data-first-title="选择市" onchange="selectRegion('city', 'district')"></select>
|
||||||
|
<select class="district form-control cx-select-input m-r" name="areaId" id="district" data-first-title="选择区" onchange="selectRegion('district', 'street')"></select>
|
||||||
|
<select class="street form-control cx-select-input m-r" name="streetId" id="streetId" data-first-title="选择街道" ></select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex-board select-content m-t">
|
||||||
|
<label class="form-control-label">类别筛选:</label>
|
||||||
|
<div id="categoryCxSelect" class="flex-board-no-wrap">
|
||||||
|
<select class="category1 form-control cx-select-input m-r" name="category1" id="category1" data-first-title="选择一类"></select>
|
||||||
|
<select class="category2 form-control cx-select-input m-r" name="category2" id="category2" data-first-title="选择二类"></select>
|
||||||
|
<select class="category3 form-control cx-select-input m-r" name="goodsCategoryId" id="category3" data-first-title="选择三类"></select>
|
||||||
|
<select class="category4 form-control cx-select-input m-r" name="category4" id="category4" data-first-title="选择四类" ></select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex-board input-content m-t">
|
||||||
|
<label class="form-control-label">人员名称:</label>
|
||||||
|
<input name="workerName" type="text" class="form-control normal-input m-r">
|
||||||
|
</div>
|
||||||
|
<div class="m-t">
|
||||||
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search('workerForm')"><i
|
||||||
|
class="fa fa-search"></i> 搜索</a>
|
||||||
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('workerForm')"><i
|
||||||
|
class="fa fa-refresh"></i> 重置</a>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-sm-12 select-table table-striped">
|
||||||
|
<table id="bootstrap-table"></table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer"/>
|
||||||
|
<th:block th:include="include :: jquery-cxselect-js" />
|
||||||
|
<script type="text/javascript">
|
||||||
|
var orderMasterId = '[[${orderId}]]';
|
||||||
|
var prefix = ctx + "worker"
|
||||||
|
|
||||||
|
$(function () {
|
||||||
|
loadCanAssignSpecInfo();
|
||||||
|
initForm();
|
||||||
|
initTable();
|
||||||
|
});
|
||||||
|
|
||||||
|
function loadCanAssignSpecInfo() {
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
dataType:"json",
|
||||||
|
url: ctx + "order/can/assign",
|
||||||
|
data: JSON.stringify({orderMasterId: orderMasterId}),
|
||||||
|
contentType: 'application/json',
|
||||||
|
success: function (result) {
|
||||||
|
if (result.code == web_status.SUCCESS) {
|
||||||
|
$('#canAssignSpecList').html('');
|
||||||
|
$.each(result.data, function(index, spec) {
|
||||||
|
$('#canAssignSpecList').append(
|
||||||
|
'<div class="row m-b">' +
|
||||||
|
' <div class="col-sm-6">' +
|
||||||
|
' <input disabled class="form-control" value="' + spec.goodsName +'">' +
|
||||||
|
' </div>' +
|
||||||
|
' <div class="col-sm-2 specCanAssignNum">' +
|
||||||
|
spec.goodsNum +
|
||||||
|
' </div>' +
|
||||||
|
'</div>'
|
||||||
|
)
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
$.modal.msgError("数据加载错误,请重试!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
dataType:"json",
|
||||||
|
url: ctx + "order/master/app/detail",
|
||||||
|
data: JSON.stringify({id: orderMasterId}),
|
||||||
|
contentType: 'application/json',
|
||||||
|
success: function (result) {
|
||||||
|
if (result.code == web_status.SUCCESS) {
|
||||||
|
$('#moneyCanAssign').html(result.data.serverMoney);
|
||||||
|
} else {
|
||||||
|
$.modal.msgError("数据加载错误,请重试!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function initForm() {
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
dataType:"json",
|
||||||
|
url: ctx + "system/area/list",
|
||||||
|
success: function (result) {
|
||||||
|
if (result.code == web_status.SUCCESS) {
|
||||||
|
$('#areaCxSelect').cxSelect({
|
||||||
|
selects: ['province', 'city', 'district', 'street'],
|
||||||
|
jsonValue: 'areaId',
|
||||||
|
jsonName: 'areaName',
|
||||||
|
data: result.data
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
$.modal.msgError("数据加载错误,请重试!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
dataType:"json",
|
||||||
|
url: ctx + "goods/deptcategory/app/list",
|
||||||
|
data: JSON.stringify({deptId: 101, goodsCategoryId: 1}),
|
||||||
|
contentType: 'application/json',
|
||||||
|
success: function (result) {
|
||||||
|
if (result.code == web_status.SUCCESS) {
|
||||||
|
$('#categoryCxSelect').cxSelect({
|
||||||
|
selects: ['category1', 'category2', 'category3', 'category4'],
|
||||||
|
jsonValue: 'goodsCategoryId',
|
||||||
|
jsonName: 'goodsCategoryName',
|
||||||
|
jsonSub: 'child',
|
||||||
|
data: result.data
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
$.modal.msgError("数据加载错误,请重试!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function initTable() {
|
||||||
|
var options = {
|
||||||
|
url: prefix + "/list",
|
||||||
|
modalName: "师傅派单列表",
|
||||||
|
firstLoad: false,
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
checkbox: true
|
||||||
|
}, {
|
||||||
|
field: 'name',
|
||||||
|
title: '人员名称',
|
||||||
|
align: "left"
|
||||||
|
}, {
|
||||||
|
field: 'phone',
|
||||||
|
title: '手机号',
|
||||||
|
align: "left"
|
||||||
|
}, {
|
||||||
|
title: '操作',
|
||||||
|
align: 'left',
|
||||||
|
formatter: function (value, row, index) {
|
||||||
|
var actions = [];
|
||||||
|
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="assign(' + row.workerId + ')">指派</a> ');
|
||||||
|
return actions.join('');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
$.table.init(options);
|
||||||
|
$.table.search('workerForm');
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectRegion(regionLevelName, nextRegionLevelName) {
|
||||||
|
var regionId = $("#" + regionLevelName).val();
|
||||||
|
if ($.common.isEmpty(regionId)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Ajax调用处理
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
dataType:"json",
|
||||||
|
url: ctx + "system/area/list",
|
||||||
|
data: {parentCode: regionId},
|
||||||
|
success: function (result) {
|
||||||
|
if (result.code == web_status.SUCCESS) {
|
||||||
|
$('#areaCxSelect').cxSelect({
|
||||||
|
selects: [nextRegionLevelName],
|
||||||
|
jsonValue: 'areaId',
|
||||||
|
jsonName: 'areaName',
|
||||||
|
data: result.data
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
$.modal.msgError("数据加载错误,请重试!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function assign(workerId) {
|
||||||
|
var params = {
|
||||||
|
id: orderMasterId,
|
||||||
|
workerId: workerId,
|
||||||
|
orderStatus: 0
|
||||||
|
};
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
dataType:"json",
|
||||||
|
url: ctx + "order/master/editOrderMaster",
|
||||||
|
data: JSON.stringify(params),
|
||||||
|
contentType: 'application/json',
|
||||||
|
success: function (result) {
|
||||||
|
if (result.code == web_status.SUCCESS) {
|
||||||
|
$.modal.msgSuccess("指派成功")
|
||||||
|
parent.layer.close(parent.layer.getFrameIndex(window.name));
|
||||||
|
} else {
|
||||||
|
$.modal.msgError("指派失败")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
|
|
@ -50,6 +50,12 @@
|
||||||
.long-input {
|
.long-input {
|
||||||
width: 400px;
|
width: 400px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.active-condition-btn {
|
||||||
|
background-color: #1c84c6;
|
||||||
|
border-color: #1c84c6;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body class="gray-bg">
|
<body class="gray-bg">
|
||||||
|
|
@ -62,55 +68,62 @@
|
||||||
<input type="hidden" id="deptId" name="deptId">
|
<input type="hidden" id="deptId" name="deptId">
|
||||||
<input type="hidden" id="parentId" name="parentId">
|
<input type="hidden" id="parentId" name="parentId">
|
||||||
<input type="hidden" id="orderStatus" name="orderStatus"/>
|
<input type="hidden" id="orderStatus" name="orderStatus"/>
|
||||||
<div>
|
<div class="condition-btn">
|
||||||
<select id="allOrServing">
|
<select id="allOrServing">
|
||||||
<option value="">全部</option>
|
<option value="">全部</option>
|
||||||
<option value="">在途</option>
|
<option value="">在途</option>
|
||||||
</select>
|
</select>
|
||||||
<a class="btn btn-default btn-outline">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {sysPayStatus: 0})">
|
||||||
待付款
|
待付款
|
||||||
|
(<span id="nonPaidOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 1})">
|
||||||
已发布
|
已接单
|
||||||
|
(<span id="acceptedOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 2})">
|
||||||
未约时
|
|
||||||
</a>
|
|
||||||
<a class="btn btn-default btn-outline">
|
|
||||||
未排班
|
|
||||||
</a>
|
|
||||||
<a class="btn btn-default btn-outline" onclick="searchByOrderStatus(2)">
|
|
||||||
待上门
|
待上门
|
||||||
|
(<span id="waitForDoorOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="searchByOrderStatus(3)">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 3})">
|
||||||
进行中
|
进行中
|
||||||
|
(<span id="servingOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="searchByOrderStatus(4)">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 4})">
|
||||||
确认审核
|
确认审核
|
||||||
|
(<span class="confirmingOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="searchByOrderStatus(5)">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 5})">
|
||||||
完成
|
完成
|
||||||
|
(<span id="finishedOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="searchByOrderStatus(6)">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 6})">
|
||||||
关闭
|
关闭
|
||||||
|
(<span id="canceledOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
<a class="btn btn-default btn-outline" onclick="selectOnDoorOrderToday(this)">
|
||||||
今日待上门
|
今日待上门
|
||||||
|
(<span id="todayOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
<a class="btn btn-default btn-outline" onclick="selectOnDoorOrderTomorrow(this)">
|
||||||
明日待上门
|
明日待上门
|
||||||
|
(<span id="tomorrowOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {searchAfterList: true})">
|
||||||
售后
|
售后
|
||||||
|
(<span id="afterServiceOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: -1})">
|
||||||
急报中
|
急报中
|
||||||
|
(<span>0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: -1})">
|
||||||
退单
|
退单
|
||||||
|
(<span>0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: -1})">
|
||||||
售后纠纷
|
售后纠纷
|
||||||
|
(<span>0</span>)
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-board">
|
<div class="flex-board">
|
||||||
|
|
@ -127,36 +140,36 @@
|
||||||
创建时间:
|
创建时间:
|
||||||
<div class="input-group date">
|
<div class="input-group date">
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
<input type="text" class="form-control date-input" placeholder="开始日期">
|
<input id="createTimeStart" type="text" class="form-control date-input" placeholder="开始日期" readonly>
|
||||||
</div>
|
</div>
|
||||||
至
|
至
|
||||||
<div class="input-group date m-r">
|
<div class="input-group date m-r">
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
<input type="text" class="form-control date-input" placeholder="结束日期">
|
<input id="createTimeEnd" type="text" class="form-control date-input" placeholder="结束日期" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-board m-t">
|
<div class="flex-board m-t">
|
||||||
服务时间:
|
服务时间:
|
||||||
<div class="input-group date">
|
<div class="input-group date">
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
<input type="text" class="form-control date-input" placeholder="开始日期">
|
<input id="workBeginTimeStart" type="text" class="form-control date-input" placeholder="开始日期" readonly>
|
||||||
</div>
|
</div>
|
||||||
至
|
至
|
||||||
<div class="input-group date m-r">
|
<div class="input-group date m-r">
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
<input type="text" class="form-control date-input" placeholder="结束日期">
|
<input id="workBeginTimeEnd" type="text" class="form-control date-input" placeholder="结束日期" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-board m-t">
|
<div class="flex-board m-t">
|
||||||
完成时间:
|
完成时间:
|
||||||
<div class="input-group date">
|
<div class="input-group date">
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
<input type="text" class="form-control date-input" placeholder="开始日期">
|
<input id="workFinishTimeStart" type="text" class="form-control date-input" placeholder="开始日期" readonly>
|
||||||
</div>
|
</div>
|
||||||
至
|
至
|
||||||
<div class="input-group date m-r">
|
<div class="input-group date m-r">
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||||
<input type="text" class="form-control date-input" placeholder="结束日期">
|
<input id="workFinishTimeEnd" type="text" class="form-control date-input" placeholder="结束日期" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-board m-t">
|
<div class="flex-board m-t">
|
||||||
|
|
@ -168,35 +181,35 @@
|
||||||
<select class="category4 form-control cx-select-input m-r" name="category4" id="category4" data-first-title="选择四类" ></select>
|
<select class="category4 form-control cx-select-input m-r" name="category4" id="category4" data-first-title="选择四类" ></select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-board-no-wrap m-t">
|
<!-- <div class="flex-board-no-wrap m-t">-->
|
||||||
<label class="form-control-label">后台人员:</label>
|
<!-- <label class="form-control-label">后台人员:</label>-->
|
||||||
<input type="text" class="form-control normal-input m-r">
|
<!-- <input type="text" class="form-control normal-input m-r">-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<div class="flex-board-no-wrap m-t">
|
<div class="flex-board-no-wrap m-t">
|
||||||
<label class="form-control-label">商家名称:</label>
|
<label class="form-control-label">商家名称:</label>
|
||||||
<input type="text" class="form-control normal-input m-r">
|
<input id="storeName" type="text" class="form-control normal-input m-r">
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-board-no-wrap m-t">
|
<div class="flex-board-no-wrap m-t">
|
||||||
<label class="form-control-label">商家电话:</label>
|
<label class="form-control-label">商家电话:</label>
|
||||||
<input type="text" class="form-control normal-input m-r">
|
<input id="storePhone" type="text" class="form-control normal-input m-r">
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-board-no-wrap m-t">
|
<div class="flex-board-no-wrap m-t">
|
||||||
<label class="form-control-label">接单师傅名称:</label>
|
<label class="form-control-label">接单师傅名称:</label>
|
||||||
<input type="text" class="form-control normal-input m-r">
|
<input id="workerName" type="text" class="form-control normal-input m-r">
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-board-no-wrap m-t">
|
<div class="flex-board-no-wrap m-t">
|
||||||
<label class="form-control-label">接单师傅电话:</label>
|
<label class="form-control-label">接单师傅电话:</label>
|
||||||
<input type="text" class="form-control normal-input m-r">
|
<input id="workerPhone" type="text" class="form-control normal-input m-r">
|
||||||
</div>
|
|
||||||
<div class="flex-board-no-wrap m-t">
|
|
||||||
<label class="form-control-label">师傅类型:</label>
|
|
||||||
<select class="form-control normal-select-input m-r">
|
|
||||||
<option value="">全部</option>
|
|
||||||
<option value="">大师傅</option>
|
|
||||||
<option value="">小师傅</option>
|
|
||||||
</select>
|
|
||||||
<input type="text" class="form-control normal-input m-r" placeholder="师傅姓名电话">
|
|
||||||
</div>
|
</div>
|
||||||
|
<!-- <div class="flex-board-no-wrap m-t">-->
|
||||||
|
<!-- <label class="form-control-label">师傅类型:</label>-->
|
||||||
|
<!-- <select class="form-control normal-select-input m-r">-->
|
||||||
|
<!-- <option value="">全部</option>-->
|
||||||
|
<!-- <option value="">大师傅</option>-->
|
||||||
|
<!-- <option value="">小师傅</option>-->
|
||||||
|
<!-- </select>-->
|
||||||
|
<!-- <input type="text" class="form-control normal-input m-r" placeholder="师傅姓名电话">-->
|
||||||
|
<!-- </div>-->
|
||||||
<div class="flex-board-no-wrap m-t">
|
<div class="flex-board-no-wrap m-t">
|
||||||
<label class="form-control-label">订单模式:</label>
|
<label class="form-control-label">订单模式:</label>
|
||||||
<select id="orderMode" class="form-control normal-select-input m-r" onchange="changeOrderMode(this.options[this.options.selectedIndex].value)">
|
<select id="orderMode" class="form-control normal-select-input m-r" onchange="changeOrderMode(this.options[this.options.selectedIndex].value)">
|
||||||
|
|
@ -225,48 +238,59 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-board-no-wrap m-t">
|
<div class="flex-board-no-wrap m-t">
|
||||||
<label class="form-control-label">订单查询:</label>
|
<label class="form-control-label">订单查询:</label>
|
||||||
<input type="text" class="form-control long-input m-r" placeholder="请输入订单号、姓名、电话或地址、品牌、规格">
|
<input id="keyWords" type="text" class="form-control long-input m-r" placeholder="请输入订单号、姓名、电话或地址、品牌、规格">
|
||||||
</div>
|
</div>
|
||||||
<div class="m-t">
|
<div class="m-t">
|
||||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="searchByForm()"><i
|
||||||
class="fa fa-search"></i> 搜索</a>
|
class="fa fa-search"></i> 搜索</a>
|
||||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="resetForm()"><i
|
||||||
class="fa fa-refresh"></i> 重置</a>
|
class="fa fa-refresh"></i> 重置</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="m-t">
|
<div class="m-t condition-btn">
|
||||||
<a class="btn btn-default btn-outline" onclick="searchByOrderStatus(0)">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 0})">
|
||||||
新订单
|
新订单
|
||||||
|
(<span id="newOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {timeout: 1, orderStatus: 0})">
|
||||||
接单超时
|
接单超时
|
||||||
|
(<span id="newOrderTimeoutNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {timeout: 1, orderStatus: 1})">
|
||||||
约单超时
|
约单超时
|
||||||
|
(<span class="acceptedTimeoutOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {timeout: 1, orderStatus: 1})">
|
||||||
排单超时
|
排单超时
|
||||||
|
(<span class="acceptedTimeoutOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: -1})">
|
||||||
无法排单
|
无法排单
|
||||||
|
(<span>0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {timeout: 1, orderStatus: 2})">
|
||||||
待上门超时
|
待上门超时
|
||||||
|
(<span id="waitForDoorTimeoutOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {timeout: 1, orderStatus: 3})">
|
||||||
进行超时
|
进行超时
|
||||||
|
(<span id="servingTimeoutOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: -1})">
|
||||||
售后超时
|
售后超时
|
||||||
|
(<span>0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: -1})">
|
||||||
客诉中
|
客诉中
|
||||||
|
(<span>0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {timeout: 1, orderStatus: 4})">
|
||||||
审核中
|
审核中
|
||||||
|
(<span class="confirmingOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: -1})">
|
||||||
一票价未改价
|
一票价未改价
|
||||||
|
(<span>0</span>)
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
@ -278,6 +302,9 @@
|
||||||
shiro:hasPermission="order:order:export">
|
shiro:hasPermission="order:order:export">
|
||||||
<i class="fa fa-download"></i> 导出
|
<i class="fa fa-download"></i> 导出
|
||||||
</a>
|
</a>
|
||||||
|
<!-- <a class="btn btn-default" onclick="$.table.exportExcel()">-->
|
||||||
|
<!-- <i class="fa fa-download"></i> 指派-->
|
||||||
|
<!-- </a>-->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -301,6 +328,7 @@
|
||||||
|
|
||||||
var editFlag = [[${@permission.hasPermi('order:order:edit')}]];
|
var editFlag = [[${@permission.hasPermi('order:order:edit')}]];
|
||||||
var prefix = ctx + "order/detail";
|
var prefix = ctx + "order/detail";
|
||||||
|
var customParams = {};
|
||||||
|
|
||||||
$(function () {
|
$(function () {
|
||||||
var panehHidden = false;
|
var panehHidden = false;
|
||||||
|
|
@ -364,6 +392,110 @@
|
||||||
})
|
})
|
||||||
|
|
||||||
changeOrderMode();
|
changeOrderMode();
|
||||||
|
|
||||||
|
<!-- 不同状态订单数量统计-->
|
||||||
|
$.ajax({
|
||||||
|
type: "GET",
|
||||||
|
dataType:"json",
|
||||||
|
url: prefix + '/differentStatus/count',
|
||||||
|
success: function (result) {
|
||||||
|
if (result.code == web_status.SUCCESS) {
|
||||||
|
$('#newOrderNum').text(result.data.newOrderNum);
|
||||||
|
$('#acceptedOrderNum').text(result.data.acceptedOrderNum);
|
||||||
|
$('#canceledOrderNum').text(result.data.canceledOrderNum);
|
||||||
|
$('.confirmingOrderNum').text(result.data.confirmingOrderNum);
|
||||||
|
$('#finishedOrderNum').text(result.data.finishedOrderNum);
|
||||||
|
$('#servingOrderNum').text(result.data.servingOrderNum);
|
||||||
|
$('#waitForDoorOrderNum').text(result.data.waitForDoorOrderNum);
|
||||||
|
} else {
|
||||||
|
$.modal.msgError("数据加载错误,请重试!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
<!-- 不同状态超时订单数量统计-->
|
||||||
|
$.ajax({
|
||||||
|
type: "GET",
|
||||||
|
dataType:"json",
|
||||||
|
url: prefix + '/differentStatus/count',
|
||||||
|
data: {timeout: 1},
|
||||||
|
success: function (result) {
|
||||||
|
if (result.code == web_status.SUCCESS) {
|
||||||
|
$('#newTimeoutOrderNum').text(result.data.newOrderNum);
|
||||||
|
$('.acceptedTimeoutOrderNum').text(result.data.acceptedOrderNum);
|
||||||
|
$('#servingTimeoutOrderNum').text(result.data.servingOrderNum);
|
||||||
|
$('#waitForDoorTimeoutOrderNum').text(result.data.waitForDoorOrderNum);
|
||||||
|
} else {
|
||||||
|
$.modal.msgError("数据加载错误,请重试!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
<!-- 待付款订单数量统计-->
|
||||||
|
$.ajax({
|
||||||
|
type: "GET",
|
||||||
|
dataType:"json",
|
||||||
|
url: prefix + '/count',
|
||||||
|
data: {sysPayStatus: 0},
|
||||||
|
success: function (result) {
|
||||||
|
if (result.code == web_status.SUCCESS) {
|
||||||
|
$('#nonPaidOrderNum').text(result.data);
|
||||||
|
} else {
|
||||||
|
$.modal.msgError("数据加载错误,请重试!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
<!-- 今日和明日单数量统计-->
|
||||||
|
var date = new Date();
|
||||||
|
$.ajax({
|
||||||
|
type: "GET",
|
||||||
|
dataType:"json",
|
||||||
|
url: prefix + '/count',
|
||||||
|
data: {
|
||||||
|
orderStatus: 2,
|
||||||
|
expectTimeStart: date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + " 00:00:00",
|
||||||
|
expectTimeEnd: date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + " 23:59:59"
|
||||||
|
},
|
||||||
|
success: function (result) {
|
||||||
|
if (result.code == web_status.SUCCESS) {
|
||||||
|
$('#todayOrderNum').text(result.data);
|
||||||
|
} else {
|
||||||
|
$.modal.msgError("数据加载错误,请重试!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
$.ajax({
|
||||||
|
type: "GET",
|
||||||
|
dataType:"json",
|
||||||
|
url: prefix + '/count',
|
||||||
|
data: {
|
||||||
|
orderStatus: 2,
|
||||||
|
expectTimeStart: date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + (date.getDate() + 1) + " 00:00:00",
|
||||||
|
expectTimeEnd: date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + (date.getDate() + 1) + " 23:59:59"
|
||||||
|
},
|
||||||
|
success: function (result) {
|
||||||
|
if (result.code == web_status.SUCCESS) {
|
||||||
|
$('#tomorrowOrderNum').text(result.data);
|
||||||
|
} else {
|
||||||
|
$.modal.msgError("数据加载错误,请重试!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
<!-- 售后订单数量统计-->
|
||||||
|
$.ajax({
|
||||||
|
type: "GET",
|
||||||
|
dataType:"json",
|
||||||
|
url: prefix + '/after/count',
|
||||||
|
success: function (result) {
|
||||||
|
if (result.code == web_status.SUCCESS) {
|
||||||
|
$('#afterServiceOrderNum').text(result.data);
|
||||||
|
} else {
|
||||||
|
$.modal.msgError("数据加载错误,请重试!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
function changeOrderMode(orderMode) {
|
function changeOrderMode(orderMode) {
|
||||||
|
|
@ -379,6 +511,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showOrderWorker(id) {
|
||||||
|
var url = "order/detail/orderWorker/" + id;
|
||||||
|
$.modal.open("指派师傅", url, '800', '300');
|
||||||
|
}
|
||||||
|
|
||||||
function selectRegion(regionLevelName, nextRegionLevelName) {
|
function selectRegion(regionLevelName, nextRegionLevelName) {
|
||||||
var regionId = $("#" + regionLevelName).val();
|
var regionId = $("#" + regionLevelName).val();
|
||||||
if ($.common.isEmpty(regionId)) {
|
if ($.common.isEmpty(regionId)) {
|
||||||
|
|
@ -410,6 +547,7 @@
|
||||||
var options = {
|
var options = {
|
||||||
url: prefix + "/list",
|
url: prefix + "/list",
|
||||||
exportUrl: prefix + "/export",
|
exportUrl: prefix + "/export",
|
||||||
|
queryParams: queryParams,
|
||||||
sortName: "createTime",
|
sortName: "createTime",
|
||||||
sortOrder: "desc",
|
sortOrder: "desc",
|
||||||
modalName: "订单",
|
modalName: "订单",
|
||||||
|
|
@ -432,9 +570,9 @@
|
||||||
+ '<small> 订单编号:' + row.code + '<small/> <br>'
|
+ '<small> 订单编号:' + row.code + '<small/> <br>'
|
||||||
+ '<h4> ' + value.goodsName + '<h4/>'
|
+ '<h4> ' + value.goodsName + '<h4/>'
|
||||||
// + '<small> ' + value.goodsDesc + '</small> <br>'
|
// + '<small> ' + value.goodsDesc + '</small> <br>'
|
||||||
+ '<small> 联系人:' + row.addressName + '</small> <br>'
|
+ '<small>' + row.addressName + '</small> <br>'
|
||||||
+ '<small> 联系电话:' + row.addressPhone + '</small> <br>'
|
+ '<small>' + row.addressPhone + '</small> <br>'
|
||||||
+ '<small> 联系地址:' + row.address + '</small> <br>'
|
+ '<small>' + row.address + '</small> <br>'
|
||||||
+ '<small> 下单时间:' + row.createTime + '</small> <br>'
|
+ '<small> 下单时间:' + row.createTime + '</small> <br>'
|
||||||
+ '<small> 预约时间:' + row.expectTimeStart + ' - ' + row.expectTimeEnd + '</small> <br>'
|
+ '<small> 预约时间:' + row.expectTimeStart + ' - ' + row.expectTimeEnd + '</small> <br>'
|
||||||
+ '<small> 总金额:' + row.financialMasterMoney + '元 应得金额:' + row.financialDetailMoney + '元</small> <br>'
|
+ '<small> 总金额:' + row.financialMasterMoney + '元 应得金额:' + row.financialDetailMoney + '元</small> <br>'
|
||||||
|
|
@ -454,8 +592,10 @@
|
||||||
field: 'worker',
|
field: 'worker',
|
||||||
title: '接单信息',
|
title: '接单信息',
|
||||||
formatter: function (value, row, index) {
|
formatter: function (value, row, index) {
|
||||||
<!-- return '<small>' + value.name + value.phone + '</small><br>'-->
|
if(value){
|
||||||
<!-- + '<small>接单时间:' + row.revTime + '</small>';-->
|
return '<small>' + value.name + value.phone + '</small><br>'
|
||||||
|
+ '<small>接单时间:' + value.createTime + '</small>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -466,6 +606,7 @@
|
||||||
actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="detail(\'' + row.id + '\')"><i class="fa fa-info"></i>查看</a> ');
|
actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="detail(\'' + row.id + '\')"><i class="fa fa-info"></i>查看</a> ');
|
||||||
actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="orderDetailReject(\'' + row.id + '\')"></i>师傅退单</a> ');
|
actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="orderDetailReject(\'' + row.id + '\')"></i>师傅退单</a> ');
|
||||||
actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="orderMasterReject(\'' + row.orderMasterId + '\')"></i>商家退单</a> ');
|
actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="orderMasterReject(\'' + row.orderMasterId + '\')"></i>商家退单</a> ');
|
||||||
|
<!-- actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="showOrderWorker(\'' + row.id + '\')"></i>指派</a> ');-->
|
||||||
if (row.payStatus == 0) {
|
if (row.payStatus == 0) {
|
||||||
actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="showPayQrcode(\'' + row.id + '\')"></i>付款</a> ');
|
actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="showPayQrcode(\'' + row.id + '\')"></i>付款</a> ');
|
||||||
}
|
}
|
||||||
|
|
@ -476,8 +617,10 @@
|
||||||
field: 'goodsWorker',
|
field: 'goodsWorker',
|
||||||
title: '商家信息',
|
title: '商家信息',
|
||||||
formatter: function (value, row, index) {
|
formatter: function (value, row, index) {
|
||||||
<!-- return '<small>' + value.name + '</small><br>'-->
|
if(value){
|
||||||
<!-- + '<small>' + value.phone + '</small>';-->
|
return '<small>' + value.name + '</small><br>'
|
||||||
|
+ '<small>' + value.phone + '</small>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -516,6 +659,12 @@
|
||||||
$.table.init(options);
|
$.table.init(options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function queryParams(params) {
|
||||||
|
var search = $.table.queryParams(params);
|
||||||
|
Object.assign(search, customParams)
|
||||||
|
return search;
|
||||||
|
}
|
||||||
|
|
||||||
function detail(id) {
|
function detail(id) {
|
||||||
var url = "order/goods?orderId=" + id;
|
var url = "order/goods?orderId=" + id;
|
||||||
$.modal.open("商品信息", url);
|
$.modal.open("商品信息", url);
|
||||||
|
|
@ -535,8 +684,66 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function searchByOrderStatus(orderStatus) {
|
function changeConditionBtnChosenStyle(e) {
|
||||||
$('#orderStatus').val(orderStatus);
|
$('.condition-btn .btn').removeClass('active-condition-btn');
|
||||||
|
if (e) {
|
||||||
|
$(e).addClass('active-condition-btn');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectConditionBtn(e, params = {}) {
|
||||||
|
changeConditionBtnChosenStyle(e);
|
||||||
|
searchOrderList(params)
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectOnDoorOrderToday(e) {
|
||||||
|
changeConditionBtnChosenStyle(e);
|
||||||
|
var date = new Date();
|
||||||
|
selectConditionBtn(e, {
|
||||||
|
orderStatus: 2,
|
||||||
|
expectTimeStart: date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + " 00:00:00",
|
||||||
|
expectTimeEnd: date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + " 23:59:59"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectOnDoorOrderTomorrow(e) {
|
||||||
|
changeConditionBtnChosenStyle(e);
|
||||||
|
var date = new Date();
|
||||||
|
selectConditionBtn(e, {
|
||||||
|
orderStatus: 2,
|
||||||
|
expectTimeStart: date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + (date.getDate() + 1) + " 00:00:00",
|
||||||
|
expectTimeEnd: date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + (date.getDate() + 1) + " 23:59:59"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function searchOrderList(params) {
|
||||||
|
customParams = params;
|
||||||
|
$.table.search();
|
||||||
|
}
|
||||||
|
|
||||||
|
function searchByForm() {
|
||||||
|
let params = {
|
||||||
|
createTimeStart: $('#createTimeStart').val() ? $('#createTimeStart').val() + " 00:00:00" : undefined,
|
||||||
|
createTimeEnd: $('#createTimeEnd').val() ? $('#createTimeEnd').val() + " 23:59:59" : undefined,
|
||||||
|
workBeginTimeStart: $('#workBeginTimeStart').val(),
|
||||||
|
workBeginTimeEnd: $('#workBeginTimeEnd').val() ? $('#workBeginTimeEnd').val() + " 23:59:59" : undefined,
|
||||||
|
workFinishTimeStart: $('#workFinishTimeStart').val(),
|
||||||
|
workFinishTimeEnd: $('#workFinishTimeEnd').val() ? $('#workFinishTimeEnd').val() + " 23:59:59" : undefined,
|
||||||
|
storeName: $('#storeName').val(),
|
||||||
|
storePhone: $('#storePhone').val(),
|
||||||
|
workerName: $('#workerName').val(),
|
||||||
|
workerPhone: $('#workerPhone').val(),
|
||||||
|
keyWords: $('#keyWords').val()
|
||||||
|
}
|
||||||
|
|
||||||
|
customParams = Object.assign(customParams, params);
|
||||||
|
$.table.search();
|
||||||
|
}
|
||||||
|
|
||||||
|
function resetForm() {
|
||||||
|
$.form.reset();
|
||||||
|
customParams = {};
|
||||||
|
changeConditionBtnChosenStyle();
|
||||||
$.table.search();
|
$.table.search();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,640 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('主单列表')"/>
|
||||||
|
<th:block th:include="include :: layout-latest-css"/>
|
||||||
|
<th:block th:include="include :: ztree-css"/>
|
||||||
|
<th:block th:include="include :: datetimepicker-css" />
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#orderSearchBtnGroup {
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#allOrServing {
|
||||||
|
width: 70px;
|
||||||
|
padding: 6px 9px;
|
||||||
|
height: 33px;
|
||||||
|
font-size: 14px;
|
||||||
|
border: 1px solid #e5e6e7;
|
||||||
|
background: #fff none;
|
||||||
|
border-radius: 4px;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flex-board {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flex-board-no-wrap {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cx-select-input {
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.normal-select-input {
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.normal-input {
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.long-input {
|
||||||
|
width: 400px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.active-condition-btn {
|
||||||
|
background-color: #1c84c6;
|
||||||
|
border-color: #1c84c6;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body class="gray-bg">
|
||||||
|
|
||||||
|
<div class="ui-layout-center">
|
||||||
|
<div class="container-div">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12 search-collapse">
|
||||||
|
<form id="order-form" class="m">
|
||||||
|
<input type="hidden" id="deptId" name="deptId">
|
||||||
|
<input type="hidden" id="parentId" name="parentId">
|
||||||
|
<div class="condition-btn">
|
||||||
|
<select id="allOrServing">
|
||||||
|
<option value="">全部</option>
|
||||||
|
<option value="">在途</option>
|
||||||
|
</select>
|
||||||
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 0, sysPayStatus: 0, orderMode: '02'})">
|
||||||
|
待付款
|
||||||
|
(<span id="nonPaidOrderNum">0</span>)
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 0, workerId: -1})">
|
||||||
|
已发布
|
||||||
|
(<span id="publishedOrderNum">0</span>)
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 1})">
|
||||||
|
已接单
|
||||||
|
(<span id="acceptedOrderNum">0</span>)
|
||||||
|
</a>
|
||||||
|
<!-- <a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 1, isCall: '01'})">-->
|
||||||
|
<!-- 未约时-->
|
||||||
|
<!-- </a>-->
|
||||||
|
<!-- <a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 1, isCall: '02'})">-->
|
||||||
|
<!-- 未排班-->
|
||||||
|
<!-- </a>-->
|
||||||
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 2})">
|
||||||
|
待上门
|
||||||
|
(<span id="waitForDoorOrderNum">0</span>)
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 3})">
|
||||||
|
进行中
|
||||||
|
(<span id="servingOrderNum">0</span>)
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 4})">
|
||||||
|
确认审核
|
||||||
|
(<span id="confirmingOrderNum">0</span>)
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 5})">
|
||||||
|
完成
|
||||||
|
(<span id="finishedOrderNum">0</span>)
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 6})">
|
||||||
|
关闭
|
||||||
|
(<span id="canceledOrderNum">0</span>)
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-default btn-outline" onclick="selectOnDoorOrderToday(this)">
|
||||||
|
今日待上门
|
||||||
|
(<span id="todayOrderNum">0</span>)
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-default btn-outline" onclick="selectOnDoorOrderTomorrow(this)">
|
||||||
|
明日待上门
|
||||||
|
(<span id="tomorrowOrderNum">0</span>)
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: -1})">
|
||||||
|
售后
|
||||||
|
(<span>0</span>)
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: -1})">
|
||||||
|
急报中
|
||||||
|
(<span>0</span>)
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="flex-board">
|
||||||
|
<div class="flex-board m-t">
|
||||||
|
区域筛选:
|
||||||
|
<div id="areaCxSelect" class="flex-board-no-wrap">
|
||||||
|
<select class="province form-control cx-select-input m-r" name="province" id="province" data-first-title="选择省" onchange="selectRegion('province', 'city')"></select>
|
||||||
|
<select class="city form-control cx-select-input m-r" name="city" id="city" data-first-title="选择市" onchange="selectRegion('city', 'district')"></select>
|
||||||
|
<select class="district form-control cx-select-input m-r" name="district" id="district" data-first-title="选择区" onchange="selectRegion('district', 'street')"></select>
|
||||||
|
<select class="street form-control cx-select-input m-r" name="streetId" id="streetId" data-first-title="选择街道" ></select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex-board m-t">
|
||||||
|
类别筛选:
|
||||||
|
<div id="categoryCxSelect" class="flex-board-no-wrap">
|
||||||
|
<select class="category1 form-control cx-select-input m-r" name="category1" id="category1" data-first-title="选择一类"></select>
|
||||||
|
<select class="category2 form-control cx-select-input m-r" name="category2" id="category2" data-first-title="选择二类"></select>
|
||||||
|
<select class="category3 form-control cx-select-input m-r" name="category3" id="category3" data-first-title="选择三类"></select>
|
||||||
|
<select class="category4 form-control cx-select-input m-r" name="category4" id="category4" data-first-title="选择四类" ></select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex-board-no-wrap m-t">
|
||||||
|
<label class="form-control-label">订单查询:</label>
|
||||||
|
<input type="text" class="form-control long-input m-r" placeholder="请输入订单号、姓名、电话或地址、品牌、规格">
|
||||||
|
</div>
|
||||||
|
<div class="m-t">
|
||||||
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
|
||||||
|
class="fa fa-search"></i> 搜索</a>
|
||||||
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="resetForm()"><i
|
||||||
|
class="fa fa-refresh"></i> 重置</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="btn-group-sm" id="toolbar" role="group">
|
||||||
|
<div class="btn-group-sm" role="group">
|
||||||
|
<a class="btn btn-warning" onclick="$.table.exportExcel()"
|
||||||
|
shiro:hasPermission="order:order:export">
|
||||||
|
<i class="fa fa-download"></i> 导出
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a class="btn btn-default" onclick="mergePay()">
|
||||||
|
<i class="fa fa-money"></i> 付款
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-sm-12 select-table table-striped">
|
||||||
|
<table id="bootstrap-table"></table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<th:block th:include="include :: footer"/>
|
||||||
|
<th:block th:include="include :: layout-latest-js"/>
|
||||||
|
<th:block th:include="include :: ztree-js"/>
|
||||||
|
<th:block th:include="include :: jquery-cxselect-js" />
|
||||||
|
<th:block th:include="include :: datetimepicker-js" />
|
||||||
|
<script th:inline="javascript">
|
||||||
|
var payTypes = [[${@dict.getType('pay_type')}]];
|
||||||
|
var orderTypes = [[${@dict.getType('goods_category_type')}]];
|
||||||
|
var payStatus = [[${@dict.getType('pay_status')}]];
|
||||||
|
var orderStatus = [[${@dict.getType('order_status')}]];
|
||||||
|
|
||||||
|
var editFlag = [[${@permission.hasPermi('order:order:edit')}]];
|
||||||
|
var prefix = ctx + "order/master";
|
||||||
|
var customParams = {};
|
||||||
|
|
||||||
|
$(function () {
|
||||||
|
var panehHidden = false;
|
||||||
|
if ($(this).width() < 769) {
|
||||||
|
panehHidden = true;
|
||||||
|
}
|
||||||
|
$('body').layout({initClosed: panehHidden, west__size: 185});
|
||||||
|
// 回到顶部绑定
|
||||||
|
if ($.fn.toTop !== undefined) {
|
||||||
|
var opt = {
|
||||||
|
win: $('.ui-layout-center'),
|
||||||
|
doc: $('.ui-layout-center')
|
||||||
|
};
|
||||||
|
$('#scroll-up').toTop(opt);
|
||||||
|
}
|
||||||
|
initOrderList();
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
dataType:"json",
|
||||||
|
url: ctx + "system/area/list",
|
||||||
|
success: function (result) {
|
||||||
|
if (result.code == web_status.SUCCESS) {
|
||||||
|
$('#areaCxSelect').cxSelect({
|
||||||
|
selects: ['province', 'city', 'district', 'street'],
|
||||||
|
jsonValue: 'areaId',
|
||||||
|
jsonName: 'areaName',
|
||||||
|
data: result.data
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
$.modal.msgError("数据加载错误,请重试!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
$(".date-input").datetimepicker({
|
||||||
|
format: "yyyy-mm-dd",
|
||||||
|
minView: "month",
|
||||||
|
autoclose: true
|
||||||
|
});
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
dataType:"json",
|
||||||
|
url: ctx + "goods/deptcategory/app/list",
|
||||||
|
data: JSON.stringify({deptId: 101, goodsCategoryId: 1}),
|
||||||
|
contentType: 'application/json',
|
||||||
|
success: function (result) {
|
||||||
|
if (result.code == web_status.SUCCESS) {
|
||||||
|
$('#categoryCxSelect').cxSelect({
|
||||||
|
selects: ['category1', 'category2', 'category3', 'category4'],
|
||||||
|
jsonValue: 'deptGoodsCategoryId',
|
||||||
|
jsonName: 'goodsCategoryName',
|
||||||
|
jsonSub: 'child',
|
||||||
|
data: result.data
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
$.modal.msgError("数据加载错误,请重试!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
changeOrderMode();
|
||||||
|
|
||||||
|
<!-- 不同状态订单数量统计-->
|
||||||
|
$.ajax({
|
||||||
|
type: "GET",
|
||||||
|
dataType:"json",
|
||||||
|
url: prefix + '/differentStatus/count',
|
||||||
|
success: function (result) {
|
||||||
|
if (result.code == web_status.SUCCESS) {
|
||||||
|
$('#acceptedOrderNum').text(result.data.acceptedOrderNum);
|
||||||
|
$('#canceledOrderNum').text(result.data.canceledOrderNum);
|
||||||
|
$('#confirmingOrderNum').text(result.data.confirmingOrderNum);
|
||||||
|
$('#finishedOrderNum').text(result.data.finishedOrderNum);
|
||||||
|
$('#servingOrderNum').text(result.data.servingOrderNum);
|
||||||
|
$('#waitForDoorOrderNum').text(result.data.waitForDoorOrderNum);
|
||||||
|
} else {
|
||||||
|
$.modal.msgError("数据加载错误,请重试!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
<!-- 待付款订单数量统计-->
|
||||||
|
$.ajax({
|
||||||
|
type: "GET",
|
||||||
|
dataType:"json",
|
||||||
|
url: prefix + '/count',
|
||||||
|
data: {orderStatus: 0, sysPayStatus: 0, orderMode: '02'},
|
||||||
|
success: function (result) {
|
||||||
|
if (result.code == web_status.SUCCESS) {
|
||||||
|
$('#nonPaidOrderNum').text(result.data);
|
||||||
|
} else {
|
||||||
|
$.modal.msgError("数据加载错误,请重试!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
<!-- 已发布订单数量统计-->
|
||||||
|
$.ajax({
|
||||||
|
type: "GET",
|
||||||
|
dataType:"json",
|
||||||
|
url: prefix + '/count',
|
||||||
|
data: {orderStatus: 0, workerId: -1},
|
||||||
|
success: function (result) {
|
||||||
|
if (result.code == web_status.SUCCESS) {
|
||||||
|
$('#publishedOrderNum').text(result.data);
|
||||||
|
} else {
|
||||||
|
$.modal.msgError("数据加载错误,请重试!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
<!-- 今日和明日单数量统计-->
|
||||||
|
var date = new Date();
|
||||||
|
$.ajax({
|
||||||
|
type: "GET",
|
||||||
|
dataType:"json",
|
||||||
|
url: prefix + '/count',
|
||||||
|
data: {
|
||||||
|
orderStatus: 2,
|
||||||
|
expectTimeStart: date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + " 00:00:00",
|
||||||
|
expectTimeEnd: date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + " 23:59:59"
|
||||||
|
},
|
||||||
|
success: function (result) {
|
||||||
|
if (result.code == web_status.SUCCESS) {
|
||||||
|
$('#todayOrderNum').text(result.data);
|
||||||
|
} else {
|
||||||
|
$.modal.msgError("数据加载错误,请重试!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
$.ajax({
|
||||||
|
type: "GET",
|
||||||
|
dataType:"json",
|
||||||
|
url: prefix + '/count',
|
||||||
|
data: {
|
||||||
|
orderStatus: 2,
|
||||||
|
expectTimeStart: date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + (date.getDate() + 1) + " 00:00:00",
|
||||||
|
expectTimeEnd: date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + (date.getDate() + 1) + " 23:59:59"
|
||||||
|
},
|
||||||
|
success: function (result) {
|
||||||
|
if (result.code == web_status.SUCCESS) {
|
||||||
|
$('#tomorrowOrderNum').text(result.data);
|
||||||
|
} else {
|
||||||
|
$.modal.msgError("数据加载错误,请重试!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
function changeOrderMode(orderMode) {
|
||||||
|
if (orderMode === 'B2B') {
|
||||||
|
$("#B2BOptions").show();
|
||||||
|
$("#B2COptions").hide();
|
||||||
|
} else if (orderMode === 'B2C') {
|
||||||
|
$("#B2BOptions").hide();
|
||||||
|
$("#B2COptions").show();
|
||||||
|
} else {
|
||||||
|
$("#B2BOptions").hide();
|
||||||
|
$("#B2COptions").hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function showOrderWorker(id) {
|
||||||
|
var url = "orderWorker/" + id;
|
||||||
|
layer.open({
|
||||||
|
type: 2,
|
||||||
|
area: ['800px', '450px'],
|
||||||
|
fix: false,
|
||||||
|
//不固定
|
||||||
|
maxmin: true,
|
||||||
|
shade: 0.3,
|
||||||
|
title: '指派师傅',
|
||||||
|
content: url,
|
||||||
|
// 弹层外区域关闭
|
||||||
|
shadeClose: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function showAssignWholeOrder(id) {
|
||||||
|
var url = "assignWholeOrder/" + id;
|
||||||
|
layer.open({
|
||||||
|
type: 2,
|
||||||
|
area: ['800px', '450px'],
|
||||||
|
fix: false,
|
||||||
|
//不固定
|
||||||
|
maxmin: true,
|
||||||
|
shade: 0.3,
|
||||||
|
title: '指派师傅',
|
||||||
|
content: url,
|
||||||
|
// 弹层外区域关闭
|
||||||
|
shadeClose: true
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectRegion(regionLevelName, nextRegionLevelName) {
|
||||||
|
var regionId = $("#" + regionLevelName).val();
|
||||||
|
if ($.common.isEmpty(regionId)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Ajax调用处理
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
dataType:"json",
|
||||||
|
url: ctx + "system/area/list",
|
||||||
|
data: {parentCode: regionId},
|
||||||
|
success: function (result) {
|
||||||
|
if (result.code == web_status.SUCCESS) {
|
||||||
|
$('#areaCxSelect').cxSelect({
|
||||||
|
selects: [nextRegionLevelName],
|
||||||
|
jsonValue: 'areaId',
|
||||||
|
jsonName: 'areaName',
|
||||||
|
data: result.data
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
$.modal.msgError("数据加载错误,请重试!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function initOrderList() {
|
||||||
|
var options = {
|
||||||
|
url: prefix + "/list",
|
||||||
|
exportUrl: prefix + "/export",
|
||||||
|
queryParams: queryParams,
|
||||||
|
sortName: "createTime",
|
||||||
|
sortOrder: "desc",
|
||||||
|
modalName: "订单",
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
checkbox: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'id',
|
||||||
|
title: '订单ID',
|
||||||
|
visible: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'goods',
|
||||||
|
title: '订单信息',
|
||||||
|
formatter: function (value, row) {
|
||||||
|
return '<div style="display:flex;justify-content: center;align-items: center;">'
|
||||||
|
+ '<img decoding="async" src="' + value.goodsImgUrl + '" width="100" height="100" />'
|
||||||
|
+ '<div>'
|
||||||
|
+ '<small> 订单编号:' + row.code + '<small/> <br>'
|
||||||
|
+ '<h4> ' + value.goodsName + '<h4/>'
|
||||||
|
+ '<small> ' + value.goodsDesc + '</small> <br>'
|
||||||
|
+ '<small> 联系人:' + row.addressName + '</small> <br>'
|
||||||
|
+ '<small> 联系电话:' + row.addressPhone + '</small> <br>'
|
||||||
|
+ '<small> 联系地址:' + row.address + '</small> <br>'
|
||||||
|
+ '<small> 下单时间:' + row.createTime + '</small> <br>'
|
||||||
|
+ '<small> 预约时间:' + row.expectTimeStart + ' - ' + row.expectTimeEnd + '</small> <br>'
|
||||||
|
+ '<small> 总金额:' + row.financialMasterMoney + '元</small> <br>'
|
||||||
|
+ '</div>'
|
||||||
|
+ '</div>';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'orderStatus',
|
||||||
|
title: '订单状态',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function (value, row, index) {
|
||||||
|
return $.table.selectDictLabel(orderStatus, value);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'worker',
|
||||||
|
title: '接单信息',
|
||||||
|
formatter: function (value, row, index) {
|
||||||
|
if(value){
|
||||||
|
return '<small>' + value.name + value.phone + '</small><br>'
|
||||||
|
+ '<small>接单时间:' + row.revTime + '</small>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
align: 'left',
|
||||||
|
formatter: function (value, row, index) {
|
||||||
|
var actions = [];
|
||||||
|
actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="detail(\'' + row.id + '\')"><i class="fa fa-info"></i>查看</a> ');
|
||||||
|
actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="orderMasterReject(\'' + row.orderMasterId + '\')"></i>商家退单</a> ');
|
||||||
|
if (row.workerId != null) {
|
||||||
|
actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="showOrderWorker(\'' + row.id + '\')"></i>指派</a> ');
|
||||||
|
} else {
|
||||||
|
actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="showAssignWholeOrder(\'' + row.id + '\')"></i>指派</a> ');
|
||||||
|
}
|
||||||
|
if (row.payStatus == 0) {
|
||||||
|
actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="showPayQrcode(\'' + row.id + '\')"></i>付款</a> ');
|
||||||
|
}
|
||||||
|
return actions.join('');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'goodsWorker',
|
||||||
|
title: '商家信息',
|
||||||
|
formatter: function (value, row, index) {
|
||||||
|
if(value){
|
||||||
|
return '<small>' + value.name + '</small><br>'
|
||||||
|
+ '<small>' + value.phone + '</small>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'changeMoney',
|
||||||
|
title: '商家追加金额',
|
||||||
|
align: 'center'
|
||||||
|
},{
|
||||||
|
field: 'orderType',
|
||||||
|
title: '订单类型',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function (value, row, index) {
|
||||||
|
return $.table.selectDictLabel(orderTypes, value);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'payType',
|
||||||
|
title: '付款类型',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function (value, row, index) {
|
||||||
|
return $.table.selectDictLabel(payTypes, value);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'payStatus',
|
||||||
|
title: '付款状态',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function (value, row, index) {
|
||||||
|
return $.table.selectDictLabel(payStatus, value);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'payTime',
|
||||||
|
title: '付款时间'
|
||||||
|
}]
|
||||||
|
};
|
||||||
|
$.table.init(options);
|
||||||
|
}
|
||||||
|
|
||||||
|
function queryParams(params) {
|
||||||
|
var search = $.table.queryParams(params);
|
||||||
|
Object.assign(search, customParams)
|
||||||
|
return search;
|
||||||
|
}
|
||||||
|
|
||||||
|
function detail(id) {
|
||||||
|
var url = "order/goods?orderId=" + id;
|
||||||
|
$.modal.open("商品信息", url);
|
||||||
|
}
|
||||||
|
function orderDetailReject(id) {
|
||||||
|
$.modal.confirm("确定要退单吗?", function() {
|
||||||
|
const url = "detail/reject";
|
||||||
|
const data = { "id": id };
|
||||||
|
$.operate.post(url, data);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
function orderMasterReject(id) {
|
||||||
|
$.modal.confirm("确定要退单吗?", function() {
|
||||||
|
const url = "master/reject";
|
||||||
|
const data = { "id": id };
|
||||||
|
$.operate.post(url, data);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function changeConditionBtnChosenStyle(e) {
|
||||||
|
$('.condition-btn .btn').removeClass('active-condition-btn');
|
||||||
|
$(e).addClass('active-condition-btn');
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectConditionBtn(e, params = {}) {
|
||||||
|
changeConditionBtnChosenStyle(e);
|
||||||
|
searchOrderList(params)
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectOnDoorOrderToday(e) {
|
||||||
|
changeConditionBtnChosenStyle(e);
|
||||||
|
var date = new Date();
|
||||||
|
selectConditionBtn(e, {
|
||||||
|
orderStatus: 2,
|
||||||
|
expectTimeStart: date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + " 00:00:00",
|
||||||
|
expectTimeEnd: date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + " 23:59:59"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectOnDoorOrderTomorrow(e) {
|
||||||
|
changeConditionBtnChosenStyle(e);
|
||||||
|
var date = new Date();
|
||||||
|
selectConditionBtn(e, {
|
||||||
|
orderStatus: 2,
|
||||||
|
expectTimeStart: date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + (date.getDate() + 1) + " 00:00:00",
|
||||||
|
expectTimeEnd: date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + (date.getDate() + 1) + " 23:59:59"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function searchOrderList(params) {
|
||||||
|
customParams = params;
|
||||||
|
$.table.search();
|
||||||
|
}
|
||||||
|
|
||||||
|
function resetForm() {
|
||||||
|
$.form.reset();
|
||||||
|
customParams = {};
|
||||||
|
changeConditionBtnChosenStyle();
|
||||||
|
$.table.search();
|
||||||
|
}
|
||||||
|
|
||||||
|
function showPayQrcode(id) {
|
||||||
|
var url = "payQrcode/" + id;
|
||||||
|
<!-- $.modal.open("支付二维码", url, 290, 360);-->
|
||||||
|
layer.open({
|
||||||
|
type: 2,
|
||||||
|
area: ['290px', '360px'],
|
||||||
|
fix: false,
|
||||||
|
//不固定
|
||||||
|
maxmin: true,
|
||||||
|
shade: 0.3,
|
||||||
|
title: '支付二维码',
|
||||||
|
content: url,
|
||||||
|
btn: ['关闭'],
|
||||||
|
// 弹层外区域关闭
|
||||||
|
shadeClose: true,
|
||||||
|
cancel: function(index) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function mergePay() {
|
||||||
|
table.set();
|
||||||
|
var rows = $.common.isEmpty(table.options.uniqueId) ? $.table.selectFirstColumns() : $.table.selectColumns(table.options.uniqueId);
|
||||||
|
if (rows.length === 0) {
|
||||||
|
$.modal.alertWarning("请至少选择一条记录");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
showPayQrcode(rows.join());
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
|
|
@ -0,0 +1,304 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<th:block th:include="include :: header('指派师傅')"/>
|
||||||
|
<th:block th:include="include :: layout-latest-css"/>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.custom-container {
|
||||||
|
padding: 0 30px 20px 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flex-board {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flex-board-no-wrap {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flex-board.select-content {
|
||||||
|
flex-basis: 100%
|
||||||
|
}
|
||||||
|
|
||||||
|
.flex-board.select-content .flex-board-no-wrap {
|
||||||
|
flex-basis: 90%
|
||||||
|
}
|
||||||
|
|
||||||
|
.flex-board.input-content {
|
||||||
|
flex-basis: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.flex-board.input-content input {
|
||||||
|
flex-basis: 75%
|
||||||
|
}
|
||||||
|
|
||||||
|
.specCanAssignNum {
|
||||||
|
text-align: center;
|
||||||
|
line-height: 31px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="gray-bg">
|
||||||
|
<div class="animated fadeInRight row custom-container">
|
||||||
|
<div class="col-sm-12 search-collapse">
|
||||||
|
<form class="m" id="canAssignSpecForm">
|
||||||
|
<div id="canAssignSpecList" class="m-b">
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-4">
|
||||||
|
<span>可派单金额:</span>
|
||||||
|
<span id="moneyCanAssign"></span>
|
||||||
|
<span>元</span>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-5">
|
||||||
|
<div class="flex-board input-content">
|
||||||
|
<label class="form-control-label">派出金额:</label>
|
||||||
|
<input name="totalPay" type="number" class="form-control">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-sm-12 search-collapse">
|
||||||
|
<form class="flex-board m" id="workerForm">
|
||||||
|
<div class="flex-board select-content m-t">
|
||||||
|
<label class="form-control-label">区域筛选:</label>
|
||||||
|
<div id="areaCxSelect" class="flex-board-no-wrap">
|
||||||
|
<select class="province form-control cx-select-input m-r" name="province" id="province" data-first-title="选择省" onchange="selectRegion('province', 'city')"></select>
|
||||||
|
<select class="city form-control cx-select-input m-r" name="city" id="city" data-first-title="选择市" onchange="selectRegion('city', 'district')"></select>
|
||||||
|
<select class="district form-control cx-select-input m-r" name="areaId" id="district" data-first-title="选择区" onchange="selectRegion('district', 'street')"></select>
|
||||||
|
<select class="street form-control cx-select-input m-r" name="streetId" id="streetId" data-first-title="选择街道" ></select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex-board select-content m-t">
|
||||||
|
<label class="form-control-label">类别筛选:</label>
|
||||||
|
<div id="categoryCxSelect" class="flex-board-no-wrap">
|
||||||
|
<select class="category1 form-control cx-select-input m-r" name="category1" id="category1" data-first-title="选择一类"></select>
|
||||||
|
<select class="category2 form-control cx-select-input m-r" name="category2" id="category2" data-first-title="选择二类"></select>
|
||||||
|
<select class="category3 form-control cx-select-input m-r" name="goodsCategoryId" id="category3" data-first-title="选择三类"></select>
|
||||||
|
<select class="category4 form-control cx-select-input m-r" name="category4" id="category4" data-first-title="选择四类" ></select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex-board input-content m-t">
|
||||||
|
<label class="form-control-label">人员名称:</label>
|
||||||
|
<input name="workerName" type="text" class="form-control normal-input m-r">
|
||||||
|
</div>
|
||||||
|
<div class="m-t">
|
||||||
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search('workerForm')"><i
|
||||||
|
class="fa fa-search"></i> 搜索</a>
|
||||||
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('workerForm')"><i
|
||||||
|
class="fa fa-refresh"></i> 重置</a>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-sm-12 select-table table-striped">
|
||||||
|
<table id="bootstrap-table"></table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<th:block th:include="include :: footer"/>
|
||||||
|
<th:block th:include="include :: jquery-cxselect-js" />
|
||||||
|
<script type="text/javascript">
|
||||||
|
var orderMasterId = '[[${orderId}]]';
|
||||||
|
var prefix = ctx + "worker"
|
||||||
|
|
||||||
|
$(function () {
|
||||||
|
loadCanAssignSpecInfo();
|
||||||
|
initForm();
|
||||||
|
initTable();
|
||||||
|
});
|
||||||
|
|
||||||
|
function loadCanAssignSpecInfo() {
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
dataType:"json",
|
||||||
|
url: ctx + "order/can/assign",
|
||||||
|
data: JSON.stringify({orderMasterId: orderMasterId}),
|
||||||
|
contentType: 'application/json',
|
||||||
|
success: function (result) {
|
||||||
|
if (result.code == web_status.SUCCESS) {
|
||||||
|
$('#canAssignSpecList').html('');
|
||||||
|
$.each(result.data, function(index, spec) {
|
||||||
|
$('#canAssignSpecList').append(
|
||||||
|
'<div class="row m-b">' +
|
||||||
|
' <div class="col-sm-6">' +
|
||||||
|
' <input disabled class="form-control" value="' + spec.goodsName +'">' +
|
||||||
|
' </div>' +
|
||||||
|
' <div class="col-sm-2 specCanAssignNum">' +
|
||||||
|
spec.goodsNum +
|
||||||
|
' </div>' +
|
||||||
|
' <div class="col-sm-2">' +
|
||||||
|
' <input type="number" name="spec-' + spec.goodsStandardId + '" class="form-control" required>' +
|
||||||
|
' </div>' +
|
||||||
|
'</div>'
|
||||||
|
)
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
$.modal.msgError("数据加载错误,请重试!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
dataType:"json",
|
||||||
|
url: ctx + "order/master/app/detail",
|
||||||
|
data: JSON.stringify({id: orderMasterId}),
|
||||||
|
contentType: 'application/json',
|
||||||
|
success: function (result) {
|
||||||
|
if (result.code == web_status.SUCCESS) {
|
||||||
|
$('#moneyCanAssign').html(result.data.serverMoney);
|
||||||
|
} else {
|
||||||
|
$.modal.msgError("数据加载错误,请重试!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function initForm() {
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
dataType:"json",
|
||||||
|
url: ctx + "system/area/list",
|
||||||
|
success: function (result) {
|
||||||
|
if (result.code == web_status.SUCCESS) {
|
||||||
|
$('#areaCxSelect').cxSelect({
|
||||||
|
selects: ['province', 'city', 'district', 'street'],
|
||||||
|
jsonValue: 'areaId',
|
||||||
|
jsonName: 'areaName',
|
||||||
|
data: result.data
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
$.modal.msgError("数据加载错误,请重试!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
dataType:"json",
|
||||||
|
url: ctx + "goods/deptcategory/app/list",
|
||||||
|
data: JSON.stringify({deptId: 101, goodsCategoryId: 1}),
|
||||||
|
contentType: 'application/json',
|
||||||
|
success: function (result) {
|
||||||
|
if (result.code == web_status.SUCCESS) {
|
||||||
|
$('#categoryCxSelect').cxSelect({
|
||||||
|
selects: ['category1', 'category2', 'category3', 'category4'],
|
||||||
|
jsonValue: 'goodsCategoryId',
|
||||||
|
jsonName: 'goodsCategoryName',
|
||||||
|
jsonSub: 'child',
|
||||||
|
data: result.data
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
$.modal.msgError("数据加载错误,请重试!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function initTable() {
|
||||||
|
var options = {
|
||||||
|
url: prefix + "/list",
|
||||||
|
modalName: "师傅派单列表",
|
||||||
|
firstLoad: false,
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
checkbox: true
|
||||||
|
}, {
|
||||||
|
field: 'name',
|
||||||
|
title: '人员名称',
|
||||||
|
align: "left"
|
||||||
|
}, {
|
||||||
|
field: 'phone',
|
||||||
|
title: '手机号',
|
||||||
|
align: "left"
|
||||||
|
}, {
|
||||||
|
title: '操作',
|
||||||
|
align: 'left',
|
||||||
|
formatter: function (value, row, index) {
|
||||||
|
var actions = [];
|
||||||
|
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="assign(' + row.workerId + ')">指派</a> ');
|
||||||
|
return actions.join('');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
$.table.init(options);
|
||||||
|
$.table.search('workerForm');
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectRegion(regionLevelName, nextRegionLevelName) {
|
||||||
|
var regionId = $("#" + regionLevelName).val();
|
||||||
|
if ($.common.isEmpty(regionId)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Ajax调用处理
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
dataType:"json",
|
||||||
|
url: ctx + "system/area/list",
|
||||||
|
data: {parentCode: regionId},
|
||||||
|
success: function (result) {
|
||||||
|
if (result.code == web_status.SUCCESS) {
|
||||||
|
$('#areaCxSelect').cxSelect({
|
||||||
|
selects: [nextRegionLevelName],
|
||||||
|
jsonValue: 'areaId',
|
||||||
|
jsonName: 'areaName',
|
||||||
|
data: result.data
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
$.modal.msgError("数据加载错误,请重试!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function assign(workerId) {
|
||||||
|
var formData = $("#canAssignSpecForm").serializeArray();
|
||||||
|
var params = {
|
||||||
|
goodsList: [],
|
||||||
|
workerId: workerId,
|
||||||
|
orderMasterId: orderMasterId
|
||||||
|
};
|
||||||
|
formData.forEach(function (item){
|
||||||
|
if (item.name.startsWith('spec-') && Number(item.value) > 0) {
|
||||||
|
var itemArr = item.name.split("spec-");
|
||||||
|
params.goodsList.push({
|
||||||
|
goodsStandardId: itemArr[1],
|
||||||
|
num: item.value
|
||||||
|
})
|
||||||
|
} else if (item.name === 'totalPay') {
|
||||||
|
params.totalPay = item.value;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
type: "POST",
|
||||||
|
dataType:"json",
|
||||||
|
url: ctx + "order/assign",
|
||||||
|
data: JSON.stringify(params),
|
||||||
|
contentType: 'application/json',
|
||||||
|
success: function (result) {
|
||||||
|
if (result.code == web_status.SUCCESS) {
|
||||||
|
$.modal.msgSuccess("指派成功")
|
||||||
|
loadCanAssignSpecInfo();
|
||||||
|
} else {
|
||||||
|
$.modal.msgError("指派失败")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
|
|
@ -50,6 +50,12 @@
|
||||||
.long-input {
|
.long-input {
|
||||||
width: 400px;
|
width: 400px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.active-condition-btn {
|
||||||
|
background-color: #1c84c6;
|
||||||
|
border-color: #1c84c6;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body class="gray-bg">
|
<body class="gray-bg">
|
||||||
|
|
@ -61,56 +67,64 @@
|
||||||
<form id="order-form" class="m">
|
<form id="order-form" class="m">
|
||||||
<input type="hidden" id="deptId" name="deptId">
|
<input type="hidden" id="deptId" name="deptId">
|
||||||
<input type="hidden" id="parentId" name="parentId">
|
<input type="hidden" id="parentId" name="parentId">
|
||||||
<input type="hidden" id="orderStatus" name="orderStatus"/>
|
<div class="condition-btn">
|
||||||
<div>
|
|
||||||
<select id="allOrServing">
|
<select id="allOrServing">
|
||||||
<option value="">全部</option>
|
<option value="">全部</option>
|
||||||
<option value="">在途</option>
|
<option value="">在途</option>
|
||||||
</select>
|
</select>
|
||||||
<a class="btn btn-default btn-outline">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 0, sysPayStatus: 0, orderMode: '02'})">
|
||||||
待付款
|
待付款
|
||||||
|
(<span id="nonPaidOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 0, workerId: -1})">
|
||||||
已发布
|
已发布
|
||||||
|
(<span id="publishedOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 1})">
|
||||||
未约时
|
已接单
|
||||||
|
(<span id="acceptedOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline">
|
<!-- <a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 1, isCall: '01'})">-->
|
||||||
未排班
|
<!-- 未约时-->
|
||||||
</a>
|
<!-- </a>-->
|
||||||
<a class="btn btn-default btn-outline" onclick="searchByOrderStatus(2)">
|
<!-- <a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 1, isCall: '02'})">-->
|
||||||
|
<!-- 未排班-->
|
||||||
|
<!-- </a>-->
|
||||||
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 2})">
|
||||||
待上门
|
待上门
|
||||||
|
(<span id="waitForDoorOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="searchByOrderStatus(3)">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 3})">
|
||||||
进行中
|
进行中
|
||||||
|
(<span id="servingOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="searchByOrderStatus(4)">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 4})">
|
||||||
确认审核
|
确认审核
|
||||||
|
(<span id="confirmingOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="searchByOrderStatus(5)">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 5})">
|
||||||
完成
|
完成
|
||||||
|
(<span id="finishedOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="searchByOrderStatus(6)">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: 6})">
|
||||||
关闭
|
关闭
|
||||||
|
(<span id="canceledOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
<a class="btn btn-default btn-outline" onclick="selectOnDoorOrderToday(this)">
|
||||||
今日待上门
|
今日待上门
|
||||||
|
(<span id="todayOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
<a class="btn btn-default btn-outline" onclick="selectOnDoorOrderTomorrow(this)">
|
||||||
明日待上门
|
明日待上门
|
||||||
|
(<span id="tomorrowOrderNum">0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: -1})">
|
||||||
售后
|
售后
|
||||||
|
(<span>0</span>)
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
<a class="btn btn-default btn-outline" onclick="selectConditionBtn(this, {orderStatus: -1})">
|
||||||
急报中
|
急报中
|
||||||
</a>
|
(<span>0</span>)
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
|
||||||
退单
|
|
||||||
</a>
|
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
|
||||||
售后纠纷
|
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-board">
|
<div class="flex-board">
|
||||||
|
|
@ -123,42 +137,6 @@
|
||||||
<select class="street form-control cx-select-input m-r" name="streetId" id="streetId" data-first-title="选择街道" ></select>
|
<select class="street form-control cx-select-input m-r" name="streetId" id="streetId" data-first-title="选择街道" ></select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-board m-t">
|
|
||||||
创建时间:
|
|
||||||
<div class="input-group date">
|
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
|
||||||
<input type="text" class="form-control date-input" placeholder="开始日期">
|
|
||||||
</div>
|
|
||||||
至
|
|
||||||
<div class="input-group date m-r">
|
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
|
||||||
<input type="text" class="form-control date-input" placeholder="结束日期">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="flex-board m-t">
|
|
||||||
服务时间:
|
|
||||||
<div class="input-group date">
|
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
|
||||||
<input type="text" class="form-control date-input" placeholder="开始日期">
|
|
||||||
</div>
|
|
||||||
至
|
|
||||||
<div class="input-group date m-r">
|
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
|
||||||
<input type="text" class="form-control date-input" placeholder="结束日期">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="flex-board m-t">
|
|
||||||
完成时间:
|
|
||||||
<div class="input-group date">
|
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
|
||||||
<input type="text" class="form-control date-input" placeholder="开始日期">
|
|
||||||
</div>
|
|
||||||
至
|
|
||||||
<div class="input-group date m-r">
|
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
|
||||||
<input type="text" class="form-control date-input" placeholder="结束日期">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="flex-board m-t">
|
<div class="flex-board m-t">
|
||||||
类别筛选:
|
类别筛选:
|
||||||
<div id="categoryCxSelect" class="flex-board-no-wrap">
|
<div id="categoryCxSelect" class="flex-board-no-wrap">
|
||||||
|
|
@ -168,61 +146,6 @@
|
||||||
<select class="category4 form-control cx-select-input m-r" name="category4" id="category4" data-first-title="选择四类" ></select>
|
<select class="category4 form-control cx-select-input m-r" name="category4" id="category4" data-first-title="选择四类" ></select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-board-no-wrap m-t">
|
|
||||||
<label class="form-control-label">后台人员:</label>
|
|
||||||
<input type="text" class="form-control normal-input m-r">
|
|
||||||
</div>
|
|
||||||
<div class="flex-board-no-wrap m-t">
|
|
||||||
<label class="form-control-label">商家名称:</label>
|
|
||||||
<input type="text" class="form-control normal-input m-r">
|
|
||||||
</div>
|
|
||||||
<div class="flex-board-no-wrap m-t">
|
|
||||||
<label class="form-control-label">商家电话:</label>
|
|
||||||
<input type="text" class="form-control normal-input m-r">
|
|
||||||
</div>
|
|
||||||
<div class="flex-board-no-wrap m-t">
|
|
||||||
<label class="form-control-label">接单师傅名称:</label>
|
|
||||||
<input type="text" class="form-control normal-input m-r">
|
|
||||||
</div>
|
|
||||||
<div class="flex-board-no-wrap m-t">
|
|
||||||
<label class="form-control-label">接单师傅电话:</label>
|
|
||||||
<input type="text" class="form-control normal-input m-r">
|
|
||||||
</div>
|
|
||||||
<div class="flex-board-no-wrap m-t">
|
|
||||||
<label class="form-control-label">师傅类型:</label>
|
|
||||||
<select class="form-control normal-select-input m-r">
|
|
||||||
<option value="">全部</option>
|
|
||||||
<option value="">大师傅</option>
|
|
||||||
<option value="">小师傅</option>
|
|
||||||
</select>
|
|
||||||
<input type="text" class="form-control normal-input m-r" placeholder="师傅姓名电话">
|
|
||||||
</div>
|
|
||||||
<div class="flex-board-no-wrap m-t">
|
|
||||||
<label class="form-control-label">订单模式:</label>
|
|
||||||
<select id="orderMode" class="form-control normal-select-input m-r" onchange="changeOrderMode(this.options[this.options.selectedIndex].value)">
|
|
||||||
<option value="0">全部</option>
|
|
||||||
<option value="B2B">B2B</option>
|
|
||||||
<option value="B2C">B2C</option>
|
|
||||||
</select>
|
|
||||||
<select id="B2BOptions" class="form-control normal-select-input m-r">
|
|
||||||
<option value="">全部</option>
|
|
||||||
<option value="">常规单</option>
|
|
||||||
<option value="">赠送单</option>
|
|
||||||
<option value="">合规单</option>
|
|
||||||
</select>
|
|
||||||
<select id="B2COptions" class="form-control normal-select-input m-r">
|
|
||||||
<option value="">全部</option>
|
|
||||||
<option value="">商品配件类目</option>
|
|
||||||
<option value="">服务类目</option>
|
|
||||||
<option value="">社区类目</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="flex-board-no-wrap m-t">
|
|
||||||
<label class="form-control-label">订单标签:</label>
|
|
||||||
<select class="form-control normal-select-input m-r">
|
|
||||||
<option value="">全部</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="flex-board-no-wrap m-t">
|
<div class="flex-board-no-wrap m-t">
|
||||||
<label class="form-control-label">订单查询:</label>
|
<label class="form-control-label">订单查询:</label>
|
||||||
<input type="text" class="form-control long-input m-r" placeholder="请输入订单号、姓名、电话或地址、品牌、规格">
|
<input type="text" class="form-control long-input m-r" placeholder="请输入订单号、姓名、电话或地址、品牌、规格">
|
||||||
|
|
@ -230,45 +153,10 @@
|
||||||
<div class="m-t">
|
<div class="m-t">
|
||||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
|
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
|
||||||
class="fa fa-search"></i> 搜索</a>
|
class="fa fa-search"></i> 搜索</a>
|
||||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
|
<a class="btn btn-warning btn-rounded btn-sm" onclick="resetForm()"><i
|
||||||
class="fa fa-refresh"></i> 重置</a>
|
class="fa fa-refresh"></i> 重置</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="m-t">
|
|
||||||
<a class="btn btn-default btn-outline" onclick="searchByOrderStatus(0)">
|
|
||||||
新订单
|
|
||||||
</a>
|
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
|
||||||
接单超时
|
|
||||||
</a>
|
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
|
||||||
约单超时
|
|
||||||
</a>
|
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
|
||||||
排单超时
|
|
||||||
</a>
|
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
|
||||||
无法排单
|
|
||||||
</a>
|
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
|
||||||
待上门超时
|
|
||||||
</a>
|
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
|
||||||
进行超时
|
|
||||||
</a>
|
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
|
||||||
售后超时
|
|
||||||
</a>
|
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
|
||||||
客诉中
|
|
||||||
</a>
|
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
|
||||||
审核中
|
|
||||||
</a>
|
|
||||||
<a class="btn btn-default btn-outline" onclick="">
|
|
||||||
一票价未改价
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -305,6 +193,7 @@
|
||||||
|
|
||||||
var editFlag = [[${@permission.hasPermi('order:order:edit')}]];
|
var editFlag = [[${@permission.hasPermi('order:order:edit')}]];
|
||||||
var prefix = ctx + "order/master";
|
var prefix = ctx + "order/master";
|
||||||
|
var customParams = {};
|
||||||
|
|
||||||
$(function () {
|
$(function () {
|
||||||
var panehHidden = false;
|
var panehHidden = false;
|
||||||
|
|
@ -320,7 +209,7 @@
|
||||||
};
|
};
|
||||||
$('#scroll-up').toTop(opt);
|
$('#scroll-up').toTop(opt);
|
||||||
}
|
}
|
||||||
queryOrderList();
|
initOrderList();
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
|
|
@ -368,6 +257,92 @@
|
||||||
})
|
})
|
||||||
|
|
||||||
changeOrderMode();
|
changeOrderMode();
|
||||||
|
|
||||||
|
<!-- 不同状态订单数量统计-->
|
||||||
|
$.ajax({
|
||||||
|
type: "GET",
|
||||||
|
dataType:"json",
|
||||||
|
url: prefix + '/differentStatus/count',
|
||||||
|
success: function (result) {
|
||||||
|
if (result.code == web_status.SUCCESS) {
|
||||||
|
$('#acceptedOrderNum').text(result.data.acceptedOrderNum);
|
||||||
|
$('#canceledOrderNum').text(result.data.canceledOrderNum);
|
||||||
|
$('#confirmingOrderNum').text(result.data.confirmingOrderNum);
|
||||||
|
$('#finishedOrderNum').text(result.data.finishedOrderNum);
|
||||||
|
$('#servingOrderNum').text(result.data.servingOrderNum);
|
||||||
|
$('#waitForDoorOrderNum').text(result.data.waitForDoorOrderNum);
|
||||||
|
} else {
|
||||||
|
$.modal.msgError("数据加载错误,请重试!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
<!-- 待付款订单数量统计-->
|
||||||
|
$.ajax({
|
||||||
|
type: "GET",
|
||||||
|
dataType:"json",
|
||||||
|
url: prefix + '/count',
|
||||||
|
data: {orderStatus: 0, sysPayStatus: 0, orderMode: '02'},
|
||||||
|
success: function (result) {
|
||||||
|
if (result.code == web_status.SUCCESS) {
|
||||||
|
$('#nonPaidOrderNum').text(result.data);
|
||||||
|
} else {
|
||||||
|
$.modal.msgError("数据加载错误,请重试!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
<!-- 已发布订单数量统计-->
|
||||||
|
$.ajax({
|
||||||
|
type: "GET",
|
||||||
|
dataType:"json",
|
||||||
|
url: prefix + '/count',
|
||||||
|
data: {orderStatus: 0, workerId: -1},
|
||||||
|
success: function (result) {
|
||||||
|
if (result.code == web_status.SUCCESS) {
|
||||||
|
$('#publishedOrderNum').text(result.data);
|
||||||
|
} else {
|
||||||
|
$.modal.msgError("数据加载错误,请重试!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
<!-- 今日和明日单数量统计-->
|
||||||
|
var date = new Date();
|
||||||
|
$.ajax({
|
||||||
|
type: "GET",
|
||||||
|
dataType:"json",
|
||||||
|
url: prefix + '/count',
|
||||||
|
data: {
|
||||||
|
orderStatus: 2,
|
||||||
|
expectTimeStart: date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + " 00:00:00",
|
||||||
|
expectTimeEnd: date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + " 23:59:59"
|
||||||
|
},
|
||||||
|
success: function (result) {
|
||||||
|
if (result.code == web_status.SUCCESS) {
|
||||||
|
$('#todayOrderNum').text(result.data);
|
||||||
|
} else {
|
||||||
|
$.modal.msgError("数据加载错误,请重试!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
$.ajax({
|
||||||
|
type: "GET",
|
||||||
|
dataType:"json",
|
||||||
|
url: prefix + '/count',
|
||||||
|
data: {
|
||||||
|
orderStatus: 2,
|
||||||
|
expectTimeStart: date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + (date.getDate() + 1) + " 00:00:00",
|
||||||
|
expectTimeEnd: date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + (date.getDate() + 1) + " 23:59:59"
|
||||||
|
},
|
||||||
|
success: function (result) {
|
||||||
|
if (result.code == web_status.SUCCESS) {
|
||||||
|
$('#tomorrowOrderNum').text(result.data);
|
||||||
|
} else {
|
||||||
|
$.modal.msgError("数据加载错误,请重试!")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
function changeOrderMode(orderMode) {
|
function changeOrderMode(orderMode) {
|
||||||
|
|
@ -410,10 +385,11 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function queryOrderList() {
|
function initOrderList() {
|
||||||
var options = {
|
var options = {
|
||||||
url: prefix + "/list",
|
url: prefix + "/list",
|
||||||
exportUrl: prefix + "/export",
|
exportUrl: prefix + "/export",
|
||||||
|
queryParams: queryParams,
|
||||||
sortName: "createTime",
|
sortName: "createTime",
|
||||||
sortOrder: "desc",
|
sortOrder: "desc",
|
||||||
modalName: "订单",
|
modalName: "订单",
|
||||||
|
|
@ -468,7 +444,6 @@
|
||||||
formatter: function (value, row, index) {
|
formatter: function (value, row, index) {
|
||||||
var actions = [];
|
var actions = [];
|
||||||
actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="detail(\'' + row.id + '\')"><i class="fa fa-info"></i>查看</a> ');
|
actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="detail(\'' + row.id + '\')"><i class="fa fa-info"></i>查看</a> ');
|
||||||
actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="orderDetailReject(\'' + row.id + '\')"></i>师傅退单</a> ');
|
|
||||||
actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="orderMasterReject(\'' + row.orderMasterId + '\')"></i>商家退单</a> ');
|
actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="orderMasterReject(\'' + row.orderMasterId + '\')"></i>商家退单</a> ');
|
||||||
if (row.payStatus == 0) {
|
if (row.payStatus == 0) {
|
||||||
actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="showPayQrcode(\'' + row.id + '\')"></i>付款</a> ');
|
actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="showPayQrcode(\'' + row.id + '\')"></i>付款</a> ');
|
||||||
|
|
@ -520,6 +495,12 @@
|
||||||
$.table.init(options);
|
$.table.init(options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function queryParams(params) {
|
||||||
|
var search = $.table.queryParams(params);
|
||||||
|
Object.assign(search, customParams)
|
||||||
|
return search;
|
||||||
|
}
|
||||||
|
|
||||||
function detail(id) {
|
function detail(id) {
|
||||||
var url = "order/goods?orderId=" + id;
|
var url = "order/goods?orderId=" + id;
|
||||||
$.modal.open("商品信息", url);
|
$.modal.open("商品信息", url);
|
||||||
|
|
@ -539,8 +520,45 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function searchByOrderStatus(orderStatus) {
|
function changeConditionBtnChosenStyle(e) {
|
||||||
$('#orderStatus').val(orderStatus);
|
$('.condition-btn .btn').removeClass('active-condition-btn');
|
||||||
|
$(e).addClass('active-condition-btn');
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectConditionBtn(e, params = {}) {
|
||||||
|
changeConditionBtnChosenStyle(e);
|
||||||
|
searchOrderList(params)
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectOnDoorOrderToday(e) {
|
||||||
|
changeConditionBtnChosenStyle(e);
|
||||||
|
var date = new Date();
|
||||||
|
selectConditionBtn(e, {
|
||||||
|
orderStatus: 2,
|
||||||
|
expectTimeStart: date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + " 00:00:00",
|
||||||
|
expectTimeEnd: date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + " 23:59:59"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectOnDoorOrderTomorrow(e) {
|
||||||
|
changeConditionBtnChosenStyle(e);
|
||||||
|
var date = new Date();
|
||||||
|
selectConditionBtn(e, {
|
||||||
|
orderStatus: 2,
|
||||||
|
expectTimeStart: date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + (date.getDate() + 1) + " 00:00:00",
|
||||||
|
expectTimeEnd: date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + (date.getDate() + 1) + " 23:59:59"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function searchOrderList(params) {
|
||||||
|
customParams = params;
|
||||||
|
$.table.search();
|
||||||
|
}
|
||||||
|
|
||||||
|
function resetForm() {
|
||||||
|
$.form.reset();
|
||||||
|
customParams = {};
|
||||||
|
changeConditionBtnChosenStyle();
|
||||||
$.table.search();
|
$.table.search();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,7 @@
|
||||||
sortable: true
|
sortable: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'account',
|
field: 'phone',
|
||||||
title: '账户'
|
title: '账户'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
package com.ghy.order.domain;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import com.ghy.common.annotation.Excel;
|
||||||
|
import com.ghy.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单约单记录对象 order_call_record
|
||||||
|
*
|
||||||
|
* @author clunt
|
||||||
|
* @date 2023-06-04
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OrderCallRecord extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键 */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 订单号 */
|
||||||
|
@Excel(name = "订单号")
|
||||||
|
private Long orderId;
|
||||||
|
|
||||||
|
/** 订单类型 01.主单 02.子单 */
|
||||||
|
@Excel(name = "订单类型 01.主单 02.子单")
|
||||||
|
private String orderType;
|
||||||
|
|
||||||
|
/** 联系时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "联系时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date callTime;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
package com.ghy.order.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 订单通用统计实体
|
||||||
|
* @author: yangdanqi
|
||||||
|
* @date: 2023/6/14
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OrderCount {
|
||||||
|
private Integer newOrderNum;
|
||||||
|
|
||||||
|
private Integer acceptedOrderNum;
|
||||||
|
|
||||||
|
private Integer waitForDoorOrderNum;
|
||||||
|
|
||||||
|
private Integer servingOrderNum;
|
||||||
|
|
||||||
|
private Integer confirmingOrderNum;
|
||||||
|
|
||||||
|
private Integer finishedOrderNum;
|
||||||
|
|
||||||
|
private Integer canceledOrderNum;
|
||||||
|
}
|
||||||
|
|
@ -8,8 +8,10 @@ import com.ghy.common.enums.PayTypeEnum;
|
||||||
import com.ghy.goods.domain.Goods;
|
import com.ghy.goods.domain.Goods;
|
||||||
import com.ghy.worker.domain.Worker;
|
import com.ghy.worker.domain.Worker;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
@ -105,6 +107,8 @@ public class OrderDetail extends BaseEntity {
|
||||||
|
|
||||||
private Integer ledgerAccountStatus;
|
private Integer ledgerAccountStatus;
|
||||||
|
|
||||||
|
private Integer sysPayStatus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发起提现后Adapay返回的对象ID draw_cash_id
|
* 发起提现后Adapay返回的对象ID draw_cash_id
|
||||||
*/
|
*/
|
||||||
|
|
@ -162,4 +166,34 @@ public class OrderDetail extends BaseEntity {
|
||||||
* 超时扣款次数
|
* 超时扣款次数
|
||||||
*/
|
*/
|
||||||
private Integer timeoutFineTimes;
|
private Integer timeoutFineTimes;
|
||||||
|
|
||||||
|
private String storeName;
|
||||||
|
|
||||||
|
private String storePhone;
|
||||||
|
|
||||||
|
private String workerName;
|
||||||
|
|
||||||
|
private String workerPhone;
|
||||||
|
|
||||||
|
private String keyWords;
|
||||||
|
|
||||||
|
private List<Long> workerIds;
|
||||||
|
|
||||||
|
private List<Long> masterIds;
|
||||||
|
|
||||||
|
private Boolean searchAfterList;
|
||||||
|
|
||||||
|
private Date workBeginTimeStart;
|
||||||
|
|
||||||
|
private Date workBeginTimeEnd;
|
||||||
|
|
||||||
|
private Date workFinishTimeStart;
|
||||||
|
|
||||||
|
private Date workFinishTimeEnd;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime createTimeStart;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime createTimeEnd;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.ghy.order.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 子单统计实体
|
||||||
|
* @author: yangdanqi
|
||||||
|
* @date: 2023/6/14
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OrderDetailCount extends OrderCount {
|
||||||
|
}
|
||||||
|
|
@ -139,4 +139,15 @@ public class OrderMaster extends BaseEntity {
|
||||||
* 超时扣款次数
|
* 超时扣款次数
|
||||||
*/
|
*/
|
||||||
private Integer timeoutFineTimes;
|
private Integer timeoutFineTimes;
|
||||||
|
|
||||||
|
private String orderMode;
|
||||||
|
|
||||||
|
private Integer sysPayStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否约单
|
||||||
|
* */
|
||||||
|
private String isCall;
|
||||||
|
|
||||||
|
private BigDecimal serverMoney;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.ghy.order.domain;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description: 主单统计实体
|
||||||
|
* @author: yangdanqi
|
||||||
|
* @date: 2023/6/7
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OrderMasterCount extends OrderCount {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,63 @@
|
||||||
|
package com.ghy.order.mapper;
|
||||||
|
|
||||||
|
import com.ghy.order.domain.OrderCallRecord;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单约单记录Mapper接口
|
||||||
|
*
|
||||||
|
* @author clunt
|
||||||
|
* @date 2023-06-04
|
||||||
|
*/
|
||||||
|
public interface OrderCallRecordMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询订单约单记录
|
||||||
|
*
|
||||||
|
* @param id 订单约单记录主键
|
||||||
|
* @return 订单约单记录
|
||||||
|
*/
|
||||||
|
public OrderCallRecord selectOrderCallRecordById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询订单约单记录列表
|
||||||
|
*
|
||||||
|
* @param orderCallRecord 订单约单记录
|
||||||
|
* @return 订单约单记录集合
|
||||||
|
*/
|
||||||
|
public List<OrderCallRecord> selectOrderCallRecordList(OrderCallRecord orderCallRecord);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增订单约单记录
|
||||||
|
*
|
||||||
|
* @param orderCallRecord 订单约单记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertOrderCallRecord(OrderCallRecord orderCallRecord);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改订单约单记录
|
||||||
|
*
|
||||||
|
* @param orderCallRecord 订单约单记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateOrderCallRecord(OrderCallRecord orderCallRecord);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除订单约单记录
|
||||||
|
*
|
||||||
|
* @param id 订单约单记录主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteOrderCallRecordById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除订单约单记录
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteOrderCallRecordByIds(String[] ids);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.ghy.order.mapper;
|
package com.ghy.order.mapper;
|
||||||
|
|
||||||
import com.ghy.order.domain.OrderDetail;
|
import com.ghy.order.domain.OrderDetail;
|
||||||
|
import com.ghy.order.domain.OrderDetailCount;
|
||||||
import com.ghy.order.domain.OrderStatusCount;
|
import com.ghy.order.domain.OrderStatusCount;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
|
@ -114,4 +115,6 @@ public interface OrderDetailMapper {
|
||||||
@Param("drawCashTime") Date drawCashTime, @Param("arrivalTime") Date arrivalTime);
|
@Param("drawCashTime") Date drawCashTime, @Param("arrivalTime") Date arrivalTime);
|
||||||
|
|
||||||
int deleteByMaster(Long masterId);
|
int deleteByMaster(Long masterId);
|
||||||
|
|
||||||
|
OrderDetailCount differentStatusOrderCount(OrderDetail orderDetail);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.ghy.order.mapper;
|
package com.ghy.order.mapper;
|
||||||
|
|
||||||
import com.ghy.order.domain.OrderMaster;
|
import com.ghy.order.domain.OrderMaster;
|
||||||
|
import com.ghy.order.domain.OrderMasterCount;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
@ -107,4 +108,6 @@ public interface OrderMasterMapper {
|
||||||
* @return 1
|
* @return 1
|
||||||
*/
|
*/
|
||||||
int removeWorker(Long id);
|
int removeWorker(Long id);
|
||||||
|
|
||||||
|
OrderMasterCount differentStatusOrderCount();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -47,4 +47,7 @@ public class SysOrderAssignRequest {
|
||||||
private String servDate;
|
private String servDate;
|
||||||
|
|
||||||
private String servTime;
|
private String servTime;
|
||||||
|
|
||||||
|
private String orderMode;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,62 @@
|
||||||
|
package com.ghy.order.service;
|
||||||
|
|
||||||
|
import com.ghy.order.domain.OrderCallRecord;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单约单记录Service接口
|
||||||
|
*
|
||||||
|
* @author clunt
|
||||||
|
* @date 2023-06-04
|
||||||
|
*/
|
||||||
|
public interface IOrderCallRecordService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询订单约单记录
|
||||||
|
*
|
||||||
|
* @param id 订单约单记录主键
|
||||||
|
* @return 订单约单记录
|
||||||
|
*/
|
||||||
|
public OrderCallRecord selectOrderCallRecordById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询订单约单记录列表
|
||||||
|
*
|
||||||
|
* @param orderCallRecord 订单约单记录
|
||||||
|
* @return 订单约单记录集合
|
||||||
|
*/
|
||||||
|
public List<OrderCallRecord> selectOrderCallRecordList(OrderCallRecord orderCallRecord);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增订单约单记录
|
||||||
|
*
|
||||||
|
* @param orderCallRecord 订单约单记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertOrderCallRecord(OrderCallRecord orderCallRecord);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改订单约单记录
|
||||||
|
*
|
||||||
|
* @param orderCallRecord 订单约单记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateOrderCallRecord(OrderCallRecord orderCallRecord);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除订单约单记录
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的订单约单记录主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteOrderCallRecordByIds(String ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除订单约单记录信息
|
||||||
|
*
|
||||||
|
* @param id 订单约单记录主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteOrderCallRecordById(Long id);
|
||||||
|
}
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
package com.ghy.order.service;
|
package com.ghy.order.service;
|
||||||
|
|
||||||
import com.ghy.common.enums.OrderStatus;
|
import com.ghy.common.enums.OrderStatus;
|
||||||
import com.ghy.order.domain.OrderAddSubtract;
|
import com.ghy.order.domain.*;
|
||||||
import com.ghy.order.domain.OrderDetail;
|
|
||||||
import com.ghy.order.domain.OrderStatusCount;
|
|
||||||
import com.ghy.payment.domain.FinancialChangeRecord;
|
import com.ghy.payment.domain.FinancialChangeRecord;
|
||||||
import com.huifu.adapay.core.exception.BaseAdaPayException;
|
import com.huifu.adapay.core.exception.BaseAdaPayException;
|
||||||
|
|
||||||
|
|
@ -186,4 +184,6 @@ public interface OrderDetailService {
|
||||||
* @return 1
|
* @return 1
|
||||||
*/
|
*/
|
||||||
int insertOrderAddSubtract(OrderAddSubtract body);
|
int insertOrderAddSubtract(OrderAddSubtract body);
|
||||||
|
|
||||||
|
OrderDetailCount differentStatusOrderCount(OrderDetail orderDetail);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package com.ghy.order.service;
|
||||||
|
|
||||||
import com.ghy.common.core.domain.AjaxResult;
|
import com.ghy.common.core.domain.AjaxResult;
|
||||||
import com.ghy.order.domain.OrderMaster;
|
import com.ghy.order.domain.OrderMaster;
|
||||||
|
import com.ghy.order.domain.OrderMasterCount;
|
||||||
import com.ghy.order.request.AppOrderRequest;
|
import com.ghy.order.request.AppOrderRequest;
|
||||||
import com.huifu.adapay.core.exception.BaseAdaPayException;
|
import com.huifu.adapay.core.exception.BaseAdaPayException;
|
||||||
|
|
||||||
|
|
@ -165,4 +166,6 @@ public interface OrderMasterService {
|
||||||
int removeWorker(Long id);
|
int removeWorker(Long id);
|
||||||
|
|
||||||
int reject(OrderMaster orderMaster);
|
int reject(OrderMaster orderMaster);
|
||||||
|
|
||||||
|
OrderMasterCount differentStatusOrderCount();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,96 @@
|
||||||
|
package com.ghy.order.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.ghy.order.domain.OrderCallRecord;
|
||||||
|
import com.ghy.order.mapper.OrderCallRecordMapper;
|
||||||
|
import com.ghy.order.service.IOrderCallRecordService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ghy.common.core.text.Convert;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单约单记录Service业务层处理
|
||||||
|
*
|
||||||
|
* @author clunt
|
||||||
|
* @date 2023-06-04
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class OrderCallRecordServiceImpl implements IOrderCallRecordService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private OrderCallRecordMapper orderCallRecordMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询订单约单记录
|
||||||
|
*
|
||||||
|
* @param id 订单约单记录主键
|
||||||
|
* @return 订单约单记录
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public OrderCallRecord selectOrderCallRecordById(Long id)
|
||||||
|
{
|
||||||
|
return orderCallRecordMapper.selectOrderCallRecordById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询订单约单记录列表
|
||||||
|
*
|
||||||
|
* @param orderCallRecord 订单约单记录
|
||||||
|
* @return 订单约单记录
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<OrderCallRecord> selectOrderCallRecordList(OrderCallRecord orderCallRecord)
|
||||||
|
{
|
||||||
|
return orderCallRecordMapper.selectOrderCallRecordList(orderCallRecord);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增订单约单记录
|
||||||
|
*
|
||||||
|
* @param orderCallRecord 订单约单记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertOrderCallRecord(OrderCallRecord orderCallRecord)
|
||||||
|
{
|
||||||
|
return orderCallRecordMapper.insertOrderCallRecord(orderCallRecord);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改订单约单记录
|
||||||
|
*
|
||||||
|
* @param orderCallRecord 订单约单记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateOrderCallRecord(OrderCallRecord orderCallRecord)
|
||||||
|
{
|
||||||
|
return orderCallRecordMapper.updateOrderCallRecord(orderCallRecord);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除订单约单记录
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的订单约单记录主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteOrderCallRecordByIds(String ids)
|
||||||
|
{
|
||||||
|
return orderCallRecordMapper.deleteOrderCallRecordByIds(Convert.toStrArray(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除订单约单记录信息
|
||||||
|
*
|
||||||
|
* @param id 订单约单记录主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteOrderCallRecordById(Long id)
|
||||||
|
{
|
||||||
|
return orderCallRecordMapper.deleteOrderCallRecordById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -852,4 +852,9 @@ public class OrderDetailServiceImpl implements OrderDetailService {
|
||||||
insert.setPayType(body.getPayType());
|
insert.setPayType(body.getPayType());
|
||||||
return orderAddSubtractMapper.insert(insert);
|
return orderAddSubtractMapper.insert(insert);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public OrderDetailCount differentStatusOrderCount(OrderDetail orderDetail) {
|
||||||
|
return orderDetailMapper.differentStatusOrderCount(orderDetail);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ import com.ghy.common.utils.AdapayUtils;
|
||||||
import com.ghy.order.domain.OrderDetail;
|
import com.ghy.order.domain.OrderDetail;
|
||||||
import com.ghy.order.domain.OrderGoods;
|
import com.ghy.order.domain.OrderGoods;
|
||||||
import com.ghy.order.domain.OrderMaster;
|
import com.ghy.order.domain.OrderMaster;
|
||||||
|
import com.ghy.order.domain.OrderMasterCount;
|
||||||
import com.ghy.order.mapper.OrderMasterMapper;
|
import com.ghy.order.mapper.OrderMasterMapper;
|
||||||
import com.ghy.order.request.AppOrderRequest;
|
import com.ghy.order.request.AppOrderRequest;
|
||||||
import com.ghy.order.service.OrderDetailService;
|
import com.ghy.order.service.OrderDetailService;
|
||||||
|
|
@ -557,4 +558,9 @@ public class OrderMasterServiceImpl implements OrderMasterService {
|
||||||
orderDetailService.deleteByMaster(orderMaster.getId());
|
orderDetailService.deleteByMaster(orderMaster.getId());
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public OrderMasterCount differentStatusOrderCount() {
|
||||||
|
return orderMasterMapper.differentStatusOrderCount();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,67 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.ghy.order.mapper.OrderCallRecordMapper">
|
||||||
|
|
||||||
|
<resultMap type="OrderCallRecord" id="OrderCallRecordResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="orderId" column="order_id" />
|
||||||
|
<result property="orderType" column="order_type" />
|
||||||
|
<result property="callTime" column="call_time" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectOrderCallRecordVo">
|
||||||
|
select id, order_id, order_type, call_time from order_call_record
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectOrderCallRecordList" parameterType="OrderCallRecord" resultMap="OrderCallRecordResult">
|
||||||
|
<include refid="selectOrderCallRecordVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="orderId != null "> and order_id = #{orderId}</if>
|
||||||
|
<if test="orderType != null and orderType != ''"> and order_type = #{orderType}</if>
|
||||||
|
<if test="callTime != null "> and call_time = #{callTime}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectOrderCallRecordById" parameterType="Long" resultMap="OrderCallRecordResult">
|
||||||
|
<include refid="selectOrderCallRecordVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertOrderCallRecord" parameterType="OrderCallRecord" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into order_call_record
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="orderId != null">order_id,</if>
|
||||||
|
<if test="orderType != null">order_type,</if>
|
||||||
|
<if test="callTime != null">call_time,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="orderId != null">#{orderId},</if>
|
||||||
|
<if test="orderType != null">#{orderType},</if>
|
||||||
|
<if test="callTime != null">#{callTime},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateOrderCallRecord" parameterType="OrderCallRecord">
|
||||||
|
update order_call_record
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="orderId != null">order_id = #{orderId},</if>
|
||||||
|
<if test="orderType != null">order_type = #{orderType},</if>
|
||||||
|
<if test="callTime != null">call_time = #{callTime},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteOrderCallRecordById" parameterType="Long">
|
||||||
|
delete from order_call_record where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteOrderCallRecordByIds" parameterType="String">
|
||||||
|
delete from order_call_record where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -129,6 +129,18 @@
|
||||||
<if test="workerId != null and workerId != 0">
|
<if test="workerId != null and workerId != 0">
|
||||||
AND od.worker_id = #{workerId}
|
AND od.worker_id = #{workerId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="workerIds != null and workerIds.size() > 0">
|
||||||
|
AND od.worker_id in
|
||||||
|
<foreach collection="workerIds" item="workerId" open="(" separator="," close=")">
|
||||||
|
#{workerId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="masterIds != null and masterIds.size() > 0">
|
||||||
|
AND od.order_master_id in
|
||||||
|
<foreach collection="masterIds" item="masterId" open="(" separator="," close=")">
|
||||||
|
#{masterId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
<if test="goodsCategoryId != null">
|
<if test="goodsCategoryId != null">
|
||||||
AND g.dept_goods_category_id = #{goodsCategoryId}
|
AND g.dept_goods_category_id = #{goodsCategoryId}
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -144,6 +156,24 @@
|
||||||
<if test="expectTimeEnd != null">
|
<if test="expectTimeEnd != null">
|
||||||
AND od.expect_time_end <= #{expectTimeEnd}
|
AND od.expect_time_end <= #{expectTimeEnd}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="createTimeStart != null">
|
||||||
|
AND od.create_time >= #{createTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test="createTimeEnd != null">
|
||||||
|
AND od.create_time <= #{createTimeEnd}
|
||||||
|
</if>
|
||||||
|
<if test="workFinishTimeStart != null">
|
||||||
|
AND od.work_finish_time >= #{workFinishTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test="workFinishTimeEnd != null">
|
||||||
|
AND od.work_finish_time <= #{workFinishTimeEnd}
|
||||||
|
</if>
|
||||||
|
<if test="workBeginTimeStart != null">
|
||||||
|
AND od.work_begin_time >= #{workBeginTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test="workBeginTimeEnd != null">
|
||||||
|
AND od.work_begin_time <= #{workBeginTimeEnd}
|
||||||
|
</if>
|
||||||
<if test="orderDetailIds != null">
|
<if test="orderDetailIds != null">
|
||||||
AND od.id in ( ${orderDetailIds} )
|
AND od.id in ( ${orderDetailIds} )
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -236,6 +266,18 @@
|
||||||
#{drawCashStatus}
|
#{drawCashStatus}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
<if test="timeout != null">
|
||||||
|
AND od.timeout_ = #{timeout}
|
||||||
|
</if>
|
||||||
|
<if test="masterIds != null and masterIds.size() > 0">
|
||||||
|
AND od.order_master_id in
|
||||||
|
<foreach collection="masterIds" item="masterId" open="(" separator="," close=")">
|
||||||
|
#{masterId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
<if test="orderDetailIds != null">
|
||||||
|
AND od.id in ( ${orderDetailIds} )
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by od.create_time
|
order by od.create_time
|
||||||
<trim suffixOverrides=",">
|
<trim suffixOverrides=",">
|
||||||
|
|
@ -400,4 +442,20 @@
|
||||||
update_time = NOW()
|
update_time = NOW()
|
||||||
WHERE draw_cash_id = #{drawCashId}
|
WHERE draw_cash_id = #{drawCashId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<select id="differentStatusOrderCount" resultType="com.ghy.order.domain.OrderDetailCount" parameterType="com.ghy.order.domain.OrderDetail">
|
||||||
|
select
|
||||||
|
count(case when od.order_status = 0 then 1 else null end) as newOrderNum,
|
||||||
|
count(case when od.order_status = 1 then 1 else null end) as acceptedOrderNum,
|
||||||
|
count(case when od.order_status = 2 then 1 else null end) as waitForDoorOrderNum,
|
||||||
|
count(case when od.order_status = 3 then 1 else null end) as servingOrderNum,
|
||||||
|
count(case when od.order_status = 4 then 1 else null end) as confirmingOrderNum,
|
||||||
|
count(case when od.order_status = 5 then 1 else null end) as finishedOrderNum,
|
||||||
|
count(case when od.order_status = 6 then 1 else null end) as canceledOrderNum
|
||||||
|
from order_detail od
|
||||||
|
where 1 = 1
|
||||||
|
<if test="timeout != null">
|
||||||
|
AND od.timeout_ = #{timeout}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
<result property="customerId" column="customer_id"/>
|
<result property="customerId" column="customer_id"/>
|
||||||
<result property="addressId" column="address_id"/>
|
<result property="addressId" column="address_id"/>
|
||||||
<result property="orderType" column="order_type"/>
|
<result property="orderType" column="order_type"/>
|
||||||
|
<result property="orderMode" column="order_mode"/>
|
||||||
<result property="orderStatus" column="order_status"/>
|
<result property="orderStatus" column="order_status"/>
|
||||||
<result property="payType" column="pay_type"/>
|
<result property="payType" column="pay_type"/>
|
||||||
<result property="payStatus" column="pay_status"/>
|
<result property="payStatus" column="pay_status"/>
|
||||||
|
|
@ -29,6 +30,8 @@
|
||||||
<result property="hasDispatchedAll" column="has_dispatched_all"/>
|
<result property="hasDispatchedAll" column="has_dispatched_all"/>
|
||||||
<result property="timeout" column="timeout_"/>
|
<result property="timeout" column="timeout_"/>
|
||||||
<result property="timeoutFineTimes" column="timeout_fine_times"/>
|
<result property="timeoutFineTimes" column="timeout_fine_times"/>
|
||||||
|
<result property="isCall" column="is_call" />
|
||||||
|
<result property="serverMoney" column="server_money" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectOrderMaster">
|
<sql id="selectOrderMaster">
|
||||||
|
|
@ -38,6 +41,7 @@
|
||||||
customer_id,
|
customer_id,
|
||||||
address_id,
|
address_id,
|
||||||
order_type,
|
order_type,
|
||||||
|
order_mode,
|
||||||
order_status,
|
order_status,
|
||||||
pay_type,
|
pay_type,
|
||||||
pay_status,
|
pay_status,
|
||||||
|
|
@ -53,7 +57,9 @@
|
||||||
all_self_assigned,
|
all_self_assigned,
|
||||||
goods_id,
|
goods_id,
|
||||||
timeout_,
|
timeout_,
|
||||||
timeout_fine_times
|
timeout_fine_times,
|
||||||
|
is_call,
|
||||||
|
order_mode
|
||||||
FROM order_master
|
FROM order_master
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="selectOrderMasterMoreInfo">
|
<sql id="selectOrderMasterMoreInfo">
|
||||||
|
|
@ -63,6 +69,7 @@
|
||||||
om.customer_id,
|
om.customer_id,
|
||||||
om.address_id,
|
om.address_id,
|
||||||
om.order_type,
|
om.order_type,
|
||||||
|
om.order_mode,
|
||||||
om.order_status,
|
om.order_status,
|
||||||
om.pay_type,
|
om.pay_type,
|
||||||
om.pay_status,
|
om.pay_status,
|
||||||
|
|
@ -78,10 +85,13 @@
|
||||||
om.all_self_assigned,
|
om.all_self_assigned,
|
||||||
om.goods_id,
|
om.goods_id,
|
||||||
om.timeout_,
|
om.timeout_,
|
||||||
om.timeout_fine_times
|
om.timeout_fine_times,
|
||||||
|
om.is_call,
|
||||||
|
fm.server_money
|
||||||
FROM order_master om
|
FROM order_master om
|
||||||
LEFT JOIN customer_address ca ON ca.customer_address_id = om.address_id
|
LEFT JOIN customer_address ca ON ca.customer_address_id = om.address_id
|
||||||
LEFT JOIN goods g ON g.goods_id = om.goods_id
|
LEFT JOIN goods g ON g.goods_id = om.goods_id
|
||||||
|
LEFT JOIN financial_master fm ON om.id = fm.order_master_id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectOrderMasterList" parameterType="com.ghy.order.domain.OrderMaster" resultMap="OrderMasterResult">
|
<select id="selectOrderMasterList" parameterType="com.ghy.order.domain.OrderMaster" resultMap="OrderMasterResult">
|
||||||
|
|
@ -128,6 +138,14 @@
|
||||||
</if>
|
</if>
|
||||||
<if test="workerId == -1">
|
<if test="workerId == -1">
|
||||||
AND om.worker_id IS NULL
|
AND om.worker_id IS NULL
|
||||||
|
AND ( (om.order_mode in ('01','03','04'))
|
||||||
|
OR (om.order_mode = '02' and fm.pay_status = 1) )
|
||||||
|
</if>
|
||||||
|
<if test="sysPayStatus != null">
|
||||||
|
AND fm.pay_status = #{sysPayStatus}
|
||||||
|
</if>
|
||||||
|
<if test="orderMode != null and orderMode != ''">
|
||||||
|
AND om.order_mode = #{orderMode}
|
||||||
</if>
|
</if>
|
||||||
<if test="goodsCategoryId != null">
|
<if test="goodsCategoryId != null">
|
||||||
AND g.dept_goods_category_id = #{goodsCategoryId}
|
AND g.dept_goods_category_id = #{goodsCategoryId}
|
||||||
|
|
@ -165,6 +183,15 @@
|
||||||
<if test="timeout != null">
|
<if test="timeout != null">
|
||||||
AND om.timeout_ = #{timeout}
|
AND om.timeout_ = #{timeout}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="isCall != null">
|
||||||
|
AND om.is_call = #{isCall}
|
||||||
|
</if>
|
||||||
|
<if test="expectTimeStart != null">
|
||||||
|
AND om.expect_time_start >= #{expectTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test="expectTimeEnd != null">
|
||||||
|
AND om.expect_time_end <= #{expectTimeEnd}
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by om.create_time
|
order by om.create_time
|
||||||
<trim suffixOverrides=",">
|
<trim suffixOverrides=",">
|
||||||
|
|
@ -180,7 +207,9 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="countOrderMasterList" parameterType="com.ghy.order.domain.OrderMaster" resultType="Long">
|
<select id="countOrderMasterList" parameterType="com.ghy.order.domain.OrderMaster" resultType="Long">
|
||||||
SELECT COUNT(*) FROM order_master om
|
SELECT COUNT(*)
|
||||||
|
FROM order_master om
|
||||||
|
LEFT JOIN financial_master fm ON om.id = fm.order_master_id
|
||||||
<where>
|
<where>
|
||||||
<if test="isMonitoredOrder">
|
<if test="isMonitoredOrder">
|
||||||
AND (om.all_self_assigned = 0 or om.all_self_assigned is null) AND om.order_status in (1,2,3,4)
|
AND (om.all_self_assigned = 0 or om.all_self_assigned is null) AND om.order_status in (1,2,3,4)
|
||||||
|
|
@ -217,6 +246,14 @@
|
||||||
</if>
|
</if>
|
||||||
<if test="workerId == -1">
|
<if test="workerId == -1">
|
||||||
AND om.worker_id IS NULL
|
AND om.worker_id IS NULL
|
||||||
|
AND ( (om.order_mode in ('01','03','04'))
|
||||||
|
OR (om.order_mode = '02' and fm.pay_status = 1) )
|
||||||
|
</if>
|
||||||
|
<if test="sysPayStatus != null">
|
||||||
|
AND fm.pay_status = #{sysPayStatus}
|
||||||
|
</if>
|
||||||
|
<if test="orderMode != null and orderMode != ''">
|
||||||
|
AND om.order_mode = #{orderMode}
|
||||||
</if>
|
</if>
|
||||||
<if test="exceptOrderStatus != null">
|
<if test="exceptOrderStatus != null">
|
||||||
AND om.order_status != #{exceptOrderStatus}
|
AND om.order_status != #{exceptOrderStatus}
|
||||||
|
|
@ -227,6 +264,15 @@
|
||||||
<if test="orderMasterIds != null and orderMasterIds != ''">
|
<if test="orderMasterIds != null and orderMasterIds != ''">
|
||||||
AND om.id in (${orderMasterIds})
|
AND om.id in (${orderMasterIds})
|
||||||
</if>
|
</if>
|
||||||
|
<if test="isCall != null">
|
||||||
|
AND om.is_call = #{isCall}
|
||||||
|
</if>
|
||||||
|
<if test="expectTimeStart != null">
|
||||||
|
AND om.expect_time_start >= #{expectTimeStart}
|
||||||
|
</if>
|
||||||
|
<if test="expectTimeEnd != null">
|
||||||
|
AND om.expect_time_end <= #{expectTimeEnd}
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
@ -268,6 +314,7 @@
|
||||||
<if test="allSelfAssigned != null">all_self_assigned = #{allSelfAssigned},</if>
|
<if test="allSelfAssigned != null">all_self_assigned = #{allSelfAssigned},</if>
|
||||||
<if test="resetAllSelfAssigned">all_self_assigned = null,</if>
|
<if test="resetAllSelfAssigned">all_self_assigned = null,</if>
|
||||||
<if test="hasDispatchedAll != null">has_dispatched_all = #{hasDispatchedAll},</if>
|
<if test="hasDispatchedAll != null">has_dispatched_all = #{hasDispatchedAll},</if>
|
||||||
|
<if test="isCall != null">is_call = #{isCall},</if>
|
||||||
update_time = SYSDATE()
|
update_time = SYSDATE()
|
||||||
</set>
|
</set>
|
||||||
WHERE id = #{id}
|
WHERE id = #{id}
|
||||||
|
|
@ -295,6 +342,7 @@
|
||||||
<if test="addressId != null and addressId != 0">address_id,</if>
|
<if test="addressId != null and addressId != 0">address_id,</if>
|
||||||
<if test="goodsId != null and goodsId != 0">goods_id,</if>
|
<if test="goodsId != null and goodsId != 0">goods_id,</if>
|
||||||
<if test="orderType != null">order_type,</if>
|
<if test="orderType != null">order_type,</if>
|
||||||
|
<if test="orderMode != null">order_mode,</if>
|
||||||
<if test="orderStatus != null">order_status,</if>
|
<if test="orderStatus != null">order_status,</if>
|
||||||
<if test="payType != null">pay_type,</if>
|
<if test="payType != null">pay_type,</if>
|
||||||
<if test="payStatus != null">pay_status,</if>
|
<if test="payStatus != null">pay_status,</if>
|
||||||
|
|
@ -313,6 +361,7 @@
|
||||||
<if test="addressId != null and addressId != 0">#{addressId},</if>
|
<if test="addressId != null and addressId != 0">#{addressId},</if>
|
||||||
<if test="goodsId != null and goodsId != 0">#{goodsId},</if>
|
<if test="goodsId != null and goodsId != 0">#{goodsId},</if>
|
||||||
<if test="orderType != null">#{orderType},</if>
|
<if test="orderType != null">#{orderType},</if>
|
||||||
|
<if test="orderMode != null">#{orderMode},</if>
|
||||||
<if test="orderStatus != null">#{orderStatus},</if>
|
<if test="orderStatus != null">#{orderStatus},</if>
|
||||||
<if test="payType != null">#{payType},</if>
|
<if test="payType != null">#{payType},</if>
|
||||||
<if test="payStatus != null">#{payStatus},</if>
|
<if test="payStatus != null">#{payStatus},</if>
|
||||||
|
|
@ -374,4 +423,15 @@
|
||||||
WHERE id = #{id}
|
WHERE id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<select id="differentStatusOrderCount" resultType="com.ghy.order.domain.OrderMasterCount">
|
||||||
|
select
|
||||||
|
count(case when om.order_status = 1 then 1 else null end) as acceptedOrderNum,
|
||||||
|
count(case when om.order_status = 2 then 1 else null end) as waitForDoorOrderNum,
|
||||||
|
count(case when om.order_status = 3 then 1 else null end) as servingOrderNum,
|
||||||
|
count(case when om.order_status = 4 then 1 else null end) as confirmingOrderNum,
|
||||||
|
count(case when om.order_status = 5 then 1 else null end) as finishedOrderNum,
|
||||||
|
count(case when om.order_status = 6 then 1 else null end) as canceledOrderNum
|
||||||
|
from order_master om
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,12 @@ public interface WorkerMapper {
|
||||||
*/
|
*/
|
||||||
List<Worker> getWorkerList(Worker worker);
|
List<Worker> getWorkerList(Worker worker);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param worker 师傅端
|
||||||
|
* @return 师傅集合
|
||||||
|
*/
|
||||||
|
List<Worker> getWorkByPhoneAndPwd(Worker worker);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param worker 师傅信息
|
* @param worker 师傅信息
|
||||||
* @return 新增成功条数
|
* @return 新增成功条数
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,8 @@ public interface WorkerService {
|
||||||
*/
|
*/
|
||||||
int updateWorker(Worker worker);
|
int updateWorker(Worker worker);
|
||||||
|
|
||||||
|
List<Worker> getWorkByPhoneAndPwd(Worker worker);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用师傅ID查询
|
* 用师傅ID查询
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,11 @@ public class WorkerServiceImpl implements WorkerService {
|
||||||
return workerMapper.updateWorker(worker);
|
return workerMapper.updateWorker(worker);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Worker> getWorkByPhoneAndPwd(Worker worker) {
|
||||||
|
return workerMapper.getWorkByPhoneAndPwd(worker);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Worker selectById(Long workerId) {
|
public Worker selectById(Long workerId) {
|
||||||
return workerMapper.selectById(workerId);
|
return workerMapper.selectById(workerId);
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,14 @@
|
||||||
LEFT JOIN sys_dept_config sdc ON w.dept_id = sdc.dept_id
|
LEFT JOIN sys_dept_config sdc ON w.dept_id = sdc.dept_id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
<sql id="selectBasic">
|
||||||
|
SELECT
|
||||||
|
w.worker_id, w.name, w.account, w.phone, w.password, w.open_id, w.dept_id, w.status, w.worker_logo_url,
|
||||||
|
w.leader_team_rate, w.leader_team_money, w.create_by, w.create_time, w.update_by, w.update_time,
|
||||||
|
w.remark, w.type, w.store_status, w.alipay_account, w.alipay_name
|
||||||
|
FROM worker w
|
||||||
|
</sql>
|
||||||
|
|
||||||
<select id="getWorkerList" parameterType="com.ghy.worker.domain.Worker" resultMap="WorkerResult">
|
<select id="getWorkerList" parameterType="com.ghy.worker.domain.Worker" resultMap="WorkerResult">
|
||||||
<include refid="selectWorker" /> where w.worker_id in (
|
<include refid="selectWorker" /> where w.worker_id in (
|
||||||
SELECT w.worker_id FROM worker w
|
SELECT w.worker_id FROM worker w
|
||||||
|
|
@ -96,6 +104,11 @@
|
||||||
)
|
)
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getWorkByPhoneAndPwd" parameterType="com.ghy.worker.domain.Worker" resultMap="WorkerResult">
|
||||||
|
<include refid="selectBasic" />
|
||||||
|
where phone = #{phone} and password = #{password}
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="selectById" parameterType="Long" resultMap="WorkerResult">
|
<select id="selectById" parameterType="Long" resultMap="WorkerResult">
|
||||||
<include refid="selectWorker" /> WHERE worker_id = #{workerId}
|
<include refid="selectWorker" /> WHERE worker_id = #{workerId}
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue