Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
P
park-ui
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
huang
park-ui
Commits
7f782850
提交
7f782850
authored
6月 23, 2020
作者:
350505825@qq.com
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
将单位改为分
上级
495b1df9
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
129 行增加
和
26 行删除
+129
-26
index.vue
src/views/recipe/recipeSetting/index.vue
+99
-20
index.vue
src/views/rule/deduction/index.vue
+30
-6
没有找到文件。
src/views/recipe/recipeSetting/index.vue
浏览文件 @
7f782850
...
...
@@ -11,9 +11,22 @@
<el-table
v-loading=
"loading"
:data=
"recipeWeek"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"40"
align=
"center"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"日期"
align=
"center"
prop=
"week"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"早餐"
align=
"center"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"午饭"
align=
"center"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"晚餐"
align=
"center"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"早餐"
align=
"center"
:show-overflow-tooltip=
"true"
>
<template
slot-scope=
"scope"
>
<div
v-for=
"item in scope.row.breakfast"
style=
"margin-left: 10px"
>
{{
item
}}
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"午餐"
align=
"center"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<div
v-for=
"item in scope.row.lunch"
style=
"margin-left: 10px"
>
{{
item
}}
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"晚餐"
align=
"center"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<div
v-for=
"item in scope.row.supper"
style=
"margin-left: 10px"
>
{{
item
}}
</div>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -27,7 +40,7 @@
<el-select
v-model=
"recipe.recipeType"
placeholder=
"请选择"
style=
"width: 25%"
>
<el-option
v-for=
"item in recipeType"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
<el-input
v-model=
"recipe.
c
ontent"
style=
"width: 50%"
></el-input>
<el-input
v-model=
"recipe.
foodC
ontent"
style=
"width: 50%"
></el-input>
<el-button
@
click
.
prevent=
"removeBfRow(recipe)"
>
删除
</el-button>
</el-form-item>
<el-form-item>
...
...
@@ -42,7 +55,7 @@
<el-select
v-model=
"recipe.recipeType"
placeholder=
"请选择"
style=
"width: 25%"
>
<el-option
v-for=
"item in recipeType"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
<el-input
v-model=
"recipe.
c
ontent"
style=
"width: 50%"
></el-input>
<el-input
v-model=
"recipe.
foodC
ontent"
style=
"width: 50%"
></el-input>
<el-button
@
click
.
prevent=
"removeLunchRow(recipe)"
>
删除
</el-button>
</el-form-item>
<el-form-item>
...
...
@@ -57,7 +70,7 @@
<el-select
v-model=
"recipe.recipeType"
placeholder=
"请选择"
style=
"width: 25%"
>
<el-option
v-for=
"item in recipeType"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
>
</el-option>
</el-select>
<el-input
v-model=
"recipe.
c
ontent"
style=
"width: 50%"
></el-input>
<el-input
v-model=
"recipe.
foodC
ontent"
style=
"width: 50%"
></el-input>
<el-button
@
click
.
prevent=
"removeSupperRow(recipe)"
>
删除
</el-button>
</el-form-item>
<el-form-item>
...
...
@@ -97,25 +110,47 @@
currentWeek
:
''
,
//当前选择的星期
recipeWeek
:
[
{
"week"
:
"星期一"
"week"
:
"星期一"
,
"breakfast"
:[],
"lunch"
:[],
"supper"
:
[]
},
{
"week"
:
"星期二"
"week"
:
"星期二"
,
"breakfast"
:[],
"lunch"
:[],
"supper"
:
[]
},
{
"week"
:
"星期三"
"week"
:
"星期三"
,
"breakfast"
:[],
"lunch"
:[],
"supper"
:
[]
},
{
"week"
:
"星期四"
"week"
:
"星期四"
,
"breakfast"
:[],
"lunch"
:[],
"supper"
:
[]
},
{
"week"
:
"星期五"
"week"
:
"星期五"
,
"breakfast"
:[],
"lunch"
:[],
"supper"
:
[]
},
{
"week"
:
"星期六"
"week"
:
"星期六"
,
"breakfast"
:[],
"lunch"
:[],
"supper"
:
[]
},
{
"week"
:
"星期日"
"week"
:
"星期日"
,
"breakfast"
:[],
"lunch"
:[],
"supper"
:
[]
}
],
// 所有菜谱类型列表
title
:
""
,
// 弹出层标题
...
...
@@ -133,21 +168,21 @@
breakfastForm
:
{
period
:
'早餐'
,
recipes
:
[{
c
ontent
:
''
,
foodC
ontent
:
''
,
recipeType
:
''
}]
},
lunchForm
:
{
period
:
'午餐'
,
recipes
:
[{
c
ontent
:
''
,
foodC
ontent
:
''
,
recipeType
:
''
}]
},
supperForm
:
{
period
:
'晚餐'
,
recipes
:
[{
c
ontent
:
''
,
foodC
ontent
:
''
,
recipeType
:
''
}]
},
...
...
@@ -176,10 +211,48 @@
//获取菜谱列表
getRecipeList
(){
getRecipeList
().
then
(
response
=>
{
if
(
response
.
code
===
200
){
//菜谱列表
this
.
recipeWeek
=
response
.
rows
;
this
.
recipeWeek
[
0
].
breakfast
=
this
.
getContent
(
response
.
data
.
星期一
.
早餐
)
this
.
recipeWeek
[
0
].
lunch
=
this
.
getContent
(
response
.
data
.
星期一
.
午餐
)
this
.
recipeWeek
[
0
].
supper
=
this
.
getContent
(
response
.
data
.
星期一
.
晚餐
)
this
.
recipeWeek
[
1
].
breakfast
=
this
.
getContent
(
response
.
data
.
星期二
.
早餐
)
this
.
recipeWeek
[
1
].
lunch
=
this
.
getContent
(
response
.
data
.
星期二
.
午餐
)
this
.
recipeWeek
[
1
].
supper
=
this
.
getContent
(
response
.
data
.
星期二
.
晚餐
)
this
.
recipeWeek
[
2
].
breakfast
=
this
.
getContent
(
response
.
data
.
星期三
.
早餐
)
this
.
recipeWeek
[
2
].
lunch
=
this
.
getContent
(
response
.
data
.
星期三
.
午餐
)
this
.
recipeWeek
[
2
].
supper
=
this
.
getContent
(
response
.
data
.
星期三
.
晚餐
)
this
.
recipeWeek
[
3
].
breakfast
=
this
.
getContent
(
response
.
data
.
星期四
.
早餐
)
this
.
recipeWeek
[
3
].
lunch
=
this
.
getContent
(
response
.
data
.
星期四
.
午餐
)
this
.
recipeWeek
[
3
].
supper
=
this
.
getContent
(
response
.
data
.
星期四
.
晚餐
)
this
.
recipeWeek
[
4
].
breakfast
=
this
.
getContent
(
response
.
data
.
星期五
.
早餐
)
this
.
recipeWeek
[
4
].
lunch
=
this
.
getContent
(
response
.
data
.
星期五
.
午餐
)
this
.
recipeWeek
[
4
].
supper
=
this
.
getContent
(
response
.
data
.
星期五
.
晚餐
)
this
.
recipeWeek
[
5
].
breakfast
=
this
.
getContent
(
response
.
data
.
星期六
.
早餐
)
this
.
recipeWeek
[
5
].
lunch
=
this
.
getContent
(
response
.
data
.
星期六
.
午餐
)
this
.
recipeWeek
[
5
].
supper
=
this
.
getContent
(
response
.
data
.
星期六
.
晚餐
)
this
.
recipeWeek
[
6
].
breakfast
=
this
.
getContent
(
response
.
data
.
星期日
.
早餐
)
this
.
recipeWeek
[
6
].
lunch
=
this
.
getContent
(
response
.
data
.
星期日
.
午餐
)
this
.
recipeWeek
[
6
].
supper
=
this
.
getContent
(
response
.
data
.
星期日
.
晚餐
)
this
.
loading
=
false
}
})
},
getContent
(
dataArr
){
let
arr
=
{}
for
(
let
i
=
0
;
i
<
dataArr
.
length
;
i
++
)
{
arr
[
i
]
=
dataArr
[
i
].
recipeType
+
":"
+
dataArr
[
i
].
foodContent
}
return
arr
},
// 取消按钮
cancel
()
{
this
.
open
=
false
;
...
...
@@ -203,12 +276,16 @@
handleUpdate
(
row
)
{
//清空表单
this
.
reset
();
const
week
=
this
.
weeks
[
0
]
const
week
=
this
.
currentWeek
getRecipeByWeek
(
week
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"修改菜谱类型"
;
this
.
breakfastForm
.
recipes
=
response
.
data
.
bf
this
.
lunchForm
.
recipes
=
response
.
data
.
lunch
this
.
supperForm
.
recipes
=
response
.
data
.
supper
});
},
/** 提交按钮 */
...
...
@@ -221,7 +298,9 @@
}
updateRecipeWeek
(
this
.
currentWeek
,
data
).
then
(
response
=>
{
if
(
response
.
code
==
200
){
this
.
open
=
false
;
this
.
loading
=
true
this
.
open
=
false
this
.
getRecipeList
()
}
})
},
...
...
src/views/rule/deduction/index.vue
浏览文件 @
7f782850
...
...
@@ -11,12 +11,12 @@
<el-table
v-loading=
"loading"
:data=
"list"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"40"
align=
"center"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"部门"
align=
"center"
prop=
"planName"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"早餐基本餐"
align=
"center"
prop=
"breakfastBasePrice"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"早餐客餐"
align=
"center"
prop=
"breakfastFormalPrice"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"午餐基本餐"
align=
"center"
prop=
"lunchBasePrice"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"午餐客餐"
align=
"center"
prop=
"lunchFormalPrice"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"晚餐基本餐"
align=
"center"
prop=
"supperBasePrice"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"晚餐客餐"
align=
"center"
prop=
"supperFormalPrice"
:show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"早餐基本餐"
align=
"center"
prop=
"breakfastBasePrice"
:
formatter=
"formatterBreakfastBasePrice"
:
show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"早餐客餐"
align=
"center"
prop=
"breakfastFormalPrice"
:
formatter=
"formatterBreakfastFormalPrice"
:
show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"午餐基本餐"
align=
"center"
prop=
"lunchBasePrice"
:
formatter=
"formatterLunchBasePrice"
:
show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"午餐客餐"
align=
"center"
prop=
"lunchFormalPrice"
:
formatter=
"formatterLunchFormalPrice"
:
show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"晚餐基本餐"
align=
"center"
prop=
"supperBasePrice"
:
formatter=
"formatterSupperBasePrice"
:
show-overflow-tooltip=
"true"
/>
<el-table-column
label=
"晚餐客餐"
align=
"center"
prop=
"supperFormalPrice"
:
formatter=
"formattersupperFormalPrice"
:
show-overflow-tooltip=
"true"
/>
</el-table>
<!--分页按钮组-->
...
...
@@ -105,6 +105,24 @@
this
.
getList
();
},
methods
:
{
formatterBreakfastBasePrice
(
row
,
column
)
{
return
row
.
breakfastBasePrice
/
100
;
},
formatterBreakfastFormalPrice
(
row
,
column
)
{
return
row
.
breakfastFormalPrice
/
100
;
},
formatterLunchBasePrice
(
row
,
column
)
{
return
row
.
lunchBasePrice
/
100
;
},
formatterLunchFormalPrice
(
row
,
column
)
{
return
row
.
lunchFormalPrice
/
100
;
},
formatterSupperBasePrice
(
row
,
column
)
{
return
row
.
supperBasePrice
/
100
;
},
formattersupperFormalPrice
(
row
,
column
)
{
return
row
.
supperFormalPrice
/
100
;
},
/** 获取部门扣费方案 */
getList
()
{
this
.
loading
=
true
;
...
...
@@ -149,6 +167,12 @@
if
(
valid
)
{
if
(
this
.
form
.
id
!==
undefined
)
{
this
.
form
.
breakfastBasePrice
=
this
.
form
.
breakfastBasePrice
*
100
this
.
form
.
breakfastFormalPrice
=
this
.
form
.
breakfastFormalPrice
*
100
this
.
form
.
lunchBasePrice
=
this
.
form
.
lunchBasePrice
*
100
this
.
form
.
lunchFormalPrice
=
this
.
form
.
lunchFormalPrice
*
100
this
.
form
.
supperBasePrice
=
this
.
form
.
supperBasePrice
*
100
this
.
form
.
supperFormalPrice
=
this
.
form
.
supperFormalPrice
*
100
updateDeduction
(
this
.
form
).
then
(
response
=>
{
if
(
response
.
code
===
200
)
{
this
.
msgSuccess
(
"修改成功"
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论