Merge branches 'master' and 'xzj' of https://gitee.com/darlk/ShengTangManage into xzj
This commit is contained in:
commit
41d8df3895
@ -1,19 +1,19 @@
|
|||||||
package com.stdiet.web.controller.custom;
|
package com.stdiet.web.controller.custom;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import com.stdiet.common.utils.StringUtils;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
import com.stdiet.common.annotation.Log;
|
import com.stdiet.common.annotation.Log;
|
||||||
import com.stdiet.common.core.controller.BaseController;
|
import com.stdiet.common.core.controller.BaseController;
|
||||||
import com.stdiet.common.core.domain.AjaxResult;
|
import com.stdiet.common.core.domain.AjaxResult;
|
||||||
|
import com.stdiet.common.core.page.TableDataInfo;
|
||||||
import com.stdiet.common.enums.BusinessType;
|
import com.stdiet.common.enums.BusinessType;
|
||||||
|
import com.stdiet.common.utils.StringUtils;
|
||||||
|
import com.stdiet.common.utils.poi.ExcelUtil;
|
||||||
import com.stdiet.custom.domain.SysRecipesPlan;
|
import com.stdiet.custom.domain.SysRecipesPlan;
|
||||||
import com.stdiet.custom.service.ISysRecipesPlanService;
|
import com.stdiet.custom.service.ISysRecipesPlanService;
|
||||||
import com.stdiet.common.utils.poi.ExcelUtil;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import com.stdiet.common.core.page.TableDataInfo;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 食谱计划Controller
|
* 食谱计划Controller
|
||||||
@ -23,8 +23,7 @@ import com.stdiet.common.core.page.TableDataInfo;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/recipes/recipesPlan")
|
@RequestMapping("/recipes/recipesPlan")
|
||||||
public class SysRecipesPlanController extends BaseController
|
public class SysRecipesPlanController extends BaseController {
|
||||||
{
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysRecipesPlanService sysRecipesPlanService;
|
private ISysRecipesPlanService sysRecipesPlanService;
|
||||||
|
|
||||||
@ -33,25 +32,29 @@ public class SysRecipesPlanController extends BaseController
|
|||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('recipes:plan:list')")
|
@PreAuthorize("@ss.hasPermi('recipes:plan:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(SysRecipesPlan sysRecipesPlan)
|
public TableDataInfo list(SysRecipesPlan sysRecipesPlan) {
|
||||||
{
|
|
||||||
startPage();
|
startPage();
|
||||||
List<SysRecipesPlan> list = sysRecipesPlanService.selectPlanListByCondition(sysRecipesPlan);
|
List<SysRecipesPlan> list = sysRecipesPlanService.selectPlanListByCondition(sysRecipesPlan);
|
||||||
for(SysRecipesPlan plan : list){
|
for (SysRecipesPlan plan : list) {
|
||||||
if(StringUtils.isNotEmpty(plan.getPhone())){
|
if (StringUtils.isNotEmpty(plan.getPhone())) {
|
||||||
plan.setHidePhone(StringUtils.hiddenPhoneNumber(plan.getPhone()));
|
plan.setHidePhone(StringUtils.hiddenPhoneNumber(plan.getPhone()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("@ss.hasPermi('recipes:plan:add')")
|
||||||
|
@PostMapping("/add")
|
||||||
|
public AjaxResult add(@RequestBody SysRecipesPlan sysRecipesPlan) {
|
||||||
|
return toAjax(sysRecipesPlanService.insertSysRecipesPlan(sysRecipesPlan));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据订单查询完整食谱计划列表
|
* 根据订单查询完整食谱计划列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('recipes:plan:list')")
|
@PreAuthorize("@ss.hasPermi('recipes:plan:list')")
|
||||||
@GetMapping("/getAllPlanByOrderId")
|
@GetMapping("/getAllPlanByOrderId")
|
||||||
public TableDataInfo getAllPlanByOrderId(SysRecipesPlan sysRecipesPlan)
|
public TableDataInfo getAllPlanByOrderId(SysRecipesPlan sysRecipesPlan) {
|
||||||
{
|
|
||||||
startPage();
|
startPage();
|
||||||
List<SysRecipesPlan> list = sysRecipesPlanService.selectPlanListByOrderId(sysRecipesPlan);
|
List<SysRecipesPlan> list = sysRecipesPlanService.selectPlanListByOrderId(sysRecipesPlan);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
@ -68,8 +71,7 @@ public class SysRecipesPlanController extends BaseController
|
|||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('recipes:plan:query')")
|
@PreAuthorize("@ss.hasPermi('recipes:plan:query')")
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||||
{
|
|
||||||
return AjaxResult.success(sysRecipesPlanService.selectSysRecipesPlanById(id));
|
return AjaxResult.success(sysRecipesPlanService.selectSysRecipesPlanById(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,8 +81,7 @@ public class SysRecipesPlanController extends BaseController
|
|||||||
@PreAuthorize("@ss.hasPermi('recipes:plan:edit')")
|
@PreAuthorize("@ss.hasPermi('recipes:plan:edit')")
|
||||||
@Log(title = "食谱计划", businessType = BusinessType.UPDATE)
|
@Log(title = "食谱计划", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody SysRecipesPlan sysRecipesPlan)
|
public AjaxResult edit(@RequestBody SysRecipesPlan sysRecipesPlan) {
|
||||||
{
|
|
||||||
return toAjax(sysRecipesPlanService.updateSysRecipesPlan(sysRecipesPlan));
|
return toAjax(sysRecipesPlanService.updateSysRecipesPlan(sysRecipesPlan));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,11 +91,10 @@ public class SysRecipesPlanController extends BaseController
|
|||||||
@PreAuthorize("@ss.hasPermi('recipes:plan:export')")
|
@PreAuthorize("@ss.hasPermi('recipes:plan:export')")
|
||||||
@Log(title = "食谱计划", businessType = BusinessType.EXPORT)
|
@Log(title = "食谱计划", businessType = BusinessType.EXPORT)
|
||||||
@GetMapping("/export")
|
@GetMapping("/export")
|
||||||
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){
|
for (SysRecipesPlan plan : list) {
|
||||||
if(StringUtils.isNotEmpty(plan.getPhone())){
|
if (StringUtils.isNotEmpty(plan.getPhone())) {
|
||||||
plan.setHidePhone(StringUtils.hiddenPhoneNumber(plan.getPhone()));
|
plan.setHidePhone(StringUtils.hiddenPhoneNumber(plan.getPhone()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -39,6 +39,8 @@ public class SysCustomer extends BaseEntity
|
|||||||
@Excel(name = "进粉日期", width = 30, dateFormat = "yyyy-MM-dd")
|
@Excel(name = "进粉日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
private Date fansTime;
|
private Date fansTime;
|
||||||
|
|
||||||
|
private Integer fansChannel;
|
||||||
|
|
||||||
/** 邮箱 */
|
/** 邮箱 */
|
||||||
@Excel(name = "邮箱")
|
@Excel(name = "邮箱")
|
||||||
private String email;
|
private String email;
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
<result property="payDate" column="pay_date" />
|
<result property="payDate" column="pay_date" />
|
||||||
<result property="startDate" column="start_date" />
|
<result property="startDate" column="start_date" />
|
||||||
<result property="fansTime" column="fans_time" />
|
<result property="fansTime" column="fans_time" />
|
||||||
|
<result property="fansChannel" column="fans_channel" />
|
||||||
<result property="purchaseNum" column="purchase_num" />
|
<result property="purchaseNum" column="purchase_num" />
|
||||||
<result property="payTotal" column="pay_total" />
|
<result property="payTotal" column="pay_total" />
|
||||||
<result property="mainDietitian" column="main_dietitian" />
|
<result property="mainDietitian" column="main_dietitian" />
|
||||||
@ -28,7 +29,7 @@
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectSysCustomerVo">
|
<sql id="selectSysCustomerVo">
|
||||||
select id, name, phone, email, fans_time, address, pay_date, start_date, purchase_num, pay_total, main_dietitian, assistant_dietitian, after_dietitian, salesman, charge_person, follow_status, create_time, create_by, update_time, update_by from sys_customer
|
select id, name, phone, email, fans_time, fans_channel, address, pay_date, start_date, purchase_num, pay_total, main_dietitian, assistant_dietitian, after_dietitian, salesman, charge_person, follow_status, create_time, create_by, update_time, update_by from sys_customer
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectSysCustomerList" parameterType="SysCustomer" resultMap="SysCustomerResult">
|
<select id="selectSysCustomerList" parameterType="SysCustomer" resultMap="SysCustomerResult">
|
||||||
@ -50,6 +51,7 @@
|
|||||||
<if test="name != null">name,</if>
|
<if test="name != null">name,</if>
|
||||||
<if test="phone != null">phone,</if>
|
<if test="phone != null">phone,</if>
|
||||||
<if test="fansTime != null">fans_time,</if>
|
<if test="fansTime != null">fans_time,</if>
|
||||||
|
<if test="fansChannel != null">fans_channel,</if>
|
||||||
<if test="email != null">email,</if>
|
<if test="email != null">email,</if>
|
||||||
<if test="address != null">address,</if>
|
<if test="address != null">address,</if>
|
||||||
<if test="payDate != null">pay_date,</if>
|
<if test="payDate != null">pay_date,</if>
|
||||||
@ -71,6 +73,7 @@
|
|||||||
<if test="name != null">#{name},</if>
|
<if test="name != null">#{name},</if>
|
||||||
<if test="phone != null">#{phone},</if>
|
<if test="phone != null">#{phone},</if>
|
||||||
<if test="fansTime != null">#{fansTime},</if>
|
<if test="fansTime != null">#{fansTime},</if>
|
||||||
|
<if test="fansChannel != null">#{fansChannel},</if>
|
||||||
<if test="email != null">#{email},</if>
|
<if test="email != null">#{email},</if>
|
||||||
<if test="address != null">#{address},</if>
|
<if test="address != null">#{address},</if>
|
||||||
<if test="payDate != null">#{payDate},</if>
|
<if test="payDate != null">#{payDate},</if>
|
||||||
@ -96,6 +99,7 @@
|
|||||||
<if test="name != null">name = #{name},</if>
|
<if test="name != null">name = #{name},</if>
|
||||||
<if test="phone != null">phone = #{phone},</if>
|
<if test="phone != null">phone = #{phone},</if>
|
||||||
<if test="fansTime != null">fans_time = #{fansTime},</if>
|
<if test="fansTime != null">fans_time = #{fansTime},</if>
|
||||||
|
<if test="fansChannel != null">fans_channel = #{fansChannel},</if>
|
||||||
<if test="email != null">email = #{email},</if>
|
<if test="email != null">email = #{email},</if>
|
||||||
<if test="address != null">address = #{address},</if>
|
<if test="address != null">address = #{address},</if>
|
||||||
<if test="payDate != null">pay_date = #{payDate},</if>
|
<if test="payDate != null">pay_date = #{payDate},</if>
|
||||||
|
@ -73,7 +73,7 @@
|
|||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
<if test="orderId != null">order_id,</if>
|
<if test="orderId != null">order_id,</if>
|
||||||
<if test="cusId != null">cus_id,</if>
|
<if test="cusId != null">cus_id,</if>
|
||||||
<if test="outId != null">out_id,</if>
|
<if test="cusId != null">out_id,</if>
|
||||||
<if test="startDate != null">start_date,</if>
|
<if test="startDate != null">start_date,</if>
|
||||||
<if test="endDate != null">end_date,</if>
|
<if test="endDate != null">end_date,</if>
|
||||||
<if test="startNumDay != null">start_num_day,</if>
|
<if test="startNumDay != null">start_num_day,</if>
|
||||||
@ -93,7 +93,7 @@
|
|||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="orderId != null">#{orderId},</if>
|
<if test="orderId != null">#{orderId},</if>
|
||||||
<if test="cusId != null">#{cusId},</if>
|
<if test="cusId != null">#{cusId},</if>
|
||||||
<if test="outId != null">#{outId},</if>
|
<if test="cusId != null">md5(#{cusId}),</if>
|
||||||
<if test="startDate != null">#{startDate},</if>
|
<if test="startDate != null">#{startDate},</if>
|
||||||
<if test="endDate != null">#{endDate},</if>
|
<if test="endDate != null">#{endDate},</if>
|
||||||
<if test="startNumDay != null">#{startNumDay},</if>
|
<if test="startNumDay != null">#{startNumDay},</if>
|
||||||
|
@ -9,6 +9,14 @@ export function listRecipesPlan(query) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function addRecipesPlan(data) {
|
||||||
|
return request({
|
||||||
|
url: "/recipes/recipesPlan/add",
|
||||||
|
method: "post",
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// 查询食谱计划详细
|
// 查询食谱计划详细
|
||||||
export function getRecipesPlan(id) {
|
export function getRecipesPlan(id) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -38,6 +38,14 @@
|
|||||||
<el-button icon="el-icon-view" size="mini" @click="handleInnerOpen"
|
<el-button icon="el-icon-view" size="mini" @click="handleInnerOpen"
|
||||||
>查看暂停记录
|
>查看暂停记录
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
|
v-if="fansChannel === 1"
|
||||||
|
@click="createOneDay"
|
||||||
|
>
|
||||||
|
生成1天体验计划
|
||||||
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
@ -91,12 +99,45 @@
|
|||||||
|
|
||||||
<!-- 暂停记录抽屉 -->
|
<!-- 暂停记录抽屉 -->
|
||||||
<PlanPauseDrawer ref="planPauseRef" />
|
<PlanPauseDrawer ref="planPauseRef" />
|
||||||
|
<!-- 创建计划 -->
|
||||||
|
<el-dialog
|
||||||
|
title="创建1天体验计划"
|
||||||
|
:visible.sync="open"
|
||||||
|
width="480px"
|
||||||
|
append-to-body
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
ref="form"
|
||||||
|
:model="form"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="100px"
|
||||||
|
v-loading="createLoading"
|
||||||
|
>
|
||||||
|
<el-form-item label="开始时间" prop="startDate">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.startDate"
|
||||||
|
type="date"
|
||||||
|
placeholder="选择开始时间"
|
||||||
|
format="yyyy-MM-dd"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
:picker-options="fanPickerOptions"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="handleOnCreateConfirm"
|
||||||
|
>确 定</el-button
|
||||||
|
>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import Clipboard from "clipboard";
|
import Clipboard from "clipboard";
|
||||||
import { listRecipesPlanByCusId } from "@/api/custom/recipesPlan";
|
import { listRecipesPlanByCusId } from "@/api/custom/recipesPlan";
|
||||||
|
import { addRecipesPlan } from "@/api/custom/recipesPlan";
|
||||||
import PlanPauseDrawer from "./PlanPauseDrawer";
|
import PlanPauseDrawer from "./PlanPauseDrawer";
|
||||||
import VueQr from "vue-qr";
|
import VueQr from "vue-qr";
|
||||||
const logo = require("@/assets/logo/logo_b.png");
|
const logo = require("@/assets/logo/logo_b.png");
|
||||||
@ -109,26 +150,45 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
logo,
|
logo,
|
||||||
|
open: false,
|
||||||
visible: false,
|
visible: false,
|
||||||
|
createLoading: false,
|
||||||
title: "",
|
title: "",
|
||||||
cusOutId: "",
|
cusOutId: "",
|
||||||
copyValue: "",
|
copyValue: "",
|
||||||
planLoading: false,
|
planLoading: false,
|
||||||
planList: [],
|
planList: [],
|
||||||
|
fansChannel: 0,
|
||||||
|
form: {},
|
||||||
|
rules: {
|
||||||
|
startDate: [
|
||||||
|
{ required: true, message: "开始时间不能为空", trigger: "blur" },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
fanPickerOptions: {
|
||||||
|
disabledDate(time) {
|
||||||
|
return time.getTime() < Date.now();
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showDrawer(data) {
|
showDrawer(data) {
|
||||||
// console.log(data);
|
console.log(data);
|
||||||
this.data = data;
|
this.data = data;
|
||||||
if (!this.data) {
|
if (!this.data) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.fansChannel = data.fansChannel;
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
this.title = `「${this.data.name}」食谱计划`;
|
this.title = `「${this.data.name}」食谱计划`;
|
||||||
|
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
this.planLoading = true;
|
this.planLoading = true;
|
||||||
listRecipesPlanByCusId(data.id).then((response) => {
|
listRecipesPlanByCusId(this.data.id).then((response) => {
|
||||||
this.planList = response.data;
|
this.planList = response.data;
|
||||||
this.cusOutId = response.data.reduce((str, cur) => {
|
this.cusOutId = response.data.reduce((str, cur) => {
|
||||||
if (!str && cur.recipesId && cur.reviewStatus === 2) {
|
if (!str && cur.recipesId && cur.reviewStatus === 2) {
|
||||||
@ -144,6 +204,12 @@ export default {
|
|||||||
this.planLoading = false;
|
this.planLoading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
startDate: null,
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
handleOnClosed() {
|
handleOnClosed() {
|
||||||
this.data = undefined;
|
this.data = undefined;
|
||||||
this.cusOutId = "";
|
this.cusOutId = "";
|
||||||
@ -165,6 +231,35 @@ export default {
|
|||||||
// const { id, name } = this.data;
|
// const { id, name } = this.data;
|
||||||
window.open("/recipes/build/" + this.data.name + "/" + data.id, "_blank");
|
window.open("/recipes/build/" + this.data.name + "/" + data.id, "_blank");
|
||||||
},
|
},
|
||||||
|
createOneDay() {
|
||||||
|
this.open = true;
|
||||||
|
},
|
||||||
|
handleOnCreateConfirm() {
|
||||||
|
const { id } = this.data;
|
||||||
|
this.createLoading = true;
|
||||||
|
addRecipesPlan({
|
||||||
|
cusId: id,
|
||||||
|
startNumDay: 1,
|
||||||
|
endNumDay: 1,
|
||||||
|
startDate: this.form.startDate,
|
||||||
|
endDate: this.form.startDate,
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.$message.success("创建成功");
|
||||||
|
this.getList();
|
||||||
|
}
|
||||||
|
this.createLoading = false;
|
||||||
|
this.open = false;
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.createLoading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -111,18 +111,31 @@
|
|||||||
label="创建时间"
|
label="创建时间"
|
||||||
align="center"
|
align="center"
|
||||||
prop="createTime"
|
prop="createTime"
|
||||||
width="166"
|
width="100"
|
||||||
/>
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div v-for="time in scope.row.createTime.split(' ')" :key="time">
|
||||||
|
{{ time }}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="进粉时间"
|
label="进粉时间"
|
||||||
align="center"
|
align="center"
|
||||||
prop="fansTime"
|
prop="fansTime"
|
||||||
width="120"
|
width="100"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.fansTime, "{y}-{m}-{d}") }}</span>
|
<span>{{ parseTime(scope.row.fansTime, "{y}-{m}-{d}") }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="进粉渠道"
|
||||||
|
align="center"
|
||||||
|
prop="fansChannel"
|
||||||
|
:formatter="fansChannelFormat"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="客户姓名" align="center" prop="name" />
|
<el-table-column label="客户姓名" align="center" prop="name" />
|
||||||
<el-table-column label="手机号" align="center" prop="phone" />
|
<el-table-column label="手机号" align="center" prop="phone" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@ -316,7 +329,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="24">
|
||||||
<el-form-item label="进粉时间" prop="fansTime">
|
<el-form-item label="进粉时间" prop="fansTime">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="form.fansTime"
|
v-model="form.fansTime"
|
||||||
@ -329,6 +342,18 @@
|
|||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="进粉渠道" prop="fansChannel">
|
||||||
|
<el-select v-model="form.fansChannel" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in fansChannelOptions"
|
||||||
|
:key="dict.dictValue"
|
||||||
|
:label="dict.dictLabel"
|
||||||
|
:value="parseInt(dict.dictValue)"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
@ -346,7 +371,7 @@
|
|||||||
<!-- 外食热量统计 -->
|
<!-- 外食热量统计 -->
|
||||||
<heatStatisticsDrawer ref="heatStatisticsRef"></heatStatisticsDrawer>
|
<heatStatisticsDrawer ref="heatStatisticsRef"></heatStatisticsDrawer>
|
||||||
<!-- 食谱计划抽屉 -->
|
<!-- 食谱计划抽屉 -->
|
||||||
<RecipesPlanDrawer ref="recipesPlanDrawerRef"/>
|
<RecipesPlanDrawer ref="recipesPlanDrawerRef" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -365,7 +390,7 @@ import OrderDrawer from "@/components/OrderDrawer";
|
|||||||
import PhysicalSignsDialog from "@/components/PhysicalSignsDialog";
|
import PhysicalSignsDialog from "@/components/PhysicalSignsDialog";
|
||||||
import ContractDrawer from "@/components/ContractDrawer";
|
import ContractDrawer from "@/components/ContractDrawer";
|
||||||
import HeatStatisticsDrawer from "@/components/HeatStatisticsDrawer";
|
import HeatStatisticsDrawer from "@/components/HeatStatisticsDrawer";
|
||||||
import RecipesPlanDrawer from '@/components/RecipesPlanDrawer'
|
import RecipesPlanDrawer from "@/components/RecipesPlanDrawer";
|
||||||
import { mapGetters } from "vuex";
|
import { mapGetters } from "vuex";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -375,7 +400,7 @@ export default {
|
|||||||
"physical-signs-dialog": PhysicalSignsDialog,
|
"physical-signs-dialog": PhysicalSignsDialog,
|
||||||
"contract-drawer": ContractDrawer,
|
"contract-drawer": ContractDrawer,
|
||||||
heatStatisticsDrawer: HeatStatisticsDrawer,
|
heatStatisticsDrawer: HeatStatisticsDrawer,
|
||||||
RecipesPlanDrawer
|
RecipesPlanDrawer,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
const userId = store.getters && store.getters.userId;
|
const userId = store.getters && store.getters.userId;
|
||||||
@ -395,6 +420,8 @@ export default {
|
|||||||
total: 0,
|
total: 0,
|
||||||
// 客户档案表格数据
|
// 客户档案表格数据
|
||||||
customerCenterList: [],
|
customerCenterList: [],
|
||||||
|
//
|
||||||
|
fansChannelOptions: [],
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "",
|
title: "",
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
@ -450,6 +477,9 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
this.getDicts("customer_fans_channel").then((response) => {
|
||||||
|
this.fansChannelOptions = response.data;
|
||||||
|
});
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -496,6 +526,9 @@ export default {
|
|||||||
row.assistantDietitian
|
row.assistantDietitian
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
fansChannelFormat(row, column) {
|
||||||
|
return this.selectDictLabel(this.fansChannelOptions, row.fansChannel);
|
||||||
|
},
|
||||||
handleOnOrderClick(row) {
|
handleOnOrderClick(row) {
|
||||||
this.$refs["cusOrderDrawerRef"].showDrawer(row);
|
this.$refs["cusOrderDrawerRef"].showDrawer(row);
|
||||||
},
|
},
|
||||||
@ -510,7 +543,7 @@ export default {
|
|||||||
},
|
},
|
||||||
handleOnMenuClick(row) {
|
handleOnMenuClick(row) {
|
||||||
// console.log(row);
|
// console.log(row);
|
||||||
this.$refs['recipesPlanDrawerRef'].showDrawer(row);
|
this.$refs["recipesPlanDrawerRef"].showDrawer(row);
|
||||||
},
|
},
|
||||||
handleClickHeatStatistics(row) {
|
handleClickHeatStatistics(row) {
|
||||||
this.$refs["heatStatisticsRef"].showDrawer(row);
|
this.$refs["heatStatisticsRef"].showDrawer(row);
|
||||||
@ -537,6 +570,8 @@ export default {
|
|||||||
afterDietitian: null,
|
afterDietitian: null,
|
||||||
salesman: null,
|
salesman: null,
|
||||||
chargePerson: null,
|
chargePerson: null,
|
||||||
|
fansChannel: 0,
|
||||||
|
fansTime: null,
|
||||||
followStatus: 0,
|
followStatus: 0,
|
||||||
createTime: null,
|
createTime: null,
|
||||||
createBy: null,
|
createBy: null,
|
||||||
|
@ -24,7 +24,10 @@
|
|||||||
{{ totalHeat.toFixed(1) }}千卡
|
{{ totalHeat.toFixed(1) }}千卡
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="text-align: right; margin-top: 4px">
|
<div
|
||||||
|
style="text-align: right; margin-top: 4px"
|
||||||
|
v-if="recipesData.length > 1"
|
||||||
|
>
|
||||||
<el-button size="mini" type="text" @click="backToAll"
|
<el-button size="mini" type="text" @click="backToAll"
|
||||||
>查看全部</el-button
|
>查看全部</el-button
|
||||||
>
|
>
|
||||||
@ -39,7 +42,7 @@ require("@/utils/echarts/myShine");
|
|||||||
import resize from "@/views/dashboard/mixins/resize";
|
import resize from "@/views/dashboard/mixins/resize";
|
||||||
import TextInfo from "@/components/TextInfo";
|
import TextInfo from "@/components/TextInfo";
|
||||||
import { createNamespacedHelpers } from "vuex";
|
import { createNamespacedHelpers } from "vuex";
|
||||||
const { mapMutations } = createNamespacedHelpers("recipes");
|
const { mapMutations, mapState } = createNamespacedHelpers("recipes");
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [resize],
|
mixins: [resize],
|
||||||
@ -99,6 +102,7 @@ export default {
|
|||||||
// console.log(mData);
|
// console.log(mData);
|
||||||
return mData;
|
return mData;
|
||||||
},
|
},
|
||||||
|
...mapState(["recipesData"]),
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
@ -2,10 +2,12 @@
|
|||||||
<div class="recipes_header_com_wrapper">
|
<div class="recipes_header_com_wrapper">
|
||||||
<div class="header_btns" v-loading="loading">
|
<div class="header_btns" v-loading="loading">
|
||||||
<section>
|
<section>
|
||||||
|
<div>食谱制作</div>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
v-if="!!recipesId"
|
v-if="!!recipesId"
|
||||||
type="primary"
|
type="primary"
|
||||||
|
style="margin-left: 12px"
|
||||||
icon="el-icon-document-copy"
|
icon="el-icon-document-copy"
|
||||||
@click="handleOnTemplateClick"
|
@click="handleOnTemplateClick"
|
||||||
>
|
>
|
||||||
@ -103,13 +105,11 @@ export default {
|
|||||||
],
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
updated() {
|
updated() {},
|
||||||
},
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(["recipesId", "reviewStatus", "fontSize"]),
|
...mapState(["recipesId", "reviewStatus", "fontSize"]),
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {},
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
handleOnSizeChange(fontSize) {
|
handleOnSizeChange(fontSize) {
|
||||||
this.updateFontSize({ fontSize });
|
this.updateFontSize({ fontSize });
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="template_view_wrapper">
|
<div class="template_view_wrapper">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
|
<div style="fontWeight: bold">选择模板</div>
|
||||||
<el-button size="mini" @click="handleOnBackClick">返回</el-button>
|
<el-button size="mini" @click="handleOnBackClick">返回</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<h2>选择模板</h2>
|
|
||||||
<!-- 筛选 -->
|
<!-- 筛选 -->
|
||||||
<el-form :model="queryParams" ref="queryForm" :inline="true">
|
<el-form :model="queryParams" ref="queryForm" :inline="true">
|
||||||
<el-form-item label="模板名称" prop="name">
|
<el-form-item label="模板名称" prop="name">
|
||||||
@ -116,7 +116,7 @@ export default {
|
|||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
@ -162,12 +162,13 @@ export default {
|
|||||||
.header {
|
.header {
|
||||||
height: 32px;
|
height: 32px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
.content {
|
.content {
|
||||||
height: calc(100% - 32px);
|
height: calc(100% - 32px);
|
||||||
padding-top: 12px;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user