From 6ada97d503bd93722c081b66a9adcce7599e5536 Mon Sep 17 00:00:00 2001
From: jyy <935090232@qq.com>
Date: Wed, 14 Apr 2021 17:31:07 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/score_shop' into score_shop
---
zq-erp/src/main/resources/templates/views/admin/shop/shopOrder-list.html | 64 ++++
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java | 12
zq-erp/src/main/resources/templates/views/admin/shop/logisticsImport-form.html | 2
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yypb-form-bak.html | 498 ++++++++++++++++++++++++++++++++++++++
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yypb-form.html | 5
zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopOrderAction.java | 138 ++++++++-
zq-erp/src/main/resources/static/js/function/vip.js | 2
zq-erp/src/main/resources/config/application.properties | 10
zq-erp/src/main/java/com/matrix/system/hive/action/ProjServiceController.java | 10
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/service_all_list.html | 2
zq-erp/src/main/java/com/matrix/system/hive/service/SysProjServicesService.java | 2
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopOrderDao.xml | 2
zq-erp/src/main/java/com/matrix/system/shopXcx/vo/LogisticsImportVo.java | 14
13 files changed, 710 insertions(+), 51 deletions(-)
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/ProjServiceController.java b/zq-erp/src/main/java/com/matrix/system/hive/action/ProjServiceController.java
index 1582cad..faed6f0 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/action/ProjServiceController.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/action/ProjServiceController.java
@@ -277,6 +277,7 @@
return "admin/hive/beautySalon/yypb-form";
}
+
/**
* 进入预约排班详情
*
@@ -452,6 +453,7 @@
}
}
+
/**
* 根据id取消预约
*/
@@ -561,6 +563,14 @@
}
}
+
+ @RequestMapping(value = "/addServiceProj")
+ @ResponseBody
+ public AjaxResult addServiceProj(SysProjServices sysProjServices) {
+
+ return AjaxResult.buildSuccessInstance("保存成功");
+ }
+
/**
* 删除服务单项目/套餐
* @param id
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/SysProjServicesService.java b/zq-erp/src/main/java/com/matrix/system/hive/service/SysProjServicesService.java
index 365a3dc..27ed849 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/service/SysProjServicesService.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/service/SysProjServicesService.java
@@ -74,6 +74,8 @@
/**
* 删除服务单中明细, 即项目/套餐
+ * @param id
+ * @return
*/
public int deleteProjServiceItemById(Long id);
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java
index 9fe4ba1..57c2716 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java
@@ -362,8 +362,8 @@
/** 验证数据是否正确 */
SysProjServices checkProjServices = sysProjServicesDao.selectById(projServices.getId());
// 验证服务单是否存在或者取消
- if (!checkProjServices.getState().equals(Dictionary.SERVICE_STATU_DYY)
- && !checkProjServices.getState().equals(Dictionary.SERVICE_STATU_YYCG)) {
+ if (checkProjServices.getState().equals(Dictionary.SERVICE_STATU_YYQX)
+ || checkProjServices.getState().equals(Dictionary.SERVICE_STATU_FFJS)) {
throw new GlobleException("该服务单已被取消或者不存在!");
}
// 验证是否选择床位
@@ -390,7 +390,7 @@
}
// 判断是否是编辑,还是新增,编辑则需要先释放资源
- if (checkProjServices.getState().equals(Dictionary.SERVICE_STATU_YYCG)) {
+ if (!checkProjServices.getState().equals(Dictionary.SERVICE_STATU_DYY)) {
// 释放床位资源
bedStateDao.deleteByServiceId(checkProjServices.getId());
}
@@ -418,8 +418,10 @@
}
- // 设置成功状态
- projServices.setState(Dictionary.SERVICE_STATU_XPL);
+ if (Dictionary.SERVICE_STATU_DYY.equals(projServices.getState())) {
+ // 设置成功状态
+ projServices.setState(Dictionary.SERVICE_STATU_XPL);
+ }
// 判断当前门店是否有历史美疗师
LastestWorkBeatuistaff lastWorkStaff = new LastestWorkBeatuistaff();
lastWorkStaff.setShopId(checkProjServices.getShopId());
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopOrderAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopOrderAction.java
index 7d133fd..7b7cdc0 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopOrderAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopOrderAction.java
@@ -81,6 +81,8 @@
//记录编辑前的值Before_Edit_Value
public static final String BEV = "ShopOrder_BEV";
+ public static final List<LogisticsImportVo> logisticsImportVoLists = new ArrayList<>();
+
@Value("${evn}")
private String evn;
@@ -107,16 +109,65 @@
AjaxResult ajaxResult = new AjaxResult();
List<LogisticsImportVo> logisticsImportVos = logisticsImportFile(saveFile);
if(CollUtil.isNotEmpty(logisticsImportVos)){
- for(LogisticsImportVo logisticsImportVo : logisticsImportVos){
- infoRemind = infoRemind + logisticsImportVo.getRemark()+";";
- }
- ajaxResult = AjaxResult.buildSuccessInstance(infoRemind);
+ ajaxResult = AjaxResult.buildSuccessInstance("部分数据导入失败");
ajaxResult.setStatus(AjaxResult.STATUS_FAIL);
}else{
ajaxResult = AjaxResult.buildSuccessInstance("导入成功");
ajaxResult.setStatus(AjaxResult.STATUS_SUCCESS);
}
return ajaxResult;
+ }
+
+ @RequestMapping(value = "/exportLogisticsImportExcel")
+ public void exportLogisticsImportExcel(HttpServletResponse res) {
+ OutputStream os = null;
+ try {
+ res.setCharacterEncoding("UTF-8");
+ res.setHeader("content-type", "application/octet-stream;charset=UTF-8");
+ res.setContentType("application/octet-stream;charset=UTF-8");
+ Date date = new Date();
+ SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy年MM月dd日HH时mm分ss");
+ res.setHeader("Content-Disposition", "attachment;filename=" +
+ java.net.URLEncoder.encode("快递单导入列表" + dateFormat.format(date) + ".xls".trim(), "UTF-8"));
+
+ os = res.getOutputStream();
+ ExcelUtil.createWorkbookAtOutStream(ExcelVersion.V2007, disPoseLogisticsImportExcel(logisticsImportVoLists), os, true);
+ logisticsImportVoLists.clear();
+ } catch (Exception e) {
+ LogUtil.error("快递单导入异常", e);
+ } finally {
+ if (os != null) {
+ try {
+ os.close();
+ } catch (IOException e) {
+ LogUtil.error("关闭资源异常", e);
+ }
+ }
+ }
+ }
+ private List<ExcelSheetPO> disPoseLogisticsImportExcel(List<LogisticsImportVo> logisticsImportVos) {
+ List<ExcelSheetPO> res = new ArrayList<>();
+ ExcelSheetPO orderSheet = new ExcelSheetPO();
+ orderSheet.setSheetName("快递单导入");
+ orderSheet.setTitle("快递单导入失败列表");
+ String[] header = new String[]{"订单编号", "物流公司编码", "物流公司名称", "快递单号", "失败原因"};
+ orderSheet.setHeaders(header);
+ List<List<Object>> body = new ArrayList<>();
+ SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss");
+ if(CollUtil.isNotEmpty(logisticsImportVos)){
+ for (LogisticsImportVo logisticsImportVo : logisticsImportVos) {
+ List<Object> bodyItem = new ArrayList<>();
+ bodyItem.add(logisticsImportVo.getOrderNo());
+ bodyItem.add(logisticsImportVo.getLogisticsCompanyCode());
+ bodyItem.add(logisticsImportVo.getLogisticsCompany());
+ bodyItem.add(logisticsImportVo.getWaybillNo());
+ bodyItem.add(logisticsImportVo.getFailReason());
+ body.add(bodyItem);
+ }
+ }
+ orderSheet.setDataList(body);
+ res.add(orderSheet);
+ return res;
}
public List<LogisticsImportVo> logisticsImportFile(File file) throws IOException {
@@ -132,8 +183,9 @@
* 订单处于【待付款】【待配送】【待收货】都可以导入
* 其他状态生成一个提示
*/
+
+ LogisticsImportVo logisticsImportVo = new LogisticsImportVo();
List<Object> objects = dataList.get(j);
- ShopDeliveryInfo shopDeliveryInfo = new ShopDeliveryInfo();
//订单编号
String orderNo = objects.get(0).toString();
ShopOrder shopOrder = shopOrderDao.selectShopOrderByOrderNo(orderNo);
@@ -146,29 +198,65 @@
String logisticsCompany = objects.get(2).toString();
//快递单号
String waybillNo = objects.get(3).toString();
- shopDeliveryInfo.setOrderNo(orderNo);
- shopDeliveryInfo.setLogisticsCompanyCode(logisticsCompanyCode);
- shopDeliveryInfo.setLogisticsCompany(logisticsCompany);
- shopDeliveryInfo.setWaybillNo(waybillNo);
- shopDeliveryInfo.setUpdateBy(sysUsers.getSuName());
- shopDeliveryInfo.setLogisticsStatus(AppConstance.LOGISTICS_STATUS_OF_RECEIVE);
- shopDeliveryInfo.setDeliveryTime(new Date());
- shopDeliveryInfoDao.updateByModel(shopDeliveryInfo);
- //构建需要修改订单信息Map
- Map<String, Object> modifyMap = new HashMap<>();
- modifyMap.put("id", shopOrder.getId());
- modifyMap.put("orderStatus", ShopOrder.ORDER_STATUS_WAIT_RECEIVE);
- shopOrderDao.updateByMap(modifyMap);
+ ShopDeliveryInfo shopDeliveryInfo = new ShopDeliveryInfo();
+ shopDeliveryInfo.setOrderId(shopOrder.getId());
+ List<ShopDeliveryInfo> infoList = shopDeliveryInfoDao.selectByModel(shopDeliveryInfo);
+ if (CollectionUtils.isEmpty(infoList)) {
+ logisticsImportVo.setOrderNo(objects.get(0).toString());
+ logisticsImportVo.setLogisticsCompanyCode(objects.get(1).toString());
+ logisticsImportVo.setLogisticsCompany(objects.get(2).toString());
+ logisticsImportVo.setWaybillNo(objects.get(3).toString());
+ logisticsImportVo.setFailReason("未找到发货信息");
+ logisticsImportVos.add(logisticsImportVo);
+ logisticsImportVoLists.add(logisticsImportVo);
+ }else{
+ shopDeliveryInfo = infoList.get(0);
+ shopDeliveryInfo.setOrderNo(orderNo);
+ shopDeliveryInfo.setLogisticsCompanyCode(logisticsCompanyCode);
+ shopDeliveryInfo.setLogisticsCompany(logisticsCompany);
+ shopDeliveryInfo.setWaybillNo(waybillNo);
+ shopDeliveryInfo.setUpdateBy(sysUsers.getSuName());
+ shopDeliveryInfo.setLogisticsStatus(AppConstance.LOGISTICS_STATUS_OF_RECEIVE);
+ shopDeliveryInfo.setDeliveryTime(new Date());
+ shopDeliveryInfoDao.updateByModel(shopDeliveryInfo);
- //发送创建订单的消息
- rabiitMqTemplate.sendMsg(MQTaskRouting.ORDER_OUT_SOTORE+evn, orderNo);
+ //构建需要修改订单信息Map
+ Map<String, Object> modifyMap = new HashMap<>();
+ modifyMap.put("id", shopOrder.getId());
+ modifyMap.put("orderStatus", ShopOrder.ORDER_STATUS_WAIT_RECEIVE);
+ shopOrderDao.updateByMap(modifyMap);
+
+ //发送创建订单的消息
+ rabiitMqTemplate.sendMsg(MQTaskRouting.ORDER_OUT_SOTORE+evn, orderNo);
+ }
}else{
- LogisticsImportVo logisticsImportVo = new LogisticsImportVo();
- logisticsImportVo.setWaybillNo(orderNo);
- logisticsImportVo.setColNum(j);
- logisticsImportVo.setRemark("第"+j+"行导入失败");
- logisticsImportVos.add(logisticsImportVo);
+ if(ObjectUtil.isEmpty(shopOrder)){
+ logisticsImportVo.setOrderNo(objects.get(0).toString());
+ logisticsImportVo.setLogisticsCompanyCode(objects.get(1).toString());
+ logisticsImportVo.setLogisticsCompany(objects.get(2).toString());
+ logisticsImportVo.setWaybillNo(objects.get(3).toString());
+ logisticsImportVo.setFailReason("未找到订单信息");
+ logisticsImportVos.add(logisticsImportVo);
+ logisticsImportVoLists.add(logisticsImportVo);
+ }else if(shopOrder.getOrderStatus() != ShopOrder.ORDER_STATUS_WAIT_SEND ||
+ shopOrder.getOrderStatus() != ShopOrder.ORDER_STATUS_WAIT_RECEIVE ){
+ logisticsImportVo.setOrderNo(objects.get(0).toString());
+ logisticsImportVo.setLogisticsCompanyCode(objects.get(1).toString());
+ logisticsImportVo.setLogisticsCompany(objects.get(2).toString());
+ logisticsImportVo.setWaybillNo(objects.get(3).toString());
+ logisticsImportVo.setFailReason("订单状态不允许发货");
+ logisticsImportVos.add(logisticsImportVo);
+ logisticsImportVoLists.add(logisticsImportVo);
+ }else{
+ logisticsImportVo.setOrderNo(objects.get(0).toString());
+ logisticsImportVo.setLogisticsCompanyCode(objects.get(1).toString());
+ logisticsImportVo.setLogisticsCompany(objects.get(2).toString());
+ logisticsImportVo.setWaybillNo(objects.get(3).toString());
+ logisticsImportVo.setFailReason("导入失败");
+ logisticsImportVos.add(logisticsImportVo);
+ logisticsImportVoLists.add(logisticsImportVo);
+ }
}
}
}
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/vo/LogisticsImportVo.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/vo/LogisticsImportVo.java
index f20f52e..5630c47 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/vo/LogisticsImportVo.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/vo/LogisticsImportVo.java
@@ -7,10 +7,14 @@
@Data
@ApiModel(value = "LogisticsImportVo", description = "信息返回类")
public class LogisticsImportVo {
- @ApiModelProperty(value = "单号")
+ @ApiModelProperty(value = "订单号")
+ private String orderNo;
+ @ApiModelProperty(value = "快递公司编码")
+ private String logisticsCompanyCode;
+ @ApiModelProperty(value = "快递公司名称")
+ private String logisticsCompany;
+ @ApiModelProperty(value = "快递单号")
private String waybillNo;
- @ApiModelProperty(value = "备注")
- private String remark;
- @ApiModelProperty(value = "行数")
- private int colNum;
+ @ApiModelProperty(value = "失败原因")
+ private String failReason;
}
diff --git a/zq-erp/src/main/resources/config/application.properties b/zq-erp/src/main/resources/config/application.properties
index beb4676..9d8a8ef 100644
--- a/zq-erp/src/main/resources/config/application.properties
+++ b/zq-erp/src/main/resources/config/application.properties
@@ -8,13 +8,9 @@
#spring.datasource.password=123456
#spring.datasource.url=jdbc:mysql://120.27.238.55:3306/hive_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8
-#spring.datasource.username=xc_shop
-#spring.datasource.password=xc_shop123!@#
-#spring.datasource.url=jdbc:mysql://124.70.222.34/xc_shop?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8
-
-spring.datasource.username=hive
-spring.datasource.password=hive123!@#
-spring.datasource.url=jdbc:mysql://124.70.222.34/hive_prd?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8
+spring.datasource.username=xc_shop
+spring.datasource.password=xc_shop123!@#
+spring.datasource.url=jdbc:mysql://124.70.222.34/xc_shop?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8
diff --git a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopOrderDao.xml b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopOrderDao.xml
index 50e3463..ba616cb 100644
--- a/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopOrderDao.xml
+++ b/zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopOrderDao.xml
@@ -548,7 +548,7 @@
</select>
<!-- 分页查询 -->
- <select id="selectInPageByQuery" resultMap="ShopOrderMap">
+ <select id="selectInPageByQuery" resultMap="ShopOrderComplexMap">
select
o.*,
s.shop_name
diff --git a/zq-erp/src/main/resources/static/js/function/vip.js b/zq-erp/src/main/resources/static/js/function/vip.js
index 09dfe86..c0fa8b9 100644
--- a/zq-erp/src/main/resources/static/js/function/vip.js
+++ b/zq-erp/src/main/resources/static/js/function/vip.js
@@ -106,7 +106,7 @@
title: "修改预约排班",
maxmin: true,
area: [MUI.SIZE_L, '500px'],
- content: [basePath + '/admin/projService/yypb?pageFlae=1&id=' + id]
+ content: [basePath + '/admin/projService/yypb?pageFlae=2&id=' + id]
}));
}
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/service_all_list.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/service_all_list.html
index 7eeaf03..17397a9 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/service_all_list.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/service_all_list.html
@@ -187,11 +187,13 @@
break;
case '需配料':
html +=btns[3].replace('VALUE',value);
+ html += btns[2].replace('VALUE',value);
break;
case '配料完成':
break;
case '服务完成':
html +=btns[4].replace('VALUE',value);
+ html += btns[2].replace('VALUE',value);
break;
}
html += btns[5].replace('VALUE',value);
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yypb-form-bak.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yypb-form-bak.html
new file mode 100644
index 0000000..9a6be74
--- /dev/null
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yypb-form-bak.html
@@ -0,0 +1,498 @@
+<!DOCTYPE HTML>
+<html xmlns:th="http://www.thymeleaf.org" xmlns:matrix="http://www.w3.org/1999/xhtml">
+<head>
+ <meta charset="utf-8">
+ <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
+ <meta name="renderer" content="webkit|ie-comp|ie-stand">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+ <meta name="viewport"
+ content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
+ <meta http-equiv="Cache-Control" content="no-siteapp"/>
+ <LINK rel="Bookmark" href="../images/favicon.ico">
+ <!-- 本框架基本脚本和样式 -->
+
+ <script type="text/javascript" th:src="@{/js/systools/MBaseVue.js}"></script>
+ <link rel="stylesheet" th:href="@{/plugin/element-ui/index.css}">
+ <link rel="stylesheet" th:href="@{/plugin/bootstrap-3.3.5/css/bootstrap.min.css}">
+ <link th:href="@{/css/styleOne/style.min.css}" rel="stylesheet" type="text/css"/>
+</head>
+<body>
+<div class="ibox-content" id="app" v-cloak>
+ <form class="form-horizontal" id="dataform"
+ onsubmit="javascripr:return false;">
+ <input autocomplete="off" type="hidden" v-model="projService.id">
+
+ <div class="form-group">
+ <label class="col-md-2 control-label"> </label>
+ <div class="col-md-12">
+ <div class="panel panel-primary">
+ <div class="panel-heading">
+ <div class="row">
+ <div class="col-md-6">
+ <h2>客户:{{projService.vipInfo.vipName}}</h2>
+ </div>
+ <div class="col-md-6 text-right">
+ <sapn style="line-height: 30px;">订单编号:{{projService.serviceNo}}</sapn>
+ </div>
+ </div>
+ </div>
+ <div class="panel-body">
+ <div class="form-group">
+ <label class="col-md-1 control-label">预约时间:</label>
+ <div class="col-md-3">
+ <el-date-picker @change="changeYyTime()"
+ v-model="projService.yyTime"
+ type="date"
+ placeholder="选择日期">
+ </el-date-picker>
+ </div>
+ <label class="col-md-1 control-label">服务时长</label>
+ <div class="col-md-3">
+ <!-- <el-input @change="changeYyTime()" v-model="projService.totalTime"></el-input>-->
+ <label class="control-label">{{projService.totalTime}}</label>
+ </div>
+ </div>
+ <div class="form-group">
+
+ <label class="col-md-1 control-label">床位准备时间</label>
+ <div class="col-md-3 ">
+ <el-time-select
+ @change="getFreedBed()"
+ v-model="projService.bedState.startTimeForm"
+ :picker-options="{
+ start: startTime,
+ step: '00:10',
+ end: endTime
+ }"
+ placeholder="选择时间">
+ </el-time-select>
+
+ </div>
+ <label class="col-md-1 control-label">选择床位</label>
+ <div class="col-md-3" style="display: flex;">
+ <el-select style="flex: 5" v-model="projService.bedId" placeholder="请选择床位">
+ <el-option
+ v-for="item in beds"
+ :key="item.id"
+ :label="item.bedName"
+ :value="item.id">
+ </el-option>
+ </el-select>
+ <button style="flex: 1" type="button" class="btn btn-success btn-sm "
+ onclick="selectCwqk()"
+ title="查看床位情况">
+ <i style="font-size: 18px;" class="el-icon-search"></i>
+ </button>
+ </div>
+ </div>
+
+
+ <div class="form-group">
+ <label class="col-md-1 control-label">配料师</label>
+ <div class="col-md-3">
+ <el-select v-model="projService.devisionId" placeholder="请选择">
+ <el-option
+ v-for="item in pls"
+ :key="item.suId"
+ :label="item.suName"
+ :value="item.suId">
+ </el-option>
+ </el-select>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="col-md-1 control-label">服务设置</label>
+ <div class="col-md-11">
+ <table class="table table-bordered">
+ <tr>
+ <th>项目名称</th>
+ <th width="100px">服务时长(分钟)</th>
+ <th>服务时间</th>
+ <th width="300px">美疗师</th>
+ <th style="width: 100px;">提成</th>
+ </tr>
+
+ <tr v-for="(item,index) in projService.serviceItems">
+ <td>{{item.projInfo.name}}</td>
+ <td><el-input @change="changeTimeLength" v-model="item.projInfo.timeLength"></el-input></td>
+
+ <td>
+ <div style="display: flex;">
+ <el-time-select style="flex: 6" @change="getFreedBeautyd(index)"
+ v-model="item.beginTimeForm"
+ :picker-options="{
+ start: startTime,
+ step: '00:10',
+ end: endTime,
+ }"
+ placeholder="选择时间">
+ </el-time-select>
+ <span style="flex: 2;text-align: center;line-height: 30px">至</span>
+ <el-time-select style="flex: 6" @change="getFreedBeautyd(index)"
+ v-model="item.endTimeForm"
+ :picker-options="{
+ start: startTime,
+ step: '00:10',
+ end: endTime,
+ minTime: item.beginTimeForm
+ }"
+ placeholder="选择时间">
+ </el-time-select>
+ </div>
+ </td>
+ <td>
+ <el-select v-model="item.staffId" placeholder="请选择美疗师">
+ <el-option
+ v-for="item in beauty"
+ :key="item.suId"
+ :label="item.suName"
+ :value="item.suId">
+ </el-option>
+ </el-select>
+ </td>
+ <td>
+ <el-input v-model="item.extract"></el-input>
+ </td>
+
+ </tr>
+
+ </table>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="col-md-1 control-label">备 注:</label>
+ <div class="col-md-7">
+ <textarea name="remark" type="text" id="remark"
+ class="form-control" rows="4"
+ v-model="projService.remark"></textarea>
+ </div>
+ </div>
+
+ <div class="form-group ">
+ <div class="col-md-12 text-center">
+ <a href="javascript:;" @click="submit()"
+ class="btn btn-success radius">保存</a>
+ <button @click="closeFram()" class="btn btn-danger radius" type="button">取消</button>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ </div>
+ </div>
+
+ </form>
+</div>
+</div>
+<script type="text/javascript" th:src="@{/js/plugin/jquery-2.1.4.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/jquery.query.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/bootstrap-3.3.5/js/bootstrap.min.js}"></script>
+<script type="text/javascript" th:src="@{/js/systools/AjaxProxyVue.js}"></script>
+<script type="text/javascript" th:src="@{/js/plugin/vue.js}"></script>
+<script type="text/javascript" th:src="@{/plugin/element-ui/index.js}"></script>
+<script type="text/javascript">
+
+ var id = $.query.get("id");
+ var app = new Vue({
+ el: '#app',
+ data: {
+ projService: {
+ bedState: {startTimeForm: ''}
+ },
+ //美疗师分配列表
+ serviceItems: [],
+ //美疗师
+ beauty: [],
+ pls: [],
+ beds: [],
+ startTime:'08:00',
+ endTime:'23:00',
+ },
+ created: function () {
+ this.loadWorkTime();
+ this.loadInfo();
+ },
+
+ mounted: function () {
+
+ },
+
+ methods: {
+
+
+ loadWorkTime:function(){
+ var _this=this;
+ AjaxProxy.requst({
+ app: _this,
+ url: basePath + '/admin/workTime/getWorkTime',
+ callback: function (data) {
+ _this.startTime=data.rows[0];
+ _this.endTime=data.rows[1];
+ }
+ });
+ },
+
+ loadInfo: function () {
+
+ console.log('加载服务器数据');
+ var _this = this;
+
+
+
+
+ AjaxProxy.requst({
+ app: _this,
+ async: false,
+ url: basePath + '/admin/projService/findProjServiceInfo?id=' + id,
+ callback: function (data) {
+
+
+ //处理空对象和时间
+ let projService = data.mapInfo.projService;
+
+ let serviceItems = projService.serviceItems;
+
+ //转换床位时间格式
+ if (!projService.bedState) {
+ projService.bedState = {}
+ projService.bedState.startTimeForm= MTools.formatDate(new Date(), 'hh:mm');
+ } else {
+ projService.bedState.startTimeForm = MTools.formatDate(projService.bedState.startTime, 'hh:mm')
+ }
+
+ _this.projService = projService;
+
+ //转换时间格式,服务加载的时间格式要做处理,截取时分展示
+ for (let i = 0; i < serviceItems.length; i++) {
+ let beStates = serviceItems[i];
+ if(beStates.beginTime){
+ beStates.beginTimeForm = MTools.formatDate(beStates.beginTime, 'hh:mm');
+ beStates.endTimeForm = MTools.formatDate(beStates.endTime, 'hh:mm');
+ }else{
+ beStates.beginTimeForm = MTools.formatDate(new Date(), 'hh:mm');
+ var today=new Date();
+ today.setMinutes(today.getMinutes()+beStates.projInfo.timeLength)
+ beStates.endTimeForm= MTools.formatDate(today, 'hh:mm');
+ }
+ _this.getFreedBeautyd(i);
+
+
+ }
+
+ //加载床位
+ _this.getFreedBed();
+
+ //获取配料师
+ AjaxProxy.requst({
+ app: _this,
+ url: basePath + '/admin/getShopStaffByRoleName?roleName=配料师',
+ callback: function (data) {
+ _this.pls = data.rows;
+ }
+ });
+
+
+ }
+ });
+
+
+ }
+ ,
+ closeFram: function () {
+ parent.layer.close(parent.layer.getFrameIndex(window.name));
+ },
+
+ submit: function () {
+ console.log("提交");
+ let _this = this;
+ let projService = _this.projService;
+
+ //床位时间
+ let dateStr = MTools.formatDate(projService.yyTime, 'yyyy/MM/dd') + " " + projService.bedState.startTimeForm + ":00";
+ let startTime = new Date(dateStr);
+
+ let serviceItems = [];
+ for (let i = 0; i < projService.serviceItems.length; i++) {
+ let beStates = projService.serviceItems[i];
+ let beginTimeStr = MTools.formatDate(_this.projService.yyTime, 'yyyy/MM/dd') + " " + beStates.beginTimeForm + ":00";
+ let beginTime = new Date(beginTimeStr);
+ let endTimeStr = MTools.formatDate(_this.projService.yyTime, 'yyyy/MM/dd') + " " + beStates.endTimeForm + ":00";
+ let endTime = new Date(endTimeStr);
+
+ serviceItems.push({
+ beginTime: beginTime,
+ endTime: endTime,
+ staffId: beStates.staffId,
+ extract: beStates.extract,
+ excTime : beStates.projInfo.timeLength,
+ id: beStates.id,
+ });
+
+ }
+
+
+ var params = {
+ id: projService.id,
+ totalTime: projService.totalTime,
+ remark: projService.remark,
+ bedId: projService.bedId,
+ devisionId: projService.devisionId,
+ yyTime: projService.yyTime,
+ serviceItems: serviceItems,
+ //床位时间
+ bedState: {
+ startTime: startTime,
+ }
+ }
+
+
+ if (_this.validate(params)) {
+ AjaxProxy.requst({
+ app: _this,
+ data: params,
+ url: basePath + '/admin/projService/servicePaiBan',
+ callback: function (data) {
+ _this.$message({
+ message: data.info,
+ type: 'success',
+ onClose: function () {
+ _this.closeFram();
+ }
+ });
+ if (parent.myGrid) {
+ parent.myGrid.serchData();
+ }
+
+ if (parent.app) {
+ parent.app.serviceOrderQuery();
+ }
+ }
+ });
+ }
+ }
+ ,
+ validate: function (params) {
+ if (!params.bedId) {
+ this.$message({
+ message: '床位不能为空',
+ type: 'error'
+ });
+ return false;
+ }
+ if (!params.totalTime) {
+ this.$message({
+ message: '请填写服务时长',
+ type: 'error'
+ });
+ return false;
+ }
+ if (!params.yyTime) {
+ this.$message({
+ message: '请填写预约时间',
+ type: 'error'
+ });
+ return false;
+ }
+ for (let i = 0; i < params.serviceItems.length; i++) {
+ let b = params.serviceItems[i];
+ if (!b.staffId) {
+ this.$message({
+ message: '请选择第' + (i + 1) + '位美疗师',
+ type: 'error'
+ });
+ return false;
+ }
+ }
+ return true;
+ }
+ ,
+
+ //触发预约时间修改
+ changeYyTime: function () {
+ this.getFreedBed();
+ this.getFreedBeautyd();
+ }
+ ,
+ getFreedBed: function () {
+ console.log('获取空闲床位');
+ let _this = this;
+ let dateStr = MTools.formatDate(_this.projService.yyTime, 'yyyy/MM/dd') + " " + _this.projService.bedState.startTimeForm + ":00";
+ let startTime = new Date(dateStr);
+ if (!_this.projService.bedState.startTimeForm || !_this.projService.totalTime) {
+ return;
+ }
+ AjaxProxy.requst({
+ app: _this,
+ data: {
+ startTime: startTime,
+ totalTime: _this.projService.totalTime,
+ id: _this.projService.id
+ },
+ url: basePath + '/admin/bedInfo/showFreedBed',
+ callback: function (data) {
+ _this.beds = data.rows;
+ }
+ });
+ }
+ ,
+ getFreedBeautyd: function (index) {
+ console.log("获取美疗师");
+ let _this = this;
+ let projService = _this.projService;
+ let beStates = projService.serviceItems[index];
+
+ if (beStates == null || MTools.isBlank(beStates.beginTimeForm) || MTools.isBlank(beStates.endTimeForm ) ){
+ return;
+ }
+ let beginTimeStr = MTools.formatDate(_this.projService.yyTime, 'yyyy/MM/dd') + " " + beStates.beginTimeForm + ":00";
+ let beginTime = new Date(beginTimeStr);
+ let endTimeStr = MTools.formatDate(_this.projService.yyTime, 'yyyy/MM/dd') + " " + beStates.endTimeForm + ":00";
+ let endTime = new Date(endTimeStr);
+
+ AjaxProxy.requst({
+ app: _this,
+ data: {
+ beginTime: beginTime,
+ endTime: endTime,
+ servicesId: _this.projService.id
+ },
+ url: basePath + '/admin/beautiWork/getPaiBanBeauticianList',
+ callback: function (data) {
+
+ if (data.rows.length > 0) {
+ _this.beauty = data.rows;
+ }
+
+ }
+ });
+
+
+ },
+ changeTimeLength:function() {
+ let _this = this;
+
+ var totalTime = 0;
+ _this.projService.serviceItems.forEach(item => {
+ totalTime += parseInt(item.projInfo.timeLength);
+ });
+ _this.projService.totalTime = totalTime;
+ _this.changeYyTime();
+ }
+
+ },
+ filters:
+ {
+ format: function (value, patten) {
+ if (!value) return '';
+ return MTools.formatDate(value, patten)
+ }
+ ,
+ }
+ ,
+
+ })
+
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yypb-form.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yypb-form.html
index dc6119c..ad8fde8 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yypb-form.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yypb-form.html
@@ -19,7 +19,7 @@
<body>
<div class="ibox-content" id="app" v-cloak>
<form class="form-horizontal" id="dataform"
- onsubmit="javascripr:return false;">
+ onsubmit="javascript:return false;">
<input autocomplete="off" type="hidden" v-model="projService.id">
<div class="form-group">
@@ -263,7 +263,7 @@
//处理空对象和时间
let projService = data.mapInfo.projService;
-
+ console.log(projService);
let serviceItems = projService.serviceItems;
//转换床位时间格式
@@ -347,6 +347,7 @@
var params = {
id: projService.id,
+ state : projService.state,
totalTime: projService.totalTime,
remark: projService.remark,
bedId: projService.bedId,
diff --git a/zq-erp/src/main/resources/templates/views/admin/shop/logisticsImport-form.html b/zq-erp/src/main/resources/templates/views/admin/shop/logisticsImport-form.html
index fc68800..a1ea86c 100644
--- a/zq-erp/src/main/resources/templates/views/admin/shop/logisticsImport-form.html
+++ b/zq-erp/src/main/resources/templates/views/admin/shop/logisticsImport-form.html
@@ -105,6 +105,8 @@
title: '导入快递单,部分失败',
content: data.info
});
+ var url = basePath + "/admin/shopOrder/exportLogisticsImportExcel";
+ window.open(url);
parent.myGrid.serchData();
}
$("#showFileName").val('');
diff --git a/zq-erp/src/main/resources/templates/views/admin/shop/shopOrder-list.html b/zq-erp/src/main/resources/templates/views/admin/shop/shopOrder-list.html
index 7d02c7a..6fae16b 100644
--- a/zq-erp/src/main/resources/templates/views/admin/shop/shopOrder-list.html
+++ b/zq-erp/src/main/resources/templates/views/admin/shop/shopOrder-list.html
@@ -130,10 +130,11 @@
<th data-checkbox="true"></th>
<th data-formatter="MGrid.indexfn" data-align="center" data-width="30px">序号</th>
<th data-align="center" data-width="195px" data-field="id" data-formatter="buidOperate">操作</th>
- <th data-field="userName">客户姓名</th>
- <th data-field="userTel">客户电话</th>
- <th data-field="storeName">店铺名称</th>
+ <th data-field="deliveryInfo.receiveAddress" data-formatter="buildLogistics">发货信息</th>
+ <!--<th data-field="userName">客户姓名</th>-->
+ <!--<th data-field="userTel">客户电话</th>-->
<th data-field="orderStatus" data-formatter="buildOrderStatus">订单状态</th>
+ <th data-field="deliveryInfo.waybillNo" data-formatter="buildDelivery">物流信息</th>
<th data-field="orderTime" data-formatter="MGrid.getTime">下单时间</th>
<th data-field="details" data-formatter="buildDetails">购买商品</th>
<!--<th data-field="purchaseQuantity">购买件数</th>-->
@@ -142,6 +143,7 @@
<th data-field="shippingMethod" data-formatter="buildShippingMethod" >配送方式</th>
<!--<th data-field="orderType" data-formatter="orderTypeFormatter">订单类型</th>-->
<th data-field="orderNo">订单编号</th>
+ <th data-field="storeName">店铺名称</th>
<!--<th data-field="applyStatus" data-formatter="applyStatusFormatter">是否已提现</th>-->
</tr>
</thead>
@@ -225,6 +227,17 @@
return details;
}
+ // 发货信息
+ function buildLogistics(value, row, index) {
+ return (row.userName==null?"":row.userName)+" <br/>"+ (row.userTel==null?"":row.userTel) +" <br/>"+value ;
+ }
+ // 物流信息
+ function buildDelivery(value, row, index) {
+ return (row.deliveryInfo.logisticsCompanyCode==null?"":"快递编码:"+row.deliveryInfo.logisticsCompanyCode)
+ +" <br/>"+ (row.deliveryInfo.logisticsCompany==null?"":"快递名称:"+row.deliveryInfo.logisticsCompany)
+ +" <br/>"+(value==null?"":"快递单号:"+value) ;
+ }
+
function buildOrderStatus(value, row, index) {
if (value == 1) {
@@ -269,11 +282,16 @@
+ '操作 <span class="caret"></span>' + '</button>'
+ '<ul class="dropdown-menu" role="menu">'
+ btns[0].replace('VALUE', value)
+ if (row.deliveryInfo.waybillNo != null && typeof row.deliveryInfo.waybillNo != 'undefined' && row.deliveryInfo.waybillNo != '') {
+ html += btns[3].replace('orderId',row.id).replace('waybillNo',row.deliveryInfo.waybillNo);
+ }
if (row.orderStatus == 2) {
- html += btns[1].replace('VALUE', value)
+ html += btns[1].replace('VALUE', value);
+ html += btns[4].replace('orderId',row.id);
}
if (row.orderStatus == 3) {
- html += btns[2].replace('VALUE', value)
+ html += btns[2].replace('VALUE', value);
+ html += btns[4].replace('orderId',row.id);
}
html += '</ul>' + '</div>';
return html;
@@ -290,6 +308,40 @@
content: [basePath + '/admin/shopOrder/editForm?id=' + id]
})
)
+ }
+
+ /**
+ * 查看物流信息
+ * @param id
+ */
+ function showLogisticsInfo(orderId,waybillNo){
+ if(waybillNo == '' || waybillNo == null){
+ layer.msg("订单还未发货,暂无物流信息", {
+ icon : 2,
+ time : 2000
+ });
+ return false;
+ }
+ layer.open({
+ type : 2,
+ title : "查看物流信息",
+ area : [ MUI.SIZE_L, '500px' ],
+ maxmin : true,
+ content : [ basePath+'/admin/redirect/shop/shopLogisticsInfo-list?orderId=' + orderId]
+ });
+ }
+ /**
+ * 编辑物流信息
+ * @param id
+ */
+ function editDeliveryInfo(orderId){
+ layer.open({
+ type : 2,
+ title : "编辑物流信息",
+ area : [ MUI.SIZE_L, '500px' ],
+ maxmin : true,
+ content : [ basePath + '/admin/shopDeliveryInfo/editDeliveryInfoForm?orderId=' + orderId]
+ });
}
//修改订单为发货
@@ -366,6 +418,8 @@
btns[0] = '<li><a href="javascript:void(0)" onClick="openEdit(\'VALUE\')" title="编辑">编辑</a></li>'
btns[1] = '<li><a href="javascript:void(0)" onClick="openSendPackage(\'VALUE\')" title="开始发货">开始发货</a></li>'
btns[2] = '<li><a href="javascript:void(0)" onClick="openSendPackageOver(\'VALUE\')" title="配送完成">配送完成</a></li>'
+btns[3] = '<li><a href="javascript:void(0)" onclick="showLogisticsInfo(\'orderId\',\'waybillNo\')" title="查看物流">查看物流</a></li>'
+btns[4] = '<li><a href="javascript:void(0)" onclick="editDeliveryInfo(\'orderId\')" title="编辑快递">编辑快递</a></li>'
</script>
--
Gitblit v1.9.1