commit
243bffffee
stdiet-admin/src/main/java/com/stdiet/web/controller/custom
stdiet-custom/src/main
java/com/stdiet/custom
domain
mapper
service
resources/mapper/custom
stdiet-ui/src
assets/logo
layout/components/Sidebar
views/custom
@ -38,6 +38,18 @@ public class SysRecipesPlanController extends BaseController
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据订单查询完整食谱计划列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('recipes:recipesPlan:list')")
|
||||
@GetMapping("/getAllPlanByOrderId")
|
||||
public TableDataInfo getAllPlanByOrderId(SysRecipesPlan sysRecipesPlan)
|
||||
{
|
||||
startPage();
|
||||
List<SysRecipesPlan> list = sysRecipesPlanService.selectPlanListByOrderId(sysRecipesPlan);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取食谱计划详细信息
|
||||
*/
|
||||
|
@ -29,6 +29,7 @@ public class SysRecipesPlan extends BaseEntity
|
||||
private String customer;
|
||||
|
||||
//非持久化字段,客户手机号
|
||||
@Excel(name = "客户手机号")
|
||||
private String phone;
|
||||
|
||||
/** 食谱开始日期 */
|
||||
|
@ -79,4 +79,11 @@ public interface SysRecipesPlanMapper
|
||||
* @return
|
||||
*/
|
||||
List<SysRecipesPlan> selectPlanListByCondition(SysRecipesPlan sysRecipesPlan);
|
||||
|
||||
/**
|
||||
* 根据订单ID查询食谱计划
|
||||
* @param sysRecipesPlan
|
||||
* @return
|
||||
*/
|
||||
List<SysRecipesPlan> selectPlanListByOrderId(SysRecipesPlan sysRecipesPlan);
|
||||
}
|
@ -80,4 +80,11 @@ public interface ISysRecipesPlanService
|
||||
* @return
|
||||
*/
|
||||
List<SysRecipesPlan> selectPlanListByCondition(SysRecipesPlan sysRecipesPlan);
|
||||
|
||||
/**
|
||||
* 根据订单ID查询食谱计划
|
||||
* @param sysRecipesPlan
|
||||
* @return
|
||||
*/
|
||||
List<SysRecipesPlan> selectPlanListByOrderId(SysRecipesPlan sysRecipesPlan);
|
||||
}
|
@ -123,6 +123,7 @@ public class SysCommissionDayServiceImpl implements ISysCommissionDayService {
|
||||
}
|
||||
commissionMonthSet.addAll(sysOrderCommisionDayDetail.getEveryYearMonthServerMoney().keySet());
|
||||
}
|
||||
//System.out.println("总提成:"+sysCommissionDayDetail.getNickName()+"-"+orderAmount.get("20211"));
|
||||
//获取提成比例以及计算提成
|
||||
Map<String, Float> rateMap = getRateByAmount(sysCommissionDayDetail.getUserId(), sysCommissionDayDetail.getPostId(), orderAmount);
|
||||
|
||||
@ -225,10 +226,10 @@ public class SysCommissionDayServiceImpl implements ISysCommissionDayService {
|
||||
//整理出每个用户对应的订单List
|
||||
Map<Long, List<SysOrderCommisionDayDetail>> userOrderResultMap = new HashMap<>();
|
||||
for (SysOrder sysOrder : orderList) {
|
||||
//建档时间为空、售后人员ID为空、营养师ID为空、订单金额为空或小于0,都视为异常订单
|
||||
//开始时间为空、售后人员ID为空、营养师ID都为空、订单金额为空,都视为异常订单
|
||||
if(sysOrder.getOrderTime() == null || sysOrder.getStartTime() == null || sysOrder.getServeTimeId() == null
|
||||
|| (sysOrder.getAfterSaleId() == null && sysOrder.getNutritionistId() == null)
|
||||
|| sysOrder.getAmount() == null || sysOrder.getAmount().doubleValue() < 0){
|
||||
|| sysOrder.getAmount() == null){
|
||||
//System.out.println("客户:"+ sysOrder.getCustomer() +",营养师:"+sysOrder.getNutritionist() + ",售后" + sysOrder.getAfterSale());
|
||||
continue;
|
||||
}
|
||||
@ -436,7 +437,7 @@ public class SysCommissionDayServiceImpl implements ISysCommissionDayService {
|
||||
* double转为BigDecimal,保留一位小数,向下舍去
|
||||
* */
|
||||
public BigDecimal getMoney(Double money, int n){
|
||||
return new BigDecimal(money).setScale(n, BigDecimal.ROUND_HALF_UP);
|
||||
return new BigDecimal(money.toString()).setScale(n, BigDecimal.ROUND_DOWN);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -459,7 +460,7 @@ public class SysCommissionDayServiceImpl implements ISysCommissionDayService {
|
||||
nf.setRoundingMode(RoundingMode.DOWN);
|
||||
System.out.println(Double.parseDouble(nf.format(s)));
|
||||
System.out.println( new BigDecimal(nf.format(s)).doubleValue());*/
|
||||
System.out.println(new BigDecimal(s).setScale(1, BigDecimal.ROUND_HALF_UP).doubleValue());
|
||||
/*System.out.println(new BigDecimal(s).setScale(1, BigDecimal.ROUND_HALF_UP).doubleValue());
|
||||
|
||||
LocalDate localDate = LocalDate.of(2020, 1, 15);
|
||||
System.out.println(ChronoUnit.MONTHS.between(localDate, LocalDate.now()));
|
||||
@ -467,6 +468,14 @@ public class SysCommissionDayServiceImpl implements ISysCommissionDayService {
|
||||
System.out.println(localDate.getDayOfWeek());
|
||||
System.out.println(localDate.getDayOfYear());
|
||||
|
||||
System.out.println(ChronoUnit.DAYS.between(LocalDate.of(2021, 1,14), LocalDate.now()));
|
||||
System.out.println(ChronoUnit.DAYS.between(LocalDate.of(2021, 1,14), LocalDate.now()));*/
|
||||
|
||||
/*System.out.println(ts(109792.8 * 6 / 100D, 1));
|
||||
System.out.println(ts(6587.8,2).doubleValue());*/
|
||||
System.out.println(ts(1.919,1).doubleValue());
|
||||
}
|
||||
|
||||
public static BigDecimal ts(Double money, int n){
|
||||
return new BigDecimal(money.toString()).setScale(n, BigDecimal.ROUND_DOWN);
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.stdiet.custom.service.impl;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@ -196,7 +197,8 @@ public class SysOrderServiceImpl implements ISysOrderService {
|
||||
* @param sysOrder
|
||||
*/
|
||||
private void setOrderServerEndDate(SysOrder sysOrder){
|
||||
sysOrder.setServerEndTime(DateUtils.localDateToDate(sysCommissionDayService.getServerEndDate(sysOrder)));
|
||||
LocalDate serverEndDate = sysCommissionDayService.getServerEndDate(sysOrder);
|
||||
sysOrder.setServerEndTime(serverEndDate != null ? DateUtils.localDateToDate(serverEndDate) : null);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -133,10 +133,11 @@ public class SysRecipesPlanServiceImpl implements ISysRecipesPlanService
|
||||
return;
|
||||
}
|
||||
SysOrder sysOrder = sysOrderService.selectSysOrderById(orderId);
|
||||
//订单为空、金额小于0不进行食谱生成、更新
|
||||
if(sysOrder == null){
|
||||
//订单为空、金额小于0不进行食谱生成、更新,只对2021年开始的订单进行食谱计划生成
|
||||
if(sysOrder == null && DateUtils.dateToLocalDate(sysOrder.getOrderTime()).getYear() > 2020){
|
||||
return;
|
||||
}
|
||||
System.out.println(DateUtils.dateToLocalDate(sysOrder.getOrderTime()).getYear());
|
||||
try{
|
||||
//获取redis中该订单对应的锁
|
||||
if(synchrolockUtil.lock(String.format(generateRecipesPlanLockKey, orderId))){
|
||||
@ -281,4 +282,14 @@ public class SysRecipesPlanServiceImpl implements ISysRecipesPlanService
|
||||
public List<SysRecipesPlan> selectPlanListByCondition(SysRecipesPlan sysRecipesPlan){
|
||||
return sysRecipesPlanMapper.selectPlanListByCondition(sysRecipesPlan);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据订单ID查询食谱计划
|
||||
* @param sysRecipesPlan
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<SysRecipesPlan> selectPlanListByOrderId(SysRecipesPlan sysRecipesPlan){
|
||||
return sysRecipesPlanMapper.selectPlanListByOrderId(sysRecipesPlan);
|
||||
}
|
||||
}
|
@ -96,11 +96,11 @@
|
||||
</update>
|
||||
|
||||
<delete id="deleteSysRecipesPlanById" parameterType="Long">
|
||||
update sys_recipes_plan set del_flag = 1 where id = #{id}
|
||||
delete from sys_recipes_plan where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSysRecipesPlanByIds" parameterType="String">
|
||||
update sys_recipes_plan set del_flag = 1 where id in
|
||||
delete from sys_recipes_plan where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
@ -118,7 +118,7 @@
|
||||
|
||||
<!-- 根据订单ID删除对应食谱计划 -->
|
||||
<update id="delRecipesPlanByOrderId" parameterType="String">
|
||||
update sys_recipes_plan set del_flag = 1 where order_id in
|
||||
delete from sys_recipes_plan where order_id in
|
||||
<foreach item="orderId" collection="array" open="(" separator="," close=")">
|
||||
#{orderId}
|
||||
</foreach>
|
||||
@ -133,10 +133,38 @@
|
||||
LEFT JOIN sys_user su_nutritionist_assis ON su_nutritionist_assis.user_id = sr.nutri_assis_id AND su_nutritionist_assis.del_flag = 0
|
||||
WHERE srp.del_flag = 0
|
||||
<if test="orderId != null">AND srp.order_id = #{orderId}</if>
|
||||
<if test="customer != null and customer != ''">AND sr.customer like concat('%',#{customer},'%')</if>
|
||||
<if test="sendFlag != null">AND srp.send_flag = #{sendFlag}</if>
|
||||
<if test="customer != null and customer != ''">AND (sr.customer like concat('%',#{customer},'%') OR sr.phone like concat('%',#{customer},'%'))</if>
|
||||
<if test="nutritionistId != null">AND su_nutritionist.user_id = #{nutritionistId}</if>
|
||||
<if test="nutritionistAssisId != null">AND su_nutritionist_assis.user_id = #{nutritionistAssisId}</if>
|
||||
<if test="startDate != null and endDate != null ">AND srp.start_date BETWEEN date_format(#{startDate},'%y%m%d') AND date_format(#{endDate},'%y%m%d') </if>
|
||||
ORDER BY srp.order_id DESC,srp.id ASC
|
||||
</select>
|
||||
<!-- 食谱计划、订单表联查 -->
|
||||
<!--<select id="selectPlanListByCondition" parameterType="SysRecipesPlan" resultMap="SysRecipesPlanResult">
|
||||
SELECT sr.order_id,sr.customer,sr.phone,su_nutritionist.nick_name nutritionist,su_nutritionist_assis.nick_name AS nutritionist_assis,sr.start_time,sr.server_end_time
|
||||
FROM sys_order sr
|
||||
LEFT JOIN sys_user su_nutritionist ON su_nutritionist.user_id = sr.nutritionist_id AND su_nutritionist.del_flag = 0
|
||||
LEFT JOIN sys_user su_nutritionist_assis ON su_nutritionist_assis.user_id = sr.nutri_assis_id AND su_nutritionist_assis.del_flag = 0
|
||||
<where>
|
||||
<if test="orderId != null">AND sr.order_id = #{orderId}</if>
|
||||
<if test="customer != null and customer != ''">AND (sr.customer like concat('%',#{customer},'%') OR sr.phone like concat('%',#{customer},'%'))</if>
|
||||
<if test="nutritionistId != null">AND su_nutritionist.user_id = #{nutritionistId}</if>
|
||||
<if test="nutritionistAssisId != null">AND su_nutritionist_assis.user_id = #{nutritionistAssisId}</if>
|
||||
<if test="startDate != null and endDate != null ">
|
||||
AND sr.order_id IN ( SELECT order_id FROM sys_recipes_plan srp WHERE srp.del_flag = 0 AND srp.start_date BETWEEN date_format(#{startDate},'%y%m%d') AND date_format(#{endDate},'%y%m%d'))
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY sr.order_id DESC
|
||||
</select>-->
|
||||
|
||||
<!-- 根据订单ID查询食谱计划 -->
|
||||
<select id="selectPlanListByOrderId" parameterType="SysRecipesPlan" resultMap="SysRecipesPlanResult">
|
||||
SELECT srp.id,srp.order_id,sr.customer,sr.phone, srp.start_date,srp.end_date,srp.send_flag,srp.send_time
|
||||
FROM sys_recipes_plan srp
|
||||
LEFT JOIN sys_order sr ON sr.order_id = srp.order_id
|
||||
WHERE srp.del_flag = 0 AND srp.order_id = #{orderId}
|
||||
<if test="sendFlag != null">AND srp.send_flag = #{sendFlag}</if>
|
||||
ORDER BY srp.id ASC
|
||||
</select>
|
||||
</mapper>
|
BIN
stdiet-ui/src/assets/logo/st_logo2.png
Normal file
BIN
stdiet-ui/src/assets/logo/st_logo2.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 14 KiB |
@ -14,7 +14,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import logoImg from '@/assets/logo/logo.png'
|
||||
import logoImg from '@/assets/logo/st_logo2.png'
|
||||
|
||||
export default {
|
||||
name: 'SidebarLogo',
|
||||
@ -26,7 +26,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '管理系统',
|
||||
title: '胜唐管理系统',
|
||||
logo: logoImg
|
||||
}
|
||||
}
|
||||
|
@ -34,8 +34,10 @@
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<div><span style="color:#E6A23C;font-family:PingFang SC">
|
||||
注意事项:
|
||||
<br/>1、2021年1月开始的订单才开始按天计算提成</span></div>
|
||||
<el-row :gutter="10" class="mb8" style="margin-top:10px;">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
|
@ -1,15 +1,15 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" >
|
||||
<el-form-item label="客户姓名" prop="customer">
|
||||
<el-form-item label="客户信息" prop="customer">
|
||||
<el-input
|
||||
v-model="queryParams.customer"
|
||||
placeholder="请输入客户姓名"
|
||||
placeholder="请输入客户姓名或手机号"
|
||||
clearable
|
||||
size="small"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="食谱开始日期范围" prop="planStartDateScope" label-width="150px">
|
||||
<el-form-item label="食谱开始日期范围" prop="planStartDateScope" label-width="130px">
|
||||
<el-date-picker
|
||||
v-model="planStartDateScope"
|
||||
type="daterange"
|
||||
@ -17,16 +17,36 @@
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="营养师" prop="nutritionistId">
|
||||
<el-select v-model="queryParams.nutritionistId" placeholder="请选择营养师" clearable size="small">
|
||||
<el-option
|
||||
v-for="dict in nutritionistIdOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="营养师助理" prop="nutritionistAssisId">
|
||||
<el-select v-model="queryParams.nutritionistAssisId" placeholder="请选择营养师助理" clearable size="small">
|
||||
<el-option
|
||||
v-for="dict in nutriAssisIdOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<div><span style="color:#E6A23C;font-family:PingFang SC">
|
||||
注意事项:
|
||||
<br/>1、2021年1月开始的订单才会自动生成食谱计划</span></div>
|
||||
<el-row :gutter="10" class="mb8" style="margin-top:10px;">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
@ -46,12 +66,14 @@
|
||||
v-hasPermi="['recipes:recipesPlan:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<!--<div><span style="margin-left:10px;font-size:16px;color:#E6A23C;font-family:PingFang SC">备注:2021年1月开始的订单才会自动生成食谱计划</span></div>-->
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="recipesPlanList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="客户姓名" align="center" prop="customer" />
|
||||
<el-table-column label="客户手机号" align="center" prop="phone" />
|
||||
<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="nutritionistAssis" />
|
||||
@ -139,6 +161,19 @@
|
||||
|
||||
<!-- 查看完整计划 -->
|
||||
<el-dialog title="食谱计划表" v-if="allRecipesPlanOpen" :visible.sync="allRecipesPlanOpen" width="800px" append-to-body>
|
||||
<el-form :model="allRecipesPlanQueryParam" ref="allPlanQueryFrom" :inline="true">
|
||||
<el-form-item label="发送状态" prop="sendFlag">
|
||||
<el-select v-model="allRecipesPlanQueryParam.sendFlag" placeholder="请选择">
|
||||
<el-option label="全部" :value="null" />
|
||||
<el-option label="未发送" :value="parseInt('0')" />
|
||||
<el-option label="已发送" :value="parseInt('1')" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="cyan" icon="el-icon-search" size="mini" @click="getAllPlanByOrderId()">搜索</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table v-loading="loading" :data="allRecipesPlanList" width="700px">
|
||||
<el-table-column label="客户姓名" align="center" prop="customer" />
|
||||
<!--<el-table-column label="营养师名称" align="center" prop="nutritionist" />
|
||||
@ -171,9 +206,9 @@
|
||||
:limit.sync="allRecipesPlanQueryParam.pageSize"
|
||||
@pagination="getAllPlanByOrderId"
|
||||
/>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="allRecipesPlanOpen = false">取 消</el-button>
|
||||
</div>
|
||||
<!--<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="allRecipesPlanOpen = false">关 闭</el-button>
|
||||
</div>-->
|
||||
</el-dialog>
|
||||
|
||||
|
||||
@ -292,9 +327,9 @@
|
||||
<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>
|
||||
<!--<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="customerOpen = false">关 闭</el-button>
|
||||
</div>-->
|
||||
</el-dialog>
|
||||
|
||||
<!-- 查看订单 -->
|
||||
@ -376,9 +411,9 @@
|
||||
</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>
|
||||
<!--<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="orderDetailOpen = false">关 闭</el-button>
|
||||
</div>-->
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
@ -386,10 +421,12 @@
|
||||
<script>
|
||||
import { listRecipesPlan, getRecipesPlan, updateRecipesPlan,exportRecipesPlan } from "@/api/custom/recipesPlan";
|
||||
import { getCustomerAndSignByPhone } from "@/api/custom/customer";
|
||||
import {getInfoDetail} from "@/api/custom/order";
|
||||
import {getInfoDetail,getOptions} from "@/api/custom/order";
|
||||
import dayjs from 'dayjs';
|
||||
import store from "@/store";
|
||||
const nextDate = dayjs().add(1, 'day').format("YYYY-MM-DD");
|
||||
const weekDate = dayjs().add(6, 'day').format("YYYY-MM-DD");
|
||||
const userId = store.getters && store.getters.userId;
|
||||
export default {
|
||||
name: "recipesPlan",
|
||||
data() {
|
||||
@ -418,7 +455,9 @@
|
||||
pageSize: 10,
|
||||
customer: null,
|
||||
startDate: null,
|
||||
endDate: null
|
||||
endDate: null,
|
||||
nutritionistId: null,
|
||||
nutritionistAssisId: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
@ -439,18 +478,42 @@
|
||||
allRecipesPlanQueryParam: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
orderId: null
|
||||
orderId: null,
|
||||
sendFlag: 0
|
||||
},
|
||||
//订单弹窗中列表数据的总条数
|
||||
allRecipesPlanTotal: 0,
|
||||
//订单详情数据
|
||||
orderDetailList:[],
|
||||
//订单详情弹窗
|
||||
orderDetailOpen:false
|
||||
orderDetailOpen:false,
|
||||
//营养师
|
||||
nutritionistIdOptions:[],
|
||||
//营养师助理
|
||||
nutriAssisIdOptions:[]
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
getOptions().then(response => {
|
||||
const options = response.data.reduce((opts, cur) => {
|
||||
if (!opts[cur.postCode]) {
|
||||
opts[cur.postCode] = [{dictValue: null, dictLabel: '全部', remark: null}];
|
||||
}
|
||||
opts[cur.postCode].push({dictValue: cur.userId, dictLabel: cur.userName, remark: cur.remark})
|
||||
return opts;
|
||||
}, {})
|
||||
this.nutritionistIdOptions = options['nutri'] || [];
|
||||
this.nutriAssisIdOptions = options['nutri_assis'] || [];
|
||||
const defaultNutritionist = this.nutritionistIdOptions.find(opt => opt.dictValue == userId);
|
||||
const defaultNutriAssisId = this.nutriAssisIdOptions.find(opt => opt.dictValue == userId);
|
||||
if(defaultNutritionist){
|
||||
this.queryParams.nutritionistId = userId;
|
||||
}
|
||||
if(defaultNutriAssisId){
|
||||
this.queryParams.nutritionistAssisId = userId;
|
||||
}
|
||||
this.getList();
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
/** 查询食谱计划列表 */
|
||||
@ -490,6 +553,11 @@
|
||||
});
|
||||
},
|
||||
getAllPlanByOrderId(){
|
||||
//console.log(this.allRecipesPlanQueryParam.sendFlag);
|
||||
//console.log(this.allRecipesPlanQueryParam.sendFlag === "");
|
||||
if(this.allRecipesPlanQueryParam.sendFlag === ""){
|
||||
this.allRecipesPlanQueryParam.sendFlag = null;
|
||||
}
|
||||
listRecipesPlan(this.allRecipesPlanQueryParam).then(response => {
|
||||
this.allRecipesPlanList = response.rows;
|
||||
this.allRecipesPlanList.forEach(function(item, index){
|
||||
|
Loading…
x
Reference in New Issue
Block a user