菜谱复制操作问题修改
This commit is contained in:
parent
01f619fab1
commit
63d955e57c
|
|
@ -1134,7 +1134,7 @@ export default {
|
|||
let index = this.recipeOptions.findIndex(v=>v.recipeId==this.dialogQueryParams.recipeId)
|
||||
let currentItem = this.recipeOptions[index]
|
||||
this.dialogQueryParams.recipeType = currentItem.recipeType
|
||||
console.log(currentItem)
|
||||
// console.log(currentItem)
|
||||
if(currentItem.recipeType==1){//日期
|
||||
this.dialogQueryParams.applyDate = currentItem.applyDateList[0]||null;
|
||||
this.pickerOptions2 = {
|
||||
|
|
@ -1155,7 +1155,11 @@ export default {
|
|||
for (let i = 0; i < response.length; i++) {
|
||||
this.dialogDetailList.forEach(item=>{
|
||||
if(item.mealtimeType==response[i].mealtimeType){
|
||||
item.dishesList = response[i].dishesList;
|
||||
response[i].dishesList.forEach(dish=>{
|
||||
this.$set(dish,'salePrice',Number(dish.price/100)||Number(dish.price/100))
|
||||
this.$set(dish,'price',Number(dish.price/100))
|
||||
});
|
||||
item.dishesList = response[i].dishesList
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -1480,10 +1484,8 @@ export default {
|
|||
mealtimeName:"夜宵",
|
||||
dishesList:[]
|
||||
}
|
||||
]
|
||||
|
||||
this.openCopyMenu = true
|
||||
|
||||
]
|
||||
this.openCopyMenu = true
|
||||
},
|
||||
//确认复制
|
||||
confirmCopyMenu(){
|
||||
|
|
@ -1589,7 +1591,7 @@ export default {
|
|||
this.$modal.confirm('所选日期数据会被覆盖!确定复制?').then(() => {
|
||||
this.checkDateList.forEach(item=>{
|
||||
let index = this.dateRangeList.findIndex(v=>v.applyDate.indexOf(item)>-1)
|
||||
this.dateRangeList[index].detailList = [
|
||||
const arr = [
|
||||
{
|
||||
mealtimeType:"1",
|
||||
mealtimeName:"早餐",
|
||||
|
|
@ -1616,6 +1618,7 @@ export default {
|
|||
dishesList:[...this.detailList[4].dishesList]
|
||||
}
|
||||
];
|
||||
this.dateRangeList[index].detailList = JSON.parse(JSON.stringify(arr))
|
||||
});
|
||||
this.$modal.msgSuccess("复制成功");
|
||||
this.openCopyDate = false
|
||||
|
|
@ -1672,7 +1675,7 @@ export default {
|
|||
this.$modal.confirm('所选日期数据会被覆盖!确定复制?').then(() => {
|
||||
this.checkWeekList.forEach(item=>{
|
||||
let index = this.weekDateList.findIndex(v=>v.applyWeek==item)
|
||||
this.weekDateList[index].detailList = [
|
||||
const arr = [
|
||||
{
|
||||
mealtimeType:"1",
|
||||
mealtimeName:"早餐",
|
||||
|
|
@ -1699,6 +1702,7 @@ export default {
|
|||
dishesList:[...this.detailList[4].dishesList]
|
||||
}
|
||||
];
|
||||
this.weekDateList[index].detailList = JSON.parse(JSON.stringify(arr))
|
||||
})
|
||||
this.$modal.msgSuccess("复制成功");
|
||||
this.openCopyWeek = false
|
||||
|
|
|
|||
|
|
@ -221,7 +221,7 @@
|
|||
<el-form :model="dialogQueryParams" ref="dialogQueryParams" size="mini" :inline="true" label-width="80px">
|
||||
<el-form-item label="所属区域" prop="areaId">
|
||||
<el-cascader v-model="dialogQueryParams.areaId"
|
||||
:options="treeAreaOptions" :filterable="true" style="width: 100%;" :show-all-levels="false"
|
||||
:options="treeAreaOptions" :filterable="true" style="width: 100%;" :show-all-levels="false" disabled
|
||||
:props="{
|
||||
emitPath: false,// 若设置 false,则只返回该节点的值,只返回最后选择的id
|
||||
checkStrictly: false,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
|
||||
|
|
@ -230,7 +230,7 @@
|
|||
</el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属食堂" prop="canteenId">
|
||||
<el-select v-model="dialogQueryParams.canteenId" clearable placeholder="请选择所属食堂" style="width: 100%;" @change="handleCanteenChange2">
|
||||
<el-select v-model="dialogQueryParams.canteenId" clearable placeholder="请选择所属食堂" disabled style="width: 100%;" @change="handleCanteenChange2">
|
||||
<el-option v-for="item in canteenOptions2"
|
||||
:key="item.canteenId"
|
||||
:label="item.canteenName"
|
||||
|
|
@ -1342,6 +1342,10 @@ export default {
|
|||
for (let i = 0; i < response.length; i++) {
|
||||
this.dialogDetailList.forEach(item=>{
|
||||
if(item.mealtimeType==response[i].mealtimeType){
|
||||
response[i].dishesList.forEach(dish=>{
|
||||
this.$set(dish,'salePrice',Number(dish.price/100)||Number(dish.price/100))
|
||||
this.$set(dish,'price',Number(dish.price/100))
|
||||
});
|
||||
item.dishesList = response[i].dishesList;
|
||||
}
|
||||
})
|
||||
|
|
@ -1631,6 +1635,15 @@ export default {
|
|||
applyDate:null,
|
||||
applyWeek:null,
|
||||
}
|
||||
this.dialogQueryParams.areaId = this.baseInfo.areaId;
|
||||
this.handleAreaChange2()
|
||||
setTimeout(()=>{
|
||||
this.dialogQueryParams.canteenId = this.baseInfo.canteenId;
|
||||
this.handleCanteenChange2()
|
||||
},200)
|
||||
setTimeout(()=>{
|
||||
this.dialogQueryParams.stallId = this.baseInfo.stallId;
|
||||
},400)
|
||||
this.$set(this.dialogQueryParams,"applyWeek",1)
|
||||
this.dialogDetailList = [
|
||||
{
|
||||
|
|
@ -1766,7 +1779,7 @@ export default {
|
|||
this.$modal.confirm('所选日期数据会被覆盖!确定复制?').then(() => {
|
||||
this.checkDateList.forEach(item=>{
|
||||
let index = this.dateRangeList.findIndex(v=>v.applyDate.indexOf(item)>-1)
|
||||
this.dateRangeList[index].detailList = [
|
||||
const arr = [
|
||||
{
|
||||
mealtimeType:"1",
|
||||
mealtimeName:"早餐",
|
||||
|
|
@ -1793,6 +1806,7 @@ export default {
|
|||
dishesList:[...this.detailList[4].dishesList]
|
||||
}
|
||||
];
|
||||
this.dateRangeList[index].detailList = JSON.parse(JSON.stringify(arr))
|
||||
});
|
||||
this.$modal.msgSuccess("复制成功");
|
||||
this.openCopyDate = false
|
||||
|
|
@ -1848,7 +1862,7 @@ export default {
|
|||
this.$modal.confirm('所选日期数据会被覆盖!确定复制?').then(() => {
|
||||
this.checkWeekList.forEach(item=>{
|
||||
let index = this.weekDateList.findIndex(v=>v.applyWeek==item)
|
||||
this.weekDateList[index].detailList = [
|
||||
const arr = [
|
||||
{
|
||||
mealtimeType:"1",
|
||||
mealtimeName:"早餐",
|
||||
|
|
@ -1875,6 +1889,7 @@ export default {
|
|||
dishesList:[...this.detailList[4].dishesList]
|
||||
}
|
||||
];
|
||||
this.weekDateList[index].detailList = JSON.parse(JSON.stringify(arr))
|
||||
})
|
||||
this.$modal.msgSuccess("复制成功");
|
||||
this.openCopyWeek = false
|
||||
|
|
|
|||
Loading…
Reference in New Issue