食谱计划页面弹窗样式优化、按天提成列表增加一列
This commit is contained in:
@ -70,7 +70,9 @@ public class SysCustomerController extends BaseController
|
|||||||
customerListResponse = ObjectUtils.getObjectByObject(customer.getSign(), CustomerListResponse.class);
|
customerListResponse = ObjectUtils.getObjectByObject(customer.getSign(), CustomerListResponse.class);
|
||||||
customerListResponse.setCreateTime(customer.getCreateTime());
|
customerListResponse.setCreateTime(customer.getCreateTime());
|
||||||
customerListResponse.setName(customer.getName());
|
customerListResponse.setName(customer.getName());
|
||||||
customerListResponse.setPhone(customer.getPhone());
|
if(StringUtils.isNotEmpty(customer.getPhone())){
|
||||||
|
customerListResponse.setPhone(StringUtils.hiddenPhoneNumber(customer.getPhone()));
|
||||||
|
}
|
||||||
StringBuilder signStr = new StringBuilder();
|
StringBuilder signStr = new StringBuilder();
|
||||||
if(customer.getSign().getSignList() != null && customer.getSign().getSignList().size() > 0){
|
if(customer.getSign().getSignList() != null && customer.getSign().getSignList().size() > 0){
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package com.stdiet.web.controller.custom;
|
package com.stdiet.web.controller.custom;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.stdiet.common.utils.StringUtils;
|
||||||
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;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@ -35,6 +37,11 @@ public class SysRecipesPlanController extends BaseController
|
|||||||
{
|
{
|
||||||
startPage();
|
startPage();
|
||||||
List<SysRecipesPlan> list = sysRecipesPlanService.selectPlanListByCondition(sysRecipesPlan);
|
List<SysRecipesPlan> list = sysRecipesPlanService.selectPlanListByCondition(sysRecipesPlan);
|
||||||
|
for(SysRecipesPlan plan : list){
|
||||||
|
if(StringUtils.isNotEmpty(plan.getPhone())){
|
||||||
|
plan.setHidePhone(StringUtils.hiddenPhoneNumber(plan.getPhone()));
|
||||||
|
}
|
||||||
|
}
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,6 +87,11 @@ public class SysRecipesPlanController extends BaseController
|
|||||||
public AjaxResult export(SysRecipesPlan sysRecipesPlan)
|
public AjaxResult export(SysRecipesPlan sysRecipesPlan)
|
||||||
{
|
{
|
||||||
List<SysRecipesPlan> list = sysRecipesPlanService.selectPlanListByCondition(sysRecipesPlan);
|
List<SysRecipesPlan> list = sysRecipesPlanService.selectPlanListByCondition(sysRecipesPlan);
|
||||||
|
for(SysRecipesPlan plan : list){
|
||||||
|
if(StringUtils.isNotEmpty(plan.getPhone())){
|
||||||
|
plan.setHidePhone(StringUtils.hiddenPhoneNumber(plan.getPhone()));
|
||||||
|
}
|
||||||
|
}
|
||||||
ExcelUtil<SysRecipesPlan> util = new ExcelUtil<SysRecipesPlan>(SysRecipesPlan.class);
|
ExcelUtil<SysRecipesPlan> util = new ExcelUtil<SysRecipesPlan>(SysRecipesPlan.class);
|
||||||
return util.exportExcel(list, "recipesPlan");
|
return util.exportExcel(list, "recipesPlan");
|
||||||
}
|
}
|
||||||
|
@ -37,6 +37,9 @@ public class SysCommissionDayDetail extends BaseEntity {
|
|||||||
@Excel(name = "未发放提成")
|
@Excel(name = "未发放提成")
|
||||||
private BigDecimal totalNotSentCommissionAmount;
|
private BigDecimal totalNotSentCommissionAmount;
|
||||||
|
|
||||||
|
@Excel(name = "下月应发提成")
|
||||||
|
private BigDecimal nextMonthCommission;
|
||||||
|
|
||||||
private List<Map<String, Object>> sendDetailList;
|
private List<Map<String, Object>> sendDetailList;
|
||||||
|
|
||||||
public Long getUserId() {
|
public Long getUserId() {
|
||||||
@ -110,4 +113,12 @@ public class SysCommissionDayDetail extends BaseEntity {
|
|||||||
public void setSendDetailList(List<Map<String, Object>> sendDetailList) {
|
public void setSendDetailList(List<Map<String, Object>> sendDetailList) {
|
||||||
this.sendDetailList = sendDetailList;
|
this.sendDetailList = sendDetailList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public BigDecimal getNextMonthCommission() {
|
||||||
|
return nextMonthCommission;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNextMonthCommission(BigDecimal nextMonthCommission) {
|
||||||
|
this.nextMonthCommission = nextMonthCommission;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,9 +29,12 @@ public class SysRecipesPlan extends BaseEntity
|
|||||||
private String customer;
|
private String customer;
|
||||||
|
|
||||||
//非持久化字段,客户手机号
|
//非持久化字段,客户手机号
|
||||||
@Excel(name = "客户手机号")
|
|
||||||
private String phone;
|
private String phone;
|
||||||
|
|
||||||
|
@Excel(name = "客户手机号")
|
||||||
|
//处理过的客户手机号
|
||||||
|
private String hidePhone;
|
||||||
|
|
||||||
/** 食谱开始日期 */
|
/** 食谱开始日期 */
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
@Excel(name = "食谱开始日期", width = 30, dateFormat = "yyyy-MM-dd")
|
@Excel(name = "食谱开始日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
@ -217,6 +220,14 @@ public class SysRecipesPlan extends BaseEntity
|
|||||||
this.phone = phone;
|
this.phone = phone;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getHidePhone() {
|
||||||
|
return hidePhone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHidePhone(String hidePhone) {
|
||||||
|
this.hidePhone = hidePhone;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
@ -37,6 +37,7 @@ public class SysCommissionDayServiceImpl implements ISysCommissionDayService {
|
|||||||
total.setTotalCommissionAmount(new BigDecimal(0));
|
total.setTotalCommissionAmount(new BigDecimal(0));
|
||||||
total.setTotalHasSentCommissionAmount(new BigDecimal(0));
|
total.setTotalHasSentCommissionAmount(new BigDecimal(0));
|
||||||
total.setTotalNotSentCommissionAmount(new BigDecimal(0));
|
total.setTotalNotSentCommissionAmount(new BigDecimal(0));
|
||||||
|
total.setNextMonthCommission(new BigDecimal(0));
|
||||||
if(list != null && list.size() > 0){
|
if(list != null && list.size() > 0){
|
||||||
Map<Long, List<SysOrderCommisionDayDetail>> orderDetailMap = getOrderByList(sysCommision.getUserId());
|
Map<Long, List<SysOrderCommisionDayDetail>> orderDetailMap = getOrderByList(sysCommision.getUserId());
|
||||||
SysCommissionDayDetail sysCommissionDayDetail = null;
|
SysCommissionDayDetail sysCommissionDayDetail = null;
|
||||||
@ -52,6 +53,7 @@ public class SysCommissionDayServiceImpl implements ISysCommissionDayService {
|
|||||||
total.setTotalCommissionAmount(total.getTotalCommissionAmount().add(sysCommissionDayDetail.getTotalCommissionAmount()));
|
total.setTotalCommissionAmount(total.getTotalCommissionAmount().add(sysCommissionDayDetail.getTotalCommissionAmount()));
|
||||||
total.setTotalHasSentCommissionAmount(total.getTotalHasSentCommissionAmount().add(sysCommissionDayDetail.getTotalHasSentCommissionAmount()));
|
total.setTotalHasSentCommissionAmount(total.getTotalHasSentCommissionAmount().add(sysCommissionDayDetail.getTotalHasSentCommissionAmount()));
|
||||||
total.setTotalNotSentCommissionAmount(total.getTotalNotSentCommissionAmount().add(sysCommissionDayDetail.getTotalNotSentCommissionAmount()));
|
total.setTotalNotSentCommissionAmount(total.getTotalNotSentCommissionAmount().add(sysCommissionDayDetail.getTotalNotSentCommissionAmount()));
|
||||||
|
total.setNextMonthCommission(total.getNextMonthCommission().add(sysCommissionDayDetail.getNextMonthCommission()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
total.setPostName("胜唐体控");
|
total.setPostName("胜唐体控");
|
||||||
@ -166,6 +168,7 @@ public class SysCommissionDayServiceImpl implements ISysCommissionDayService {
|
|||||||
//未发放提成 = 总提成 - 已发放提成
|
//未发放提成 = 总提成 - 已发放提成
|
||||||
sysCommissionDayDetail.setTotalNotSentCommissionAmount(totalCommissionAmount.subtract(totalHasSentCommissionAmount));
|
sysCommissionDayDetail.setTotalNotSentCommissionAmount(totalCommissionAmount.subtract(totalHasSentCommissionAmount));
|
||||||
sysCommissionDayDetail.setSendDetailList(sendDetailList);
|
sysCommissionDayDetail.setSendDetailList(sendDetailList);
|
||||||
|
sysCommissionDayDetail.setNextMonthCommission(sendDetailList.size() > 0 ? (BigDecimal)sendDetailList.get(0).get("yearMonthCommission") : new BigDecimal(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**判断该月提成是否已发放*/
|
/**判断该月提成是否已发放*/
|
||||||
|
48
stdiet-ui/src/components/AutoHideMessage/index.vue
Normal file
48
stdiet-ui/src/components/AutoHideMessage/index.vue
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
<template>
|
||||||
|
<div class="autohideinfo_wrapper">
|
||||||
|
<div>
|
||||||
|
{{ data.substring(0,maxLength) }}<span v-if="data.length > maxLength">...</span>
|
||||||
|
</div>
|
||||||
|
<div v-if="data.length > maxLength">
|
||||||
|
<!--<div>...</div>-->
|
||||||
|
<el-popover placement="top-start" width="300" height="400px" popper-class="autohideinfo_detial" trigger="hover">
|
||||||
|
<div>{{ data }}</div>
|
||||||
|
<el-button type="text" slot="reference">详情</el-button>
|
||||||
|
</el-popover>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "AutoHideMessage",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
};
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
data: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
maxLength: {
|
||||||
|
type: Number,
|
||||||
|
default: 10
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.autohideinfo_wrapper {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.autohideinfo_detial {
|
||||||
|
max-height: 340px;
|
||||||
|
//overflow: auto;
|
||||||
|
}
|
||||||
|
</style>
|
@ -36,7 +36,9 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<div><span style="color:#E6A23C;font-family:PingFang SC">
|
<div><span style="color:#E6A23C;font-family:PingFang SC">
|
||||||
注意事项:
|
注意事项:
|
||||||
<br/>1、2021年1月开始的订单才开始按天计算提成</span></div>
|
<br/>1、2021年1月开始的订单才开始按天计算提成
|
||||||
|
<br/>2、发工资日期定为每月15号,若当前日期大于15号,则认定上个月的工资已发放
|
||||||
|
</span></div>
|
||||||
<el-row :gutter="10" class="mb8" style="margin-top:10px;">
|
<el-row :gutter="10" class="mb8" style="margin-top:10px;">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
@ -76,6 +78,12 @@
|
|||||||
{{scope.row.totalNotSentCommissionAmount}}
|
{{scope.row.totalNotSentCommissionAmount}}
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="下月应发提成" align="center" prop="nextMonthCommission">
|
||||||
|
<template scope="scope">
|
||||||
|
{{scope.row.nextMonthCommission}}
|
||||||
|
</template>
|
||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center">
|
<el-table-column label="操作" align="center">
|
||||||
<template scope="scope">
|
<template scope="scope">
|
||||||
|
@ -73,11 +73,11 @@
|
|||||||
<el-table v-loading="loading" :data="recipesPlanList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="recipesPlanList" @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="customer" />
|
<el-table-column label="客户姓名" align="center" prop="customer" />
|
||||||
<el-table-column label="客户手机号" align="center" prop="phone" />
|
<el-table-column label="客户手机号" align="center" prop="hidePhone" width="180"/>
|
||||||
<el-table-column label="食谱日期范围" align="center" prop="scopeDate" width="200"/>
|
<el-table-column label="食谱日期范围" align="center" prop="scopeDate" width="200"/>
|
||||||
<el-table-column label="营养师" align="center" prop="nutritionist" />
|
<el-table-column label="营养师" align="center" prop="nutritionist" />
|
||||||
<el-table-column label="营养师助理" align="center" prop="nutritionistAssis" />
|
<el-table-column label="营养师助理" align="center" prop="nutritionistAssis" width="180"/>
|
||||||
<el-table-column label="食谱是否发送" align="center" prop="sendFlag">
|
<el-table-column label="是否发送" align="center" prop="sendFlag">
|
||||||
<!--<template slot-scope="scope">
|
<!--<template slot-scope="scope">
|
||||||
<span>{{ scope.row.sendFlag == 1 ? "已发送" : "未发送"}}</span>
|
<span>{{ scope.row.sendFlag == 1 ? "已发送" : "未发送"}}</span>
|
||||||
</template>(.sendFlag == 1) ? 'success' : 'warning'-->
|
</template>(.sendFlag == 1) ? 'success' : 'warning'-->
|
||||||
@ -179,7 +179,7 @@
|
|||||||
<!--<el-table-column label="营养师名称" align="center" prop="nutritionist" />
|
<!--<el-table-column label="营养师名称" align="center" prop="nutritionist" />
|
||||||
<el-table-column label="营养师助理名称" align="center" prop="nutritionistAssis" />-->
|
<el-table-column label="营养师助理名称" align="center" prop="nutritionistAssis" />-->
|
||||||
|
|
||||||
<el-table-column label="食谱时间范围" align="center" prop="scopeDate" width="200"/>
|
<el-table-column label="食谱时间范围" align="center" prop="scopeDate" width="250"/>
|
||||||
<el-table-column label="食谱是否发送" align="center" prop="sendFlag">
|
<el-table-column label="食谱是否发送" align="center" prop="sendFlag">
|
||||||
<!--<template slot-scope="scope">
|
<!--<template slot-scope="scope">
|
||||||
<span>{{ scope.row.sendFlag == 1 ? "已发送" : "未发送"}}</span>
|
<span>{{ scope.row.sendFlag == 1 ? "已发送" : "未发送"}}</span>
|
||||||
@ -214,206 +214,57 @@
|
|||||||
|
|
||||||
<!-- 查看体征 -->
|
<!-- 查看体征 -->
|
||||||
<el-dialog title="客户体征" v-if="customerOpen" :visible.sync="customerOpen" width="1000px" append-to-body>
|
<el-dialog title="客户体征" v-if="customerOpen" :visible.sync="customerOpen" width="1000px" append-to-body>
|
||||||
<el-table v-loading="loading" :data="customerSign" width="900px">
|
<el-table :show-header="false" :data="customerSignList" border :cell-style="columnStyle" style="width: 100%;">
|
||||||
<el-table-column label="姓名" align="center" prop="name" />
|
<el-table-column width="140" prop="attr_name_one">
|
||||||
<!--<el-table-column label="手机号" align="center" prop="phone" width="120" fixed="left"/>-->
|
</el-table-column>
|
||||||
<el-table-column label="性别" align="center" prop="sign.sex" >
|
<el-table-column prop="value_one">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{scope.row.sign.sex == 0 ? `男` : '女'}}
|
<AutoHideMessage :data="scope.row.value_one == null ? '' : (scope.row.value_one+'')" :maxLength="20"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="年龄(岁)" align="center" prop="sign.age" />
|
<el-table-column width="140" prop="attr_name_two"></el-table-column>
|
||||||
<el-table-column label="身高(厘米)" align="center" prop="sign.tall" />
|
<el-table-column prop="value_two">
|
||||||
<el-table-column label="体重(斤)" align="center" prop="sign.weight"/>
|
|
||||||
<el-table-column label="北方、南方" align="center" prop="sign.position">
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{scope.row.sign.position == 0 ? `南方` : '北方'}}
|
<AutoHideMessage :data="scope.row.value_two == null ? '' : (scope.row.value_two+'')" :maxLength="20"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="病史" align="center" prop="sign.signList">
|
<el-table-column width="140" prop="attr_name_three"></el-table-column>
|
||||||
|
<el-table-column prop="value_three">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{getSignString(scope.row.sign.signList)}}</span>
|
<AutoHideMessage :data="scope.row.value_three == null ? '' : (scope.row.value_three+'')" :maxLength="20"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-table v-loading="loading" :data="customerSign" width="900px">
|
|
||||||
<el-table-column label="忌口或过敏源" align="center" prop="sign.dishesIngredientId" width="120"></el-table-column>
|
|
||||||
<el-table-column label="是否便秘" align="center" prop="sign.constipation">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{scope.row.sign.constipation == 0 ? `是` : '否'}}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="是否熬夜失眠" align="center" prop="sign.staylate">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{scope.row.sign.staylate == 0 ? `是` : '否'}}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="是否经常运动" align="center" prop="sign.motion">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{scope.row.sign.motion == 0 ? `是` : '否'}}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="饮食方式" align="center" prop="sign.makeFoodType" >
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{scope.row.sign.makeFoodType == 0 ? `自己做` : '外面吃'}}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="饮食备注" align="center" prop="sign.remarks"></el-table-column>
|
|
||||||
<el-table-column label="饮食特点" align="center" prop="sign.makeFoodTaste">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{scope.row.sign.makeFoodTaste == 0 ? `清淡` : '重口味'}}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<el-table v-loading="loading" :data="customerSign" width="900px">
|
|
||||||
<el-table-column label="工作职业" align="center" prop="sign.vocation">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{scope.row.sign.vocation}}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="是否上夜班" align="center" prop="sign.night">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{scope.row.sign.night == 0 ? `是` : '否'}}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="久坐多还是运动多" align="center" prop="sign.walk">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{scope.row.sign.walk == 0 ? `久坐多` : '走动多'}}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="是否浑身乏力" align="center" prop="sign.weakness">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{scope.row.sign.weakness == 0 ? `是` : '否'}}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="是否减脂反弹" align="center" prop="sign.rebound">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{scope.row.sign.rebound == 0 ? `是` : '否'}}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="意识到生活习惯是减脂关键" align="center" prop="sign.crux">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{scope.row.sign.crux == 0 ? `是` : '否'}}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="睡觉时间" align="center" prop="sign.sleepTime">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{scope.row.sign.sleepTime}}点
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<el-table v-loading="loading" :data="customerSign" width="900px">
|
|
||||||
<el-table-column label="起床时间" align="center" prop="sign.getupTime" >
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{scope.row.sign.getupTime}}点
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="方便沟通时间" align="center" prop="sign.connectTime">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{scope.row.sign.connectTime}}点
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="湿气数据" align="center" prop="sign.bloodData">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{scope.row.sign.bloodData}}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="气血数据" align="center" prop="sign.moistureDate" >
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{scope.row.sign.moistureDate}}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="减脂经历" align="center" prop="sign.experience" ></el-table-column>
|
|
||||||
<el-table-column label="减脂遇到的困难" align="center" prop="sign.difficulty" ></el-table-column>
|
|
||||||
<el-table-column label="备注" align="center" prop="sign.comments"></el-table-column>
|
|
||||||
</el-table>
|
|
||||||
<!--<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button @click="customerOpen = false">关 闭</el-button>
|
|
||||||
</div>-->
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 查看订单 -->
|
<!-- 查看订单 -->
|
||||||
<el-dialog title="订单详情" v-if="orderDetailOpen" :visible.sync="orderDetailOpen" width="1000px" append-to-body>
|
<el-dialog title="订单详情" v-if="orderDetailOpen" :visible.sync="orderDetailOpen" width="1000px" append-to-body>
|
||||||
<el-table v-loading="loading" :data="orderDetailList" >
|
<el-table :show-header="false" :data="orderDetailList" border :cell-style="columnStyle" style="width: 100%;">
|
||||||
<el-table-column label="订单状态" align="center" prop="orderId">
|
<el-table-column width="120" prop="attr_name_one">
|
||||||
<template slot-scope="scope">
|
</el-table-column>
|
||||||
<el-tag
|
<el-table-column prop="value_one">
|
||||||
:type="scope.row.reviewStatus === '2' ? 'success' : scope.row.status ==='0'? '': 'danger'"
|
<template slot-scope="scope" >
|
||||||
disable-transitions>
|
<el-tag v-if="scope.row.attr_name_one === '订单状态'" :type="scope.row.value_two === '2' ? 'success' : scope.row.value_one === '0'? '': 'danger'" disable-transitions>
|
||||||
{{scope.row.reviewStatus === '2' ? '已完成': scope.row.status ==='0'? '进行中': '已暂停'}}
|
{{scope.row.value_two === '2' ? '已完成': scope.row.value_one ==='0'? '进行中': '已暂停'}}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
|
<AutoHideMessage v-else :data="scope.row.value_one == null ? '' : (scope.row.value_one+'')" :maxLength="20"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="审核状态" align="center" prop="reviewStatus">
|
<el-table-column width="120" prop="attr_name_two"></el-table-column>
|
||||||
<template slot-scope="scope">
|
<el-table-column prop="value_two">
|
||||||
<el-tag
|
<template slot-scope="scope" >
|
||||||
:type="scope.row.reviewStatus === 'yes' ? 'success' : 'danger'"
|
<el-tag v-if="scope.row.attr_name_two === '审核状态'" :type="scope.row.value_two === 'yes' ? 'success' : 'danger'">
|
||||||
disable-transitions>
|
{{scope.row.value_two === 'yes' ? '已审核' : '未审核'}}
|
||||||
{{scope.row.reviewStatus === 'yes' ? '已审核':'未审核'}}
|
|
||||||
</el-tag>
|
</el-tag>
|
||||||
|
<AutoHideMessage v-else :data="scope.row.value_two == null ? '' : (scope.row.value_two+'')" :maxLength="20"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="成交时间" align="center" prop="orderTime">
|
<el-table-column width="120" prop="attr_name_three"></el-table-column>
|
||||||
<template slot-scope="scope">
|
<el-table-column prop="value_three">
|
||||||
<span>{{ parseTime(scope.row.orderTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
<template slot-scope="scope" >
|
||||||
</template>
|
<AutoHideMessage :data="scope.row.value_three == null ? '' : (scope.row.value_three+'')" :maxLength="20"/>
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="客户姓名" align="center" prop="customer"/>
|
|
||||||
<el-table-column label="金额" align="center" prop="amount">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{toThousands(scope.row.amount)}}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="体重" align="center" prop="weight">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{scope.row.weight ? `${scope.row.weight}斤` : ''}}
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-table v-loading="loading" :data="orderDetailList" >
|
|
||||||
<el-table-column label="手机号" align="center" prop="phone"/>
|
|
||||||
<el-table-column label="服务时长" align="center" prop="serveTime"/>
|
|
||||||
<el-table-column label="赠送时长" align="center" prop="giveServeDay">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
{{scope.row.giveServeDay ? `${scope.row.giveServeDay}天` : '0天'}}
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="调理项目" align="center" prop="conditioningProject"/>
|
|
||||||
<el-table-column label="收款方式" align="center" prop="payType"/>
|
|
||||||
<el-table-column label="售前" align="center" prop="preSale"/>
|
|
||||||
</el-table>
|
|
||||||
<el-table v-loading="loading" :data="orderDetailList" >
|
|
||||||
<el-table-column label="售后" align="center" prop="afterSale"/>
|
|
||||||
<el-table-column label="主营养师" align="center" prop="nutritionist"/>
|
|
||||||
<el-table-column label="助理营养师" align="center" prop="nutriAssis" />
|
|
||||||
<el-table-column label="账号" align="center" prop="account"/>
|
|
||||||
<el-table-column label="策划" align="center" prop="planner"/>
|
|
||||||
<el-table-column label="策划助理" align="center" prop="plannerAssis"/>
|
|
||||||
</el-table>
|
|
||||||
<el-table v-loading="loading" :data="orderDetailList" >
|
|
||||||
<el-table-column label="运营" align="center" prop="operator"/>
|
|
||||||
<el-table-column label="运营助理" align="center" prop="operatorAssis"/>
|
|
||||||
<!--<el-table-column label="推荐人" align="center" prop="recommender"/>-->
|
|
||||||
<el-table-column label="进粉时间" align="center" prop="becomeFanTime">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>{{ parseTime(scope.row.becomeFanTime, '{y}-{m}-{d}') }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="开始时间" align="center" prop="startTime">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>{{ parseTime(scope.row.startTime, '{y}-{m}-{d}') }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="结束时间" align="center" prop="serverEndTime">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>{{ parseTime(scope.row.serverEndTime, '{y}-{m}-{d}') }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="备注" align="center" prop="remark"/>
|
|
||||||
</el-table>
|
|
||||||
<!--<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button @click="orderDetailOpen = false">关 闭</el-button>
|
|
||||||
</div>-->
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -422,6 +273,7 @@
|
|||||||
import { listRecipesPlan, getRecipesPlan, updateRecipesPlan,exportRecipesPlan } from "@/api/custom/recipesPlan";
|
import { listRecipesPlan, getRecipesPlan, updateRecipesPlan,exportRecipesPlan } from "@/api/custom/recipesPlan";
|
||||||
import { getCustomerAndSignByPhone } from "@/api/custom/customer";
|
import { getCustomerAndSignByPhone } from "@/api/custom/customer";
|
||||||
import {getInfoDetail,getOptions} from "@/api/custom/order";
|
import {getInfoDetail,getOptions} from "@/api/custom/order";
|
||||||
|
import AutoHideMessage from "@/components/AutoHideMessage";
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import store from "@/store";
|
import store from "@/store";
|
||||||
const nextDate = dayjs().add(1, 'day').format("YYYY-MM-DD");
|
const nextDate = dayjs().add(1, 'day').format("YYYY-MM-DD");
|
||||||
@ -490,8 +342,23 @@
|
|||||||
//营养师
|
//营养师
|
||||||
nutritionistIdOptions:[],
|
nutritionistIdOptions:[],
|
||||||
//营养师助理
|
//营养师助理
|
||||||
nutriAssisIdOptions:[]
|
nutriAssisIdOptions:[],
|
||||||
|
//订单详情的标题,按竖显示
|
||||||
|
orderTitleData:[["订单状态","审核状态","成交时间"],["姓名","金额","体重"],["手机号","服务时长","赠送时长"],["调理项目","收款方式","售前"],
|
||||||
|
["售后","营养师","助理营养师"],["账号","策划","策划助理"],["运营","运营助理","进粉时间"],["开始时间","结束时间","备注"]],
|
||||||
|
//订单详情的属性名称,与标题对应,按竖显示
|
||||||
|
orderValueData:[["status","reviewStatus","orderTime"],["customer","amount","weight"],["phone","serveTime","giveServeDay"],["conditioningProject","payType","preSale"],
|
||||||
|
["afterSale","nutritionist","nutriAssis"],["account","planner","plannerAssis"],["operator","operatorAssis","becomeFanTime"],["startTime","serverEndTime","serverEndTime"]],
|
||||||
|
signTitleData:[["姓名","手机号","性别"],["年龄(岁)","身高(厘米)","体重(斤)"],["南、北方","病史","忌口或过敏源"],["是否便秘","是否熬夜失眠","是否经常运动"],
|
||||||
|
["饮食方式","饮食备注","饮食特点"],["工作职业","是否上夜班","久坐多还是运动多"],["是否浑身乏力","是否减脂反弹","意识到生活习惯是减脂的关键"],
|
||||||
|
["睡觉时间","起床时间","方便沟通时间"],["湿气数据","气血数据","减脂经历"],["减脂遇到的困难","备注","创建时间"]],
|
||||||
|
signValueData:[["name","phone","sex"],["age","tall","weight"],["position","signString","dishesIngredientId"],["constipation","staylate","motion"],
|
||||||
|
["makeFoodType","remarks","makeFoodTaste"],["vocation","night","walk"],["weakness","rebound","crux"],["sleepTime","getupTime","connectTime"],["bloodData","moistureDate","experience"],["difficulty","comments","createTime"]]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
AutoHideMessage
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
getOptions().then(response => {
|
getOptions().then(response => {
|
||||||
@ -537,24 +404,44 @@
|
|||||||
},
|
},
|
||||||
/** 查询客户体征 */
|
/** 查询客户体征 */
|
||||||
getCustomerSign(row) {
|
getCustomerSign(row) {
|
||||||
this.customerSign = [];
|
this.customerSignList = [];
|
||||||
let message = "未找到该客户,请检查订单手机号与客户体征手机号是否一致";
|
let message = "未找到该客户,请检查订单手机号与客户体征手机号是否一致";
|
||||||
if(row.phone == null || row.phone == ""){
|
if(row.phone == null || row.phone == ""){
|
||||||
this.alert(message);
|
this.alert(message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
getCustomerAndSignByPhone({"phone": row.phone}).then(response => {
|
getCustomerAndSignByPhone({"phone": row.phone}).then(response => {
|
||||||
this.customerSign[0] = response.data;
|
if(response.data == null){
|
||||||
if(this.customerSign[0] == null){
|
|
||||||
this.alert(message);
|
this.alert(message);
|
||||||
}else{
|
return;
|
||||||
this.customerOpen = true;
|
|
||||||
}
|
}
|
||||||
|
let sign = response.data.sign;
|
||||||
|
sign.name = response.data.name;
|
||||||
|
sign.phone = response.data.phone;
|
||||||
|
sign.createTime = response.data.createTime;
|
||||||
|
sign.sex = sign.sex == 0 ? `男` : '女';
|
||||||
|
sign.position = sign.position == 0 ? `南方` : '北方';
|
||||||
|
sign.signString = this.getSignString(sign.signList);
|
||||||
|
sign.constipation = sign.constipation == 0 ? "是" : "否";
|
||||||
|
sign.staylate = sign.staylate == 0 ? "是" : "否";
|
||||||
|
sign.motion = sign.motion == 0 ? "是" : "否";
|
||||||
|
sign.makeFoodType = sign.makeFoodType == 0 ? `自己做` : '外面吃';
|
||||||
|
sign.makeFoodTaste = sign.makeFoodTaste == 0 ? "清淡" : '重口味';
|
||||||
|
sign.night = sign.night == 0 ? `是` : '否';
|
||||||
|
sign.walk = sign.walk == 0 ? `久坐多` : '走动多';
|
||||||
|
sign.weakness = sign.weakness == 0 ? `是` : '否';
|
||||||
|
sign.rebound = sign.rebound == 0 ? `是` : '否';
|
||||||
|
sign.crux = sign.crux == 0 ? `是` : '否';
|
||||||
|
sign.sleepTime = sign.sleepTime+"点";
|
||||||
|
sign.getupTime = sign.getupTime + "点";
|
||||||
|
sign.connectTime = sign.connectTime +"点";
|
||||||
|
for(let i = 0; i < this.signTitleData.length; i++){
|
||||||
|
this.customerSignList.push({"attr_name_one": this.signTitleData[i][0],"value_one": sign[this.signValueData[i][0]],"attr_name_two": this.signTitleData[i][1],"value_two": sign[this.signValueData[i][1]],"attr_name_three": this.signTitleData[i][2],"value_three": sign[this.signValueData[i][2]]});
|
||||||
|
}
|
||||||
|
this.customerOpen = true;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getAllPlanByOrderId(){
|
getAllPlanByOrderId(){
|
||||||
//console.log(this.allRecipesPlanQueryParam.sendFlag);
|
|
||||||
//console.log(this.allRecipesPlanQueryParam.sendFlag === "");
|
|
||||||
if(this.allRecipesPlanQueryParam.sendFlag === ""){
|
if(this.allRecipesPlanQueryParam.sendFlag === ""){
|
||||||
this.allRecipesPlanQueryParam.sendFlag = null;
|
this.allRecipesPlanQueryParam.sendFlag = null;
|
||||||
}
|
}
|
||||||
@ -570,12 +457,16 @@
|
|||||||
getOrderDetail(row){
|
getOrderDetail(row){
|
||||||
this.orderDetailList = [];
|
this.orderDetailList = [];
|
||||||
getInfoDetail({'orderId': row.orderId}).then(response => {
|
getInfoDetail({'orderId': row.orderId}).then(response => {
|
||||||
this.orderDetailList[0] = response.data;
|
response.data.weight = response.data.weight != null ? (response.data.weight +"斤") : "";
|
||||||
|
response.data.giveServeDay = response.data.giveServeDay != null ? (response.data.giveServeDay +"天") : "";
|
||||||
|
for(let i = 0; i < this.orderTitleData.length; i++){
|
||||||
|
this.orderDetailList.push({"attr_name_one": this.orderTitleData[i][0],"value_one": response.data[this.orderValueData[i][0]],"attr_name_two": this.orderTitleData[i][1],"value_two": response.data[this.orderValueData[i][1]],"attr_name_three": this.orderTitleData[i][2],"value_three": response.data[this.orderValueData[i][2]]});
|
||||||
|
}
|
||||||
this.orderDetailOpen = true;
|
this.orderDetailOpen = true;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
alert(value){
|
alert(value){
|
||||||
this.$alert(value, '提示', {confirmButtonText: '确定'});
|
this.$alert(value, '提示', {confirmButtonText: '关闭'});
|
||||||
},
|
},
|
||||||
getSignString(signList){
|
getSignString(signList){
|
||||||
if(signList == null){
|
if(signList == null){
|
||||||
@ -671,10 +562,36 @@
|
|||||||
if(row.sendFlag == 1) {
|
if(row.sendFlag == 1) {
|
||||||
return "success";
|
return "success";
|
||||||
}
|
}
|
||||||
if(dayjs(row.startDate+"").diff(dayjs(),'day') <= 1){
|
return "danger";
|
||||||
|
/* if(dayjs(row.startDate+"").diff(dayjs(),'day') <= 1){
|
||||||
return "danger";
|
return "danger";
|
||||||
}
|
}
|
||||||
return '';
|
return '';*/
|
||||||
|
},
|
||||||
|
// 自定义列背景色
|
||||||
|
columnStyle({ row, column, rowIndex, columnIndex }) {
|
||||||
|
if (columnIndex == 0 || columnIndex == 2 || columnIndex == 4 || columnIndex == 6) {
|
||||||
|
//第三第四列的背景色就改变了2和3都是列数的下标
|
||||||
|
return "background:#f3f6fc;font-weight:bold";
|
||||||
|
}else{
|
||||||
|
return "background:#ffffff;";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 和并列
|
||||||
|
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||||
|
if (columnIndex === 0) {
|
||||||
|
if (rowIndex % 4 === 0) {
|
||||||
|
return {
|
||||||
|
rowspan: 4,
|
||||||
|
colspan: 1
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
return {
|
||||||
|
rowspan: 0,
|
||||||
|
colspan: 0
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user