commit
60116b6eae
@ -26,6 +26,8 @@ public class SysRecipesPlan extends BaseEntity
|
|||||||
//@Excel(name = "订单ID")
|
//@Excel(name = "订单ID")
|
||||||
private Long orderId;
|
private Long orderId;
|
||||||
|
|
||||||
|
private Long cusId;
|
||||||
|
|
||||||
//客户ID
|
//客户ID
|
||||||
private Long customerId;
|
private Long customerId;
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by" />
|
||||||
<result property="delFlag" column="del_flag" />
|
<result property="delFlag" column="del_flag" />
|
||||||
|
<result property="cusId" column="cus_id" />
|
||||||
<!-- 非持久化字段 -->
|
<!-- 非持久化字段 -->
|
||||||
<result property="customerId" column="cus_id"></result><!-- 客户ID -->
|
<result property="customerId" column="cus_id"></result><!-- 客户ID -->
|
||||||
<result property="customer" column="customer" /><!-- 客户姓名 -->
|
<result property="customer" column="customer" /><!-- 客户姓名 -->
|
||||||
|
@ -75,15 +75,9 @@ const mutations = {
|
|||||||
|
|
||||||
const actions = {
|
const actions = {
|
||||||
async init({ commit, dispatch }, payload) {
|
async init({ commit, dispatch }, payload) {
|
||||||
const orderResult = await getOrder(payload.cusId);
|
// console.log(payload);
|
||||||
if (!orderResult.data.cusId) {
|
//
|
||||||
throw new Error("未找到用户id");
|
commit("updateStateData", payload);
|
||||||
}
|
|
||||||
|
|
||||||
commit("updateStateData", {
|
|
||||||
...payload,
|
|
||||||
cusId: orderResult.data.cusId
|
|
||||||
});
|
|
||||||
//
|
//
|
||||||
getDicts("cus_cus_unit").then(response => {
|
getDicts("cus_cus_unit").then(response => {
|
||||||
commit("updateStateData", { cusUnitOptions: response.data });
|
commit("updateStateData", { cusUnitOptions: response.data });
|
||||||
@ -99,8 +93,8 @@ const actions = {
|
|||||||
});
|
});
|
||||||
|
|
||||||
//
|
//
|
||||||
if (orderResult.data.cusId) {
|
if (payload.cusId) {
|
||||||
dispatch("getHealthyData", { cusId: orderResult.data.cusId });
|
dispatch("getHealthyData", payload);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 食谱数据
|
// 食谱数据
|
||||||
|
@ -242,7 +242,7 @@ export default {
|
|||||||
}
|
}
|
||||||
return arr;
|
return arr;
|
||||||
}, []);
|
}, []);
|
||||||
console.log(mData);
|
// console.log(mData);
|
||||||
return mData;
|
return mData;
|
||||||
},
|
},
|
||||||
...mapGetters(["typeDict"]),
|
...mapGetters(["typeDict"]),
|
||||||
@ -277,7 +277,7 @@ export default {
|
|||||||
this.deleteDishes({ num: this.num - 1, id: data.id });
|
this.deleteDishes({ num: this.num - 1, id: data.id });
|
||||||
},
|
},
|
||||||
handleOnWeightChange(data, weight) {
|
handleOnWeightChange(data, weight) {
|
||||||
console.log({ data, weight });
|
// console.log({ data, weight });
|
||||||
this.updateDishes({
|
this.updateDishes({
|
||||||
num: this.num - 1,
|
num: this.num - 1,
|
||||||
dishesId: data.dishesId,
|
dishesId: data.dishesId,
|
||||||
@ -286,7 +286,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleOnCustomUnitChange(data, { cusWeight, cusUnit }) {
|
handleOnCustomUnitChange(data, { cusWeight, cusUnit }) {
|
||||||
console.log({ data, cusWeight, cusUnit });
|
// console.log({ data, cusWeight, cusUnit });
|
||||||
this.updateDishes({
|
this.updateDishes({
|
||||||
num: this.num - 1,
|
num: this.num - 1,
|
||||||
dishesId: data.dishesId,
|
dishesId: data.dishesId,
|
||||||
|
@ -607,7 +607,7 @@ export default {
|
|||||||
},
|
},
|
||||||
handleBuild(data) {
|
handleBuild(data) {
|
||||||
// console.log(data);
|
// console.log(data);
|
||||||
const { startDate, endDate, id, orderId, recipesId } = data;
|
const { startDate, endDate, id, cusId, recipesId } = data;
|
||||||
|
|
||||||
// const params = { id: data.id, cusId: data.orderId };
|
// const params = { id: data.id, cusId: data.orderId };
|
||||||
// const path = `/recipes/build/${orderId}/${id}/${recipesId || 0}`;
|
// const path = `/recipes/build/${orderId}/${id}/${recipesId || 0}`;
|
||||||
@ -617,7 +617,7 @@ export default {
|
|||||||
// });
|
// });
|
||||||
const queryParam = {
|
const queryParam = {
|
||||||
planId: id,
|
planId: id,
|
||||||
cusId: orderId,
|
cusId,
|
||||||
};
|
};
|
||||||
if (!recipesId) {
|
if (!recipesId) {
|
||||||
queryParam.startDate = startDate;
|
queryParam.startDate = startDate;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user