Merge branch 'develop' of https://gitee.com/darlk/ShengTangManage into xzj
This commit is contained in:
commit
77148e9067
@ -14,7 +14,7 @@
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['orderPause:pause:add']"
|
||||
v-hasPermi="['recipes:pause:add']"
|
||||
>新增</el-button
|
||||
>
|
||||
</el-col>
|
||||
@ -24,7 +24,7 @@
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['orderPause:pause:export']"
|
||||
v-hasPermi="['recipes:pause:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>
|
||||
@ -96,7 +96,7 @@
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['orderPause:pause:edit']"
|
||||
v-hasPermi="['recipes:pause:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
@ -104,7 +104,7 @@
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['orderPause:pause:remove']"
|
||||
v-hasPermi="['recipes:pause:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
|
@ -247,17 +247,10 @@
|
||||
:summary-method="getSummaries"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column prop="name" label="食材"></el-table-column>
|
||||
<el-table-column label="通俗计量">
|
||||
<el-table-column prop="name" label="食材" align="center" />
|
||||
<el-table-column label="通俗计量" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span class="cus-unit">
|
||||
<!-- <el-input-number
|
||||
v-model="scope.row.cusWeight"
|
||||
size="mini"
|
||||
controls-position="right"
|
||||
step="0.5"
|
||||
:min="0.5"
|
||||
/> -->
|
||||
<el-select size="mini" v-model="scope.row.cusWeight">
|
||||
<el-option
|
||||
v-for="dict in cusWeightOptions"
|
||||
@ -277,7 +270,7 @@
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="weight" label="重量(g)">
|
||||
<el-table-column prop="weight" label="重量(g)" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number
|
||||
class="weight"
|
||||
@ -290,11 +283,31 @@
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="proteinRatio" label="蛋白质/100g">
|
||||
</el-table-column>
|
||||
<el-table-column prop="fatRatio" label="脂肪/100g">
|
||||
</el-table-column>
|
||||
<el-table-column prop="carbonRatio" label="碳水/100g">
|
||||
<el-table-column
|
||||
prop="proteinRatio"
|
||||
label="蛋白质/100g"
|
||||
align="center"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="fatRatio"
|
||||
label="脂肪/100g"
|
||||
align="center"
|
||||
/>
|
||||
<el-table-column
|
||||
prop="carbonRatio"
|
||||
label="碳水/100g"
|
||||
align="center"
|
||||
/>
|
||||
<el-table-column label="热量/100g" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{
|
||||
`${(
|
||||
scope.row.proteinRatio * 4 +
|
||||
scope.row.fatRatio * 9 +
|
||||
scope.row.carbonRatio * 4
|
||||
).toFixed(1)} kcal`
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
|
@ -97,12 +97,10 @@
|
||||
size="mini"
|
||||
@click="handleQuery"
|
||||
>搜索
|
||||
</el-button
|
||||
>
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||
>重置
|
||||
</el-button
|
||||
>
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
@ -179,6 +177,17 @@
|
||||
align="center"
|
||||
prop="carbonRatio"
|
||||
/>
|
||||
<el-table-column label="每百克热量(千卡)" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
{{
|
||||
(
|
||||
scope.row.proteinRatio * 4 +
|
||||
scope.row.fatRatio * 9 +
|
||||
scope.row.carbonRatio * 4
|
||||
).toFixed(1)
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="地域"
|
||||
align="center"
|
||||
@ -591,8 +600,7 @@
|
||||
this.getList();
|
||||
this.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(function () {
|
||||
});
|
||||
.catch(function () {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
@ -608,12 +616,11 @@
|
||||
.then((response) => {
|
||||
this.download(response.msg);
|
||||
})
|
||||
.catch(function () {
|
||||
});
|
||||
.catch(function () {});
|
||||
},
|
||||
string2Arr(str) {
|
||||
return str ? str.split(',') : []
|
||||
}
|
||||
return str ? str.split(",") : [];
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user