暂停记录优化,改成弹窗,证件验证方法优化
This commit is contained in:
parent
0857197c65
commit
c705665b45
@ -1,6 +1,5 @@
|
|||||||
package com.stdiet.web.controller.custom;
|
package com.stdiet.web.controller.custom;
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -77,6 +76,10 @@ public class SysOrderPauseController extends BaseController
|
|||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody SysOrderPause sysOrderPause)
|
public AjaxResult add(@RequestBody SysOrderPause sysOrderPause)
|
||||||
{
|
{
|
||||||
|
int count = sysOrderPauseService.getCountByOrderIdAndPauseDate(sysOrderPause);
|
||||||
|
if(count > 0){
|
||||||
|
return AjaxResult.error("时间范围重叠,请检查时间");
|
||||||
|
}
|
||||||
return toAjax(sysOrderPauseService.insertSysOrderPause(sysOrderPause));
|
return toAjax(sysOrderPauseService.insertSysOrderPause(sysOrderPause));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,6 +91,10 @@ public class SysOrderPauseController extends BaseController
|
|||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody SysOrderPause sysOrderPause)
|
public AjaxResult edit(@RequestBody SysOrderPause sysOrderPause)
|
||||||
{
|
{
|
||||||
|
int count = sysOrderPauseService.getCountByOrderIdAndPauseDate(sysOrderPause);
|
||||||
|
if(count > 0){
|
||||||
|
return AjaxResult.error("时间范围重叠,请检查时间");
|
||||||
|
}
|
||||||
return toAjax(sysOrderPauseService.updateSysOrderPause(sysOrderPause));
|
return toAjax(sysOrderPauseService.updateSysOrderPause(sysOrderPause));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@ package com.stdiet.custom.mapper;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.stdiet.custom.domain.SysOrderPause;
|
import com.stdiet.custom.domain.SysOrderPause;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单服务暂停Mapper接口
|
* 订单服务暂停Mapper接口
|
||||||
@ -58,4 +59,11 @@ public interface SysOrderPauseMapper
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteSysOrderPauseByIds(Long[] ids);
|
public int deleteSysOrderPauseByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据订单ID、时间范围查询数量
|
||||||
|
* @param sysOrderPause
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int getCountByOrderIdAndPauseDate(SysOrderPause sysOrderPause);
|
||||||
}
|
}
|
@ -58,4 +58,11 @@ public interface ISysOrderPauseService
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteSysOrderPauseById(Long id);
|
public int deleteSysOrderPauseById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据订单ID、时间范围查询数量
|
||||||
|
* @param sysOrderPause
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int getCountByOrderIdAndPauseDate(SysOrderPause sysOrderPause);
|
||||||
}
|
}
|
@ -67,12 +67,9 @@ public class SysCommissionDayServiceImpl implements ISysCommissionDayService {
|
|||||||
SysOrderPause sysOrderPause = new SysOrderPause();
|
SysOrderPause sysOrderPause = new SysOrderPause();
|
||||||
sysOrderPause.setOrderId(orderId);
|
sysOrderPause.setOrderId(orderId);
|
||||||
List<SysOrderPause> pausesList = sysOrderPauseMapper.selectSysOrderPauseList(sysOrderPause);
|
List<SysOrderPause> pausesList = sysOrderPauseMapper.selectSysOrderPauseList(sysOrderPause);
|
||||||
//每年每月暂停天数,key为年份加月份,如:2021年1月=20211
|
sysOrder.setOrderPauseList(pausesList);
|
||||||
Map<String, Integer> everyYearMonthPauseDay = getEveryYearMonthPauseDay(pausesList);
|
SysOrderCommisionDayDetail sysOrderCommisionDayDetail = statisticsOrderMessage(sysOrder);
|
||||||
//该笔订单暂停总天数
|
return sysOrderCommisionDayDetail.getServerEndDate();
|
||||||
int pauseTotalDay = getTotalByMap(everyYearMonthPauseDay);
|
|
||||||
|
|
||||||
return getServerEndDate(DateUtils.dateToLocalDate(sysOrder.getStartTime()), sysOrder.getServeTimeId().intValue()/30, sysOrder.getGiveServeDay(), pauseTotalDay);
|
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -245,14 +242,16 @@ public class SysCommissionDayServiceImpl implements ISysCommissionDayService {
|
|||||||
int serverMonth = sysOrder.getServeTimeId().intValue()/30;
|
int serverMonth = sysOrder.getServeTimeId().intValue()/30;
|
||||||
//赠送时长
|
//赠送时长
|
||||||
int giveDay = sysOrder.getGiveServeDay().intValue();
|
int giveDay = sysOrder.getGiveServeDay().intValue();
|
||||||
|
//服务到期时间(加赠送时间,不加暂停时间)
|
||||||
|
LocalDate serverEndDate = serverStartDate.plusMonths(serverMonth).plusDays(giveDay);
|
||||||
//订单金额
|
//订单金额
|
||||||
BigDecimal orderAmount = sysOrder.getAmount();
|
BigDecimal orderAmount = sysOrder.getAmount();
|
||||||
//每年每月暂停天数,key为年份加月份,如:2021年1月=20211
|
//每年每月暂停天数,key为年份加月份,如:2021年1月=20211
|
||||||
Map<String, Integer> everyYearMonthPauseDay = getEveryYearMonthPauseDay(sysOrder.getOrderPauseList());
|
Map<String, Integer> everyYearMonthPauseDay = getEveryYearMonthPauseDay(sysOrder.getOrderPauseList(), serverStartDate, serverEndDate);
|
||||||
//该笔订单暂停总天数
|
//该笔订单暂停总天数
|
||||||
int pauseTotalDay = getTotalByMap(everyYearMonthPauseDay);
|
int pauseTotalDay = getTotalByMap(everyYearMonthPauseDay);
|
||||||
//根据开始时间、服务月数、赠送天数、暂停天数算出该笔订单服务到期时间
|
//服务到期时间加上暂停时间
|
||||||
LocalDate serverEndDate = getServerEndDate(serverStartDate, serverMonth, giveDay, pauseTotalDay);
|
serverEndDate = serverEndDate.plusDays(pauseTotalDay);
|
||||||
//计算每年每月服务天数
|
//计算每年每月服务天数
|
||||||
Map<String, Integer> everyYearMonthServerDay = getEveryYearMonthDayCount(serverStartDate, serverEndDate, everyYearMonthPauseDay);
|
Map<String, Integer> everyYearMonthServerDay = getEveryYearMonthDayCount(serverStartDate, serverEndDate, everyYearMonthPauseDay);
|
||||||
//服务总天数
|
//服务总天数
|
||||||
@ -282,25 +281,45 @@ public class SysCommissionDayServiceImpl implements ISysCommissionDayService {
|
|||||||
* 获取每年每月暂停天数
|
* 获取每年每月暂停天数
|
||||||
* @Param list 暂停记录集合
|
* @Param list 暂停记录集合
|
||||||
* */
|
* */
|
||||||
public Map<String, Integer> getEveryYearMonthPauseDay(List<SysOrderPause> list){
|
public Map<String, Integer> getEveryYearMonthPauseDay(List<SysOrderPause> list, LocalDate serverStartDate, LocalDate serverEndDate){
|
||||||
Map<String, Integer> pauseMap = new TreeMap<>(new MyComparator());
|
Map<String, Integer> pauseMap = new TreeMap<>(new MyComparator());
|
||||||
|
if(list == null){
|
||||||
|
return pauseMap;
|
||||||
|
}
|
||||||
for (SysOrderPause sysOrderPause : list) {
|
for (SysOrderPause sysOrderPause : list) {
|
||||||
if(sysOrderPause.getPauseStartDate() == null || sysOrderPause.getPauseEndDate() == null){
|
if(sysOrderPause.getPauseStartDate() == null || sysOrderPause.getPauseEndDate() == null){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
LocalDate pauseStartDate = DateUtils.dateToLocalDate(sysOrderPause.getPauseStartDate());
|
LocalDate pauseStartDate = DateUtils.dateToLocalDate(sysOrderPause.getPauseStartDate());
|
||||||
LocalDate pauseEndDate = DateUtils.dateToLocalDate(sysOrderPause.getPauseEndDate());
|
LocalDate pauseEndDate = DateUtils.dateToLocalDate(sysOrderPause.getPauseEndDate());
|
||||||
|
//判断暂停时间段是否在服务周期范围内
|
||||||
|
if(ChronoUnit.DAYS.between(pauseEndDate, serverStartDate) > 0 || ChronoUnit.DAYS.between(serverEndDate, pauseStartDate) > 0){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if(ChronoUnit.DAYS.between(pauseStartDate, serverStartDate) > 0){
|
||||||
|
pauseStartDate = serverStartDate;
|
||||||
|
}
|
||||||
|
if(ChronoUnit.DAYS.between(serverEndDate, pauseEndDate) > 0){
|
||||||
|
pauseEndDate = serverEndDate;
|
||||||
|
}
|
||||||
//根据暂停记录获取该条记录在每年每月的暂停天数
|
//根据暂停记录获取该条记录在每年每月的暂停天数
|
||||||
Map<String, Integer> orderYearMonthPauseDay = getEveryYearMonthDayCount(pauseStartDate, pauseEndDate, null);
|
Map<String, Integer> orderYearMonthPauseDay = getEveryYearMonthDayCount(pauseStartDate, pauseEndDate, null);
|
||||||
|
int totalDay = 0;
|
||||||
//每条暂停记录的暂停天数进行汇总
|
//每条暂停记录的暂停天数进行汇总
|
||||||
for (String key : orderYearMonthPauseDay.keySet()) {
|
for (String key : orderYearMonthPauseDay.keySet()) {
|
||||||
|
totalDay += orderYearMonthPauseDay.get(key).intValue();
|
||||||
if(pauseMap.containsKey(key)){
|
if(pauseMap.containsKey(key)){
|
||||||
pauseMap.put(key, pauseMap.get(key) + orderYearMonthPauseDay.get(key));
|
pauseMap.put(key, pauseMap.get(key) + orderYearMonthPauseDay.get(key));
|
||||||
}else{
|
}else{
|
||||||
pauseMap.put(key, orderYearMonthPauseDay.get(key));
|
pauseMap.put(key, orderYearMonthPauseDay.get(key));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//服务到期时间刷新
|
||||||
|
serverEndDate = serverEndDate.plusDays(totalDay);
|
||||||
}
|
}
|
||||||
|
/*for(String key : pauseMap.keySet()){
|
||||||
|
System.out.println(key+":"+pauseMap.get(key).intValue());
|
||||||
|
}*/
|
||||||
return pauseMap;
|
return pauseMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -422,5 +441,7 @@ public class SysCommissionDayServiceImpl implements ISysCommissionDayService {
|
|||||||
System.out.println(localDate.getDayOfMonth());
|
System.out.println(localDate.getDayOfMonth());
|
||||||
System.out.println(localDate.getDayOfWeek());
|
System.out.println(localDate.getDayOfWeek());
|
||||||
System.out.println(localDate.getDayOfYear());
|
System.out.println(localDate.getDayOfYear());
|
||||||
|
|
||||||
|
System.out.println(ChronoUnit.DAYS.between(LocalDate.of(2021, 1,14), LocalDate.now()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
package com.stdiet.custom.service.impl;
|
package com.stdiet.custom.service.impl;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.stdiet.common.utils.DateUtils;
|
import com.stdiet.common.utils.DateUtils;
|
||||||
|
import com.stdiet.custom.service.ISysCommissionDayService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.stdiet.custom.mapper.SysOrderPauseMapper;
|
import com.stdiet.custom.mapper.SysOrderPauseMapper;
|
||||||
@ -20,6 +23,9 @@ public class SysOrderPauseServiceImpl implements ISysOrderPauseService
|
|||||||
@Autowired
|
@Autowired
|
||||||
private SysOrderPauseMapper sysOrderPauseMapper;
|
private SysOrderPauseMapper sysOrderPauseMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISysCommissionDayService sysCommissionDayService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询订单服务暂停
|
* 查询订单服务暂停
|
||||||
*
|
*
|
||||||
@ -93,4 +99,13 @@ public class SysOrderPauseServiceImpl implements ISysOrderPauseService
|
|||||||
{
|
{
|
||||||
return sysOrderPauseMapper.deleteSysOrderPauseById(id);
|
return sysOrderPauseMapper.deleteSysOrderPauseById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据订单ID、时间范围查询数量
|
||||||
|
* @param sysOrderPause
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public int getCountByOrderIdAndPauseDate(SysOrderPause sysOrderPause){
|
||||||
|
return sysOrderPauseMapper.getCountByOrderIdAndPauseDate(sysOrderPause);
|
||||||
|
}
|
||||||
}
|
}
|
@ -18,6 +18,10 @@
|
|||||||
<result property="delFlag" column="del_flag" />
|
<result property="delFlag" column="del_flag" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="baseSelectField">
|
||||||
|
id, order_id, pause_start_date, pause_end_date, reason, remarks, create_time, create_by, update_time, update_by, del_flag
|
||||||
|
</sql>
|
||||||
|
|
||||||
<sql id="selectSysOrderPauseVo">
|
<sql id="selectSysOrderPauseVo">
|
||||||
select id, order_id, pause_start_date, pause_end_date, reason, remarks, create_time, create_by, update_time, update_by, del_flag from sys_order_pause sop
|
select id, order_id, pause_start_date, pause_end_date, reason, remarks, create_time, create_by, update_time, update_by, del_flag from sys_order_pause sop
|
||||||
</sql>
|
</sql>
|
||||||
@ -97,4 +101,15 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<!-- 根据订单ID、时间范围查询数量 -->
|
||||||
|
<select id="getCountByOrderIdAndPauseDate" parameterType="SysOrderPause" resultType="int">
|
||||||
|
select count(id) from sys_order_pause where del_flag = 0 and order_id = #{orderId}
|
||||||
|
AND (#{pauseStartDate} >= pause_start_date AND pause_end_date >= #{pauseStartDate}
|
||||||
|
OR #{pauseEndDate} >= pause_start_date AND pause_end_date >= #{pauseEndDate})
|
||||||
|
<if test="id != null">
|
||||||
|
and id <![CDATA[ <> ]]> #{id}
|
||||||
|
</if>
|
||||||
|
order by id desc
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
@ -272,11 +272,15 @@ export function validatorIDCard(idcode, type) {
|
|||||||
return {code: 1, msg: '校验通过'};
|
return {code: 1, msg: '校验通过'};
|
||||||
}
|
}
|
||||||
}else if(type === 4){
|
}else if(type === 4){
|
||||||
if(idcode != null && idcode != undefined && idcode.trim() != ""){
|
// 护照
|
||||||
//暂时先放开
|
// 规则: 14/15开头 + 7位数字, G + 8位数字, P + 7位数字, S/D + 7或8位数字,等
|
||||||
return {code: 1, msg: '校验通过'};
|
// 样本: 141234567, G12345678, P1234567
|
||||||
}
|
var reg = /^([a-zA-z]|[0-9]){5,17}$/;
|
||||||
return {code: -1, msg: '护照号格式不正确'};
|
if (reg.test(idcode) === false) {
|
||||||
|
return {code: -1, msg: '护照号不合规'};
|
||||||
|
} else {
|
||||||
|
return {code: 1, msg: '校验通过'};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (type === 5) {
|
else if (type === 5) {
|
||||||
// 军官证
|
// 军官证
|
||||||
@ -291,3 +295,7 @@ export function validatorIDCard(idcode, type) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function isPassPortCard(card) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -74,16 +74,16 @@
|
|||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="customerList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="customerList" stripe @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<!--<el-table-column label="序号" align="center" prop="id" />-->
|
<!--<el-table-column label="序号" align="center" prop="id" />-->
|
||||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
<el-table-column label="创建时间" align="center" prop="createTime" width="180" fixed="left">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="姓名" align="center" prop="name" width="120"/>
|
<el-table-column label="姓名" align="center" prop="name" width="120" fixed="left"/>
|
||||||
<el-table-column label="手机号" align="center" prop="phone" width="120"/>
|
<el-table-column label="手机号" align="center" prop="phone" width="120" fixed="left"/>
|
||||||
<el-table-column label="性别" align="center" prop="sign.sex" width="100">
|
<el-table-column label="性别" align="center" prop="sign.sex" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{scope.row.sign.sex == 0 ? `男` : '女'}}
|
{{scope.row.sign.sex == 0 ? `男` : '女'}}
|
||||||
@ -218,7 +218,7 @@
|
|||||||
<el-table-column label="售后营养师" align="center" prop="afterDietitian" />
|
<el-table-column label="售后营养师" align="center" prop="afterDietitian" />
|
||||||
<el-table-column label="销售人员" align="center" prop="salesman" />
|
<el-table-column label="销售人员" align="center" prop="salesman" />
|
||||||
<el-table-column label="负责人" align="center" prop="chargePerson" />-->
|
<el-table-column label="负责人" align="center" prop="chargePerson" />-->
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120" fixed="right">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
|
@ -255,6 +255,11 @@
|
|||||||
<span>{{ parseTime(scope.row.becomeFanTime, '{y}-{m}-{d}') }}</span>
|
<span>{{ parseTime(scope.row.becomeFanTime, '{y}-{m}-{d}') }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="开始时间" align="center" prop="startTime" width="120">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.startTime, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="备注" align="center" prop="remark" width="120"/>
|
<el-table-column label="备注" align="center" prop="remark" width="120"/>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="300" fixed="right">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="300" fixed="right">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -297,6 +302,15 @@
|
|||||||
<span style="margin-right: 12px;">总计:{{toThousands(this.totalAmount)}} 元</span>
|
<span style="margin-right: 12px;">总计:{{toThousands(this.totalAmount)}} 元</span>
|
||||||
</pagination>
|
</pagination>
|
||||||
|
|
||||||
|
<!-- 暂停记录管理 -->
|
||||||
|
<el-dialog :title="pauseTitle" v-if="openPause" :visible.sync="openPause" width="900px" append-to-body>
|
||||||
|
<span style="color:#E6A23C;font-family:PingFang SC">
|
||||||
|
注意事项:
|
||||||
|
<br/>1、日期包含当天,如:2021-01-01到2021-01-07,总共暂停七天,2021-01-08继续服务
|
||||||
|
<br/>2、每条暂停记录的时间范围不能重叠</span>
|
||||||
|
<orderPause v-bind:orderPauseId="orderPauseId"></orderPause>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 添加或修改销售订单对话框 -->
|
<!-- 添加或修改销售订单对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="720px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="720px" append-to-body>
|
||||||
<el-row :gutter="15">
|
<el-row :gutter="15">
|
||||||
@ -554,6 +568,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import {addOrder, delOrder, exportOrder, getOptions, getOrder, listOrder, updateOrder} from "@/api/custom/order";
|
import {addOrder, delOrder, exportOrder, getOptions, getOrder, listOrder, updateOrder} from "@/api/custom/order";
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
|
import orderPause from "./orderPause";
|
||||||
|
|
||||||
const beginTime = dayjs().startOf('month').format('YYYY-MM-DD');
|
const beginTime = dayjs().startOf('month').format('YYYY-MM-DD');
|
||||||
const endTime = dayjs().format('YYYY-MM-DD');
|
const endTime = dayjs().format('YYYY-MM-DD');
|
||||||
@ -581,6 +596,10 @@
|
|||||||
title: "",
|
title: "",
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
|
// 是否显示暂停记录弹窗
|
||||||
|
openPause: false,
|
||||||
|
pauseTitle: "暂停记录",
|
||||||
|
orderPauseId: null,
|
||||||
//
|
//
|
||||||
totalAmount: 0,
|
totalAmount: 0,
|
||||||
//
|
//
|
||||||
@ -716,6 +735,9 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
components: {
|
||||||
|
orderPause
|
||||||
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
getOptions().then(response => {
|
getOptions().then(response => {
|
||||||
@ -958,7 +980,10 @@
|
|||||||
},
|
},
|
||||||
orderPauseManage(order) {
|
orderPauseManage(order) {
|
||||||
console.log(order.orderId);
|
console.log(order.orderId);
|
||||||
this.$router.push({ name: 'orderPause', params: { 'orderId': order.orderId }})
|
this.pauseTitle = order.customer;
|
||||||
|
this.orderPauseId = order.orderId;
|
||||||
|
this.openPause = true;
|
||||||
|
//this.$router.push({ name: 'orderPause', params: { 'orderId': order.orderId }})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -94,18 +94,28 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="客户姓名" align="center" prop="customer" />-->
|
<el-table-column label="客户姓名" align="center" prop="customer" />-->
|
||||||
<el-table-column label="暂停开始日期" align="center" prop="pauseStartDate" width="180">
|
<el-table-column label="暂停开始日期" align="center" prop="pauseStartDate" width="120">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.pauseStartDate, '{y}-{m}-{d}') }}</span>
|
<span>{{ parseTime(scope.row.pauseStartDate, '{y}-{m}-{d}') }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="暂停结束日期" align="center" prop="pauseEndDate" width="180">
|
<el-table-column label="暂停结束日期" align="center" prop="pauseEndDate" width="120">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.pauseEndDate, '{y}-{m}-{d}') }}</span>
|
<span>{{ parseTime(scope.row.pauseEndDate, '{y}-{m}-{d}') }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="暂停理由" align="center" prop="reason" />
|
<el-table-column label="暂停理由" align="center" prop="reason">
|
||||||
<el-table-column label="备注" align="center" prop="remarks" />
|
<template slot-scope="scope">
|
||||||
|
<el-button v-show="scope.row.reason != null && scope.row.reason.length > 10" type="text" @click="openFormDialog('暂停理由', scope.row.reason)">点击查看</el-button>
|
||||||
|
<span v-show="scope.row.reason == null || scope.row.reason.length <= 10">{{scope.row.reason}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="备注" align="center" prop="remarks">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button v-show="scope.row.remarks != null && scope.row.remarks.length > 10" type="text" @click="openFormDialog('备注', scope.row.remarks)">点击查看</el-button>
|
||||||
|
<span v-show="scope.row.remarks == null || scope.row.remarks.length <= 10">{{scope.row.remarks}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||||
@ -136,9 +146,18 @@
|
|||||||
:total="total"
|
:total="total"
|
||||||
:page.sync="queryParams.pageNum"
|
:page.sync="queryParams.pageNum"
|
||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
|
:page-sizes="[5,10]"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<el-dialog :title="formDialog.title" :visible.sync="formDialog.show" width="30%" append-to-body center>
|
||||||
|
<span>{{formDialog.content}}</span>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="formDialog.show = false">取 消</el-button>
|
||||||
|
<!--<el-button type="primary" @click="experience_dialog = false">确 定</el-button>-->
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 添加或修改订单服务暂停对话框 -->
|
<!-- 添加或修改订单服务暂停对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
@ -224,7 +243,7 @@
|
|||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 5,
|
||||||
orderId: null,
|
orderId: null,
|
||||||
createDate: null,
|
createDate: null,
|
||||||
pauseEndDate: null
|
pauseEndDate: null
|
||||||
@ -245,15 +264,27 @@
|
|||||||
reason: [
|
reason: [
|
||||||
{required: true, message: "暂停理由不能为空", trigger: "blur"}
|
{required: true, message: "暂停理由不能为空", trigger: "blur"}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
//查看表单内容
|
||||||
|
formDialog:{
|
||||||
|
title: "",
|
||||||
|
show: false,
|
||||||
|
content: ""
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
props: {
|
||||||
|
orderPauseId: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
|
},
|
||||||
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.orderId = this.$route.params.orderId;
|
this.orderId = this.orderPauseId;
|
||||||
this.queryParams.orderId = this.orderId;
|
this.queryParams.orderId = this.orderPauseId;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 查询订单服务暂停列表 */
|
/** 查询订单服务暂停列表 */
|
||||||
@ -373,11 +404,12 @@
|
|||||||
}).then(response => {
|
}).then(response => {
|
||||||
this.download(response.msg);
|
this.download(response.msg);
|
||||||
}).catch(function() {});
|
}).catch(function() {});
|
||||||
|
},
|
||||||
|
openFormDialog(title, content){
|
||||||
|
this.formDialog.title = title;
|
||||||
|
this.formDialog.content = content;
|
||||||
|
this.formDialog.show = true;
|
||||||
}
|
}
|
||||||
},
|
|
||||||
checkcDateScope(value){
|
|
||||||
console.log(value[0]);
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user