测试问题修改,页面逻辑梳理
This commit is contained in:
parent
dfd11a9a39
commit
600db88b97
|
|
@ -5,4 +5,4 @@ VUE_APP_TITLE = 博诺思管理系统
|
|||
ENV = 'production'
|
||||
|
||||
# 博诺思管理系统/生产环境
|
||||
VUE_APP_BASE_API = '/prod-api'
|
||||
VUE_APP_BASE_API = '/dev-api'
|
||||
|
|
|
|||
|
|
@ -0,0 +1,135 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 系统区域权限树
|
||||
export function systemAreaTreeApi(data) {
|
||||
return request({
|
||||
url: '/smart-canteen/api/v2/alloc/area/system-auth/tree',
|
||||
method: 'post',
|
||||
headers: {
|
||||
"merchant-id":"378915229716713472",
|
||||
},
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
//区域食堂档口树
|
||||
export function tenantGroupAreaTreeApi(data) {
|
||||
return request({
|
||||
url: '/smart-canteen/api/v2/alloc/canteen/tenant-group-area/tree',
|
||||
method: 'post',
|
||||
headers: {
|
||||
"merchant-id":"378915229716713472",
|
||||
},
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -96,7 +96,7 @@ export default {
|
|||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
location.href = '/index';
|
||||
location.href = '/glweb/';
|
||||
})
|
||||
}).catch(() => {});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ export default {
|
|||
},
|
||||
close() {
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
location.href = '/index';
|
||||
location.href = '/glweb/';
|
||||
})
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ const service = axios.create({
|
|||
// axios中请求配置有baseURL选项,表示请求URL公共部分
|
||||
baseURL: process.env.VUE_APP_BASE_API,
|
||||
// 超时
|
||||
timeout: 10000
|
||||
timeout: 20000
|
||||
})
|
||||
|
||||
// request 拦截器
|
||||
|
|
@ -117,7 +117,7 @@ service.interceptors.response.use(res => {
|
|||
}).then(() => {
|
||||
isRelogin.show = false
|
||||
store.dispatch('LogOut').then(() => {
|
||||
location.href = '/index'
|
||||
location.href = '/glweb/'
|
||||
})
|
||||
}).catch(() => {
|
||||
isRelogin.show = false
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@
|
|||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
<el-table v-loading="loading" :data="tableListData" height="800" :span-method="objectSpanMethod">
|
||||
<el-table-column label="序号" align="center" width="80" type="index">
|
||||
<el-table-column label="序号" align="center" width="80" type="index" fixed="left">
|
||||
<template scope="scope">
|
||||
<span v-if="!scope.row.custId">合计:</span>
|
||||
<span v-else>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
|
||||
|
|
@ -130,19 +130,18 @@
|
|||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete" v-if="scope.row.accStatus==1"
|
||||
type="text" style="color: red;"
|
||||
v-if="scope.row.accStatus==1"
|
||||
@click="handleUpdateState(scope.row,2)"
|
||||
>停用</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit" v-if="scope.row.accStatus==2"
|
||||
v-if="scope.row.accStatus==2"
|
||||
@click="handleUpdateState(scope.row,1)"
|
||||
>启用</el-button>
|
||||
</template>
|
||||
|
|
@ -215,12 +214,12 @@
|
|||
<div style="margin: 10px 0;font-weight: bold;font-size: 16px;color: #000;">账户允许最低余额与有效期</div>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-form-item label="个人钱包" prop="walletLimitBalance">
|
||||
<el-input v-model="form.walletLimitBalance" placeholder="请输入允许最低余额" maxlength="30" clearable style="width: 300px;"
|
||||
@input="(v)=>(form.walletLimitBalance=Number(v.replace(/[^\d.]/g,'')))"/>
|
||||
<el-input v-model="form.walletLimitBalance" placeholder="请输入允许最低余额" maxlength="8" clearable style="width: 300px;"
|
||||
@input="(v)=>(form.walletLimitBalance=v.replace(/[^\d.]/g,''))"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="补贴钱包" prop="subLimitBalance">
|
||||
<el-input v-model="form.subLimitBalance" placeholder="请输入允许最低余额" maxlength="30" clearable style="width: 300px;"
|
||||
@input="(v)=>(form.subLimitBalance=Number(v.replace(/[^\d.]/g,'')))"/>
|
||||
<el-input v-model="form.subLimitBalance" placeholder="请输入允许最低余额" maxlength="8" clearable style="width: 300px;"
|
||||
@input="(v)=>(form.subLimitBalance=v.replace(/[^\d.]/g,''))"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="有账户有效期" prop="accEndDate">
|
||||
<el-date-picker
|
||||
|
|
@ -293,11 +292,11 @@
|
|||
<div style="height: 30px;padding-left: 10px;line-height: 30px;margin: 20px 0;font-size: 14px;color: #000;background: #e7f0fa;border-left: 3px solid #4b80fd;">第二步:修改最低余额和账户有效期</div>
|
||||
<el-form ref="batchForm" :model="batchForm" label-width="100px">
|
||||
<el-form-item label="个人钱包" prop="walletLimitBalance">
|
||||
<el-input v-model="batchForm.walletLimitBalance" placeholder="请输入允许最低余额" maxlength="30" clearable style="width: 300px;"
|
||||
<el-input v-model="batchForm.walletLimitBalance" placeholder="请输入允许最低余额" maxlength="8" clearable style="width: 300px;"
|
||||
@input="(v)=>(batchForm.walletLimitBalance=Number(v.replace(/[^\d.]/g,'')))"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="补贴钱包" prop="subLimitBalance">
|
||||
<el-input v-model="batchForm.subLimitBalance" placeholder="请输入允许最低余额" maxlength="30" clearable style="width: 300px;"
|
||||
<el-input v-model="batchForm.subLimitBalance" placeholder="请输入允许最低余额" maxlength="8" clearable style="width: 300px;"
|
||||
@input="(v)=>(batchForm.subLimitBalance=Number(v.replace(/[^\d.]/g,'')))"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="有账户有效期" prop="accEndDate">
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
size="mini" type="primary"
|
||||
size="mini" type="danger"
|
||||
@click="handleBatchClear"
|
||||
>批量补贴清空</el-button>
|
||||
</el-col>
|
||||
|
|
@ -89,7 +89,7 @@
|
|||
>补贴</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
type="text" style="color: red;"
|
||||
@click="handleClear(scope.row)"
|
||||
>补贴清空</el-button>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
type="danger"
|
||||
size="mini"
|
||||
@click="handleBatchRepeal1"
|
||||
>批量撤销</el-button>
|
||||
|
|
@ -315,7 +315,7 @@
|
|||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
type="danger"
|
||||
size="mini"
|
||||
@click="handleBatchRepeal4"
|
||||
>批量撤销</el-button>
|
||||
|
|
@ -323,7 +323,7 @@
|
|||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList4"></right-toolbar>
|
||||
</el-row>
|
||||
<el-table v-loading="loading" :data="tableListData4" height="550" ref="multipleTable4" :row-key="(row)=>{return row.id}" @selection-change="handleSelectionChange4">
|
||||
<el-table-column type="selection" width="50" align="center" :reserve-selection="true" />
|
||||
<el-table-column type="selection" width="50" align="center" :reserve-selection="true" :selectable="selectable"/>
|
||||
<el-table-column label="序号" align="center" width="100" type="index" >
|
||||
<template scope="scope">
|
||||
<span v-if="!scope.row.custId">合计:</span>
|
||||
|
|
@ -350,14 +350,12 @@
|
|||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
type="text" v-if="scope.row.receiveStateName=='未到账'"
|
||||
@click="handleGran4(scope.row)"
|
||||
>到账</el-button>
|
||||
</template>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
type="text" v-if="scope.row.receiveStateName=='未到账'"
|
||||
style="color: red;"
|
||||
@click="handleRepeal4(scope.row)"
|
||||
>撤销</el-button>
|
||||
|
|
@ -715,6 +713,9 @@
|
|||
this.getList4();
|
||||
this.$modal.msgSuccess("撤销成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
selectable(row){
|
||||
return row.receiveStateName=='未到账'
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange4(selection) {
|
||||
|
|
|
|||
|
|
@ -22,8 +22,8 @@
|
|||
:picker-options="pickerOptions" >
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="日期维度" prop="sumType" @change="getList">
|
||||
<el-radio-group v-model="queryParams.sumType">
|
||||
<el-form-item label="日期维度" prop="sumType">
|
||||
<el-radio-group v-model="queryParams.sumType" @change="handleQuery">
|
||||
<el-radio label="1">按时间段</el-radio>
|
||||
<el-radio label="2">按日期</el-radio>
|
||||
</el-radio-group>
|
||||
|
|
|
|||
|
|
@ -22,8 +22,8 @@
|
|||
:picker-options="pickerOptions" >
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="日期维度" prop="sumType" @change="getList">
|
||||
<el-radio-group v-model="queryParams.sumType">
|
||||
<el-form-item label="日期维度" prop="sumType">
|
||||
<el-radio-group v-model="queryParams.sumType" @change="handleQuery">
|
||||
<el-radio label="1">按时间段</el-radio>
|
||||
<el-radio label="2">按日期</el-radio>
|
||||
</el-radio-group>
|
||||
|
|
|
|||
|
|
@ -81,7 +81,6 @@
|
|||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>补扣</el-button>
|
||||
</template>
|
||||
|
|
@ -188,7 +187,7 @@
|
|||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="补扣金额" prop="amount">
|
||||
<el-input v-model="form.amount" placeholder="请输入补扣金额" maxlength="9" clearable style="width: 100%;" @input="(v)=>(form.amount=v.replace(/[^\d.]/g,''))"/>
|
||||
<el-input v-model="form.amount" placeholder="请输入补扣金额" maxlength="6" clearable style="width: 100%;" @input="(v)=>(form.amount=v.replace(/[^\d.]/g,''))"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
|
|
@ -615,6 +614,7 @@
|
|||
this.canteenOptions=[]
|
||||
this.stallOptions=[]
|
||||
this.$set(this.form,"ordWay","1")
|
||||
this.$set(this.form,"ifSetDeduction","2")
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 提交按钮 */
|
||||
|
|
@ -658,6 +658,7 @@
|
|||
this.canteenOptions=[]
|
||||
this.stallOptions=[]
|
||||
this.$set(this.form,"ordWay","1")
|
||||
this.$set(this.form,"ifSetDeduction","2")
|
||||
this.resetForm("form");
|
||||
this.openBatch = true;
|
||||
this.$nextTick(()=>{
|
||||
|
|
|
|||
|
|
@ -23,8 +23,7 @@
|
|||
</el-form-item>
|
||||
<el-form-item label="关键字">
|
||||
<el-input v-model="queryParams.keyword" placeholder="请输入关键字" maxlength="20" clearable style="width: 240px"/>
|
||||
</el-form-item>
|
||||
<br>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属组织" prop="orgIdList">
|
||||
<el-cascader v-model="queryParams.orgIdList"
|
||||
:options="deptOptions" :filterable="true" style="width: 240px" :show-all-levels="false"
|
||||
|
|
@ -60,6 +59,12 @@
|
|||
<el-option label="红包" value="4"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否在线" prop="ifOnlineList">
|
||||
<el-select v-model="queryParams.ifOnlineList" multiple style="width: 240px" clearable>
|
||||
<el-option label="是" value="1"></el-option>
|
||||
<el-option label="否" value="2"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<br>
|
||||
<!-- minAmount maxAmount -->
|
||||
<el-form-item label="消费金额">
|
||||
|
|
@ -73,12 +78,7 @@
|
|||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否在线" prop="ifOnlineList">
|
||||
<el-select v-model="queryParams.ifOnlineList" multiple style="width: 240px" clearable>
|
||||
<el-option label="是" value="1"></el-option>
|
||||
<el-option label="否" value="2"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
|
||||
<!-- <el-form-item label="操作员">
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
size="mini" type="primary"
|
||||
size="mini" type="danger"
|
||||
@click="handleBatchUnfreeze"
|
||||
>批量解冻</el-button>
|
||||
</el-col>
|
||||
|
|
@ -89,7 +89,7 @@
|
|||
>冻结</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
type="text" style="color: red;"
|
||||
@click="handleUnfreeze(scope.row)"
|
||||
>解冻</el-button>
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@
|
|||
|
||||
<script>
|
||||
import { deptTreeSelect } from '@/api/system/user'
|
||||
import { accFrozenPageApi } from "@/api/accountCenter/freeze";
|
||||
import { accUnfrozenPageApi } from "@/api/accountCenter/freeze";
|
||||
export default {
|
||||
name: "",
|
||||
dicts: ['user_psn_type'],
|
||||
|
|
@ -218,7 +218,7 @@
|
|||
"startDateTime":this.formatDate(this.dateRange[0]),
|
||||
"endDateTime":this.formatDate(this.dateRange[1])
|
||||
}
|
||||
accFrozenPageApi(param).then(response => {
|
||||
accUnfrozenPageApi(param).then(response => {
|
||||
this.tableListData = response.data.pageVO.records;
|
||||
this.total = Number(response.data.pageVO.total);
|
||||
if(this.tableListData.length>0){
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
v-model="areaName"
|
||||
placeholder="请输入类型名称"
|
||||
clearable
|
||||
maxlength="50"
|
||||
maxlength="30"
|
||||
size="small"
|
||||
prefix-icon="el-icon-search"
|
||||
style="margin-bottom: 20px"
|
||||
|
|
@ -84,7 +84,7 @@
|
|||
<el-input
|
||||
v-model="queryParams.areaName"
|
||||
placeholder="请输入区域名称"
|
||||
clearable
|
||||
clearable maxlength="30"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<el-input
|
||||
v-model="queryParams.canteenName"
|
||||
placeholder="请输入食堂名称"
|
||||
clearable
|
||||
clearable maxlength="30"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
|
|
@ -49,7 +49,7 @@
|
|||
<span v-if="scope.row.businessState==2">营业</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="主营项目" align="center" prop="mainProject" :show-overflow-tooltip="true" width="80"/>
|
||||
<!-- <el-table-column label="主营项目" align="center" prop="mainProject" :show-overflow-tooltip="true" width="80"/> -->
|
||||
<el-table-column label="营业时间" align="center" prop="startBusinessTime" :show-overflow-tooltip="true" width="180">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.startBusinessTime }}-{{ scope.row.endBusinessTime }}
|
||||
|
|
@ -93,7 +93,8 @@
|
|||
</el-table-column> -->
|
||||
<el-table-column label="食堂图片" align="center" prop="imgUrl" width="100">
|
||||
<template slot-scope="scope">
|
||||
<img :src="scope.row.imgUrl" alt="" style="width: 80px;height: 40px;" @click="openImg(scope.row)">
|
||||
<img :src="scope.row.imgUrl" v-if="scope.row.imgUrl" alt="" style="width: 80px;height: 40px;" @click="openImg(scope.row)">
|
||||
<span v-else>无</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="支付设置" align="center" prop="canteenName" :show-overflow-tooltip="true" width="80">
|
||||
|
|
@ -363,10 +364,141 @@
|
|||
</div>
|
||||
</el-tab-pane> -->
|
||||
<!-- 预订/点餐/报餐设置 -->
|
||||
<!-- <el-tab-pane label="预订/点餐/报餐设置" name="orderSetting" style="height: 600px;overflow-y: auto;">
|
||||
|
||||
|
||||
</el-tab-pane> -->
|
||||
<el-tab-pane label="预订设置" name="orderSetting" style="height: 600px;overflow-y: auto;">
|
||||
<el-form ref="orderDTO" :model="orderDTO" label-width="80px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="启用本档口独立规则" prop="ifEnableOrder" label-width="160px">
|
||||
<el-switch
|
||||
v-model="orderDTO.ifEnableOrder"
|
||||
active-text="开启"
|
||||
inactive-text="关闭"
|
||||
:active-value="1"
|
||||
:inactive-value="2">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="允许预定餐预定当天" prop="ifAllowReserveToday" label-width="160px">
|
||||
<el-switch
|
||||
v-model="orderDTO.ifAllowReserveToday"
|
||||
active-text="开启"
|
||||
inactive-text="关闭"
|
||||
active-value="1"
|
||||
inactive-value="2">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-table :data="mealtimeList" height="400" >
|
||||
<el-table-column label="餐次类型" align="center" prop="mealtimeName" width="100"/>
|
||||
<el-table-column label="餐次时段" align="center" width="220">
|
||||
<template slot-scope="scope">
|
||||
<el-time-picker
|
||||
is-range
|
||||
v-model="scope.row.orderTimeList" style="width: 190px;"
|
||||
range-separator="至" format="HH:mm:ss" value-format="HH:mm:ss"
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"
|
||||
placeholder="选择时间范围" @change="changeOrderTimeList(scope.row)">
|
||||
</el-time-picker>
|
||||
<!-- <span>{{scope.row.startTime}}</span>-<span>{{scope.row.endTime}}</span> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="预定餐" align="center">
|
||||
<el-table-column label="预定时段" align="center" width="220">
|
||||
<template slot-scope="scope">
|
||||
<el-time-picker
|
||||
is-range :clearable="true"
|
||||
v-model="scope.row.reserveTimeList" style="width: 190px;"
|
||||
range-separator="至" format="HH:mm:ss" value-format="HH:mm:ss"
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"
|
||||
placeholder="选择时间范围" @change="changeReserveTimeList(scope.row)">
|
||||
</el-time-picker>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="退单截止时间" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-time-picker
|
||||
v-model="scope.row.reserveRefundDeadline" style="width: 120px;"
|
||||
placeholder="选择时间">
|
||||
</el-time-picker>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="自动打印时间" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-time-picker
|
||||
v-model="scope.row.reservePrintTime" style="width: 120px;"
|
||||
placeholder="选择时间">
|
||||
</el-time-picker>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="当餐点餐" align="center">
|
||||
<el-table-column label="点餐时段" align="center" width="220">
|
||||
<template slot-scope="scope">
|
||||
<el-time-picker
|
||||
is-range :clearable="true"
|
||||
v-model="scope.row.currTimeList" style="width: 190px;"
|
||||
range-separator="至" format="HH:mm:ss" value-format="HH:mm:ss"
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"
|
||||
placeholder="选择时间范围" @change="changeCurrTimeList(scope.row)">
|
||||
</el-time-picker>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="退单截止时间" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-time-picker
|
||||
v-model="scope.row.currRefundDeadline" style="width: 120px;"
|
||||
placeholder="选择时间">
|
||||
</el-time-picker>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" prop="ifUse" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.ifUse"
|
||||
active-text="开启"
|
||||
inactive-text="关闭"
|
||||
:active-value="1"
|
||||
:inactive-value="2">
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-row>
|
||||
<div style="font-weight: bold;margin: 10px 0;">预订第二天及以后相关设置</div>
|
||||
<el-row style="margin-bottom: 10px;">
|
||||
<el-col :span="12">
|
||||
<span>预订餐最多允许订</span><el-input style="width: 100px;margin: auto 5px;" maxlength="5" v-model="orderDTO.reserveLimitDay" @input="(v)=>(orderDTO.reserveLimitDay=v.replace(/[^\d]/g,''))"></el-input><span>天</span>
|
||||
<el-checkbox v-model="orderDTO.ifReserveSkipHoliday" style="margin: auto 5px;" :true-label="1" :false-label="2">跳过节假日</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<span>今天预订第二天餐次截止</span>
|
||||
<el-time-picker
|
||||
v-model="orderDTO.reserveEndTime" style="width: 120px;margin: auto 5px;" clearable
|
||||
placeholder="选择时间">
|
||||
</el-time-picker>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="margin-bottom: 10px;">
|
||||
<el-col :span="12">
|
||||
<span>每天</span>
|
||||
<el-time-picker
|
||||
v-model="orderDTO.reserveRefundEndTime" style="width: 120px;margin: auto 5px;" clearable
|
||||
placeholder="选择时间">
|
||||
</el-time-picker>
|
||||
<span>系统自动确认次日订单,一经确认用户不可退</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
|
|
@ -559,11 +691,23 @@
|
|||
}
|
||||
],
|
||||
},
|
||||
deliveriesList:[],//配送类型
|
||||
|
||||
orderDTO:{},//订单设置
|
||||
deliveriesList:[],//配送类型
|
||||
mealtimeList:[],//餐次列表
|
||||
|
||||
orderDTO: {//预定餐订单设置
|
||||
"bookEndTime": "",
|
||||
"bookRefundEndTime": "",
|
||||
"cancelBookFeeRatio": "",
|
||||
"dayBeforeCancelBookChargeTime": "",
|
||||
"ifAllowReserveToday": "1",
|
||||
"ifBookSkipHoliday": "",
|
||||
"ifEnableOrder": 2,
|
||||
"ifReserveSkipHoliday": "1",
|
||||
"nearDinnerCancelBookChargeHour": "2",
|
||||
"reportMealLimitDay": 0,
|
||||
"reserveEndTime": "",
|
||||
"reserveLimitDay": 0,
|
||||
"reserveRefundEndTime": ""
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
|
@ -641,6 +785,7 @@
|
|||
this.canteenId=""
|
||||
this.reset();
|
||||
this.getMealtimeList()
|
||||
this.activeName="baseSetting"
|
||||
this.open = true;
|
||||
this.title = "新增";
|
||||
},
|
||||
|
|
@ -654,6 +799,21 @@
|
|||
this.fileList=[]
|
||||
this.checkUrlList=[]
|
||||
this.baseForm = {};
|
||||
this.orderDTO = {//预定餐订单设置
|
||||
"bookEndTime": "",
|
||||
"bookRefundEndTime": "",
|
||||
"cancelBookFeeRatio": "",
|
||||
"dayBeforeCancelBookChargeTime": "",
|
||||
"ifAllowReserveToday": "1",
|
||||
"ifBookSkipHoliday": "",
|
||||
"ifEnableOrder": 2,
|
||||
"ifReserveSkipHoliday": "1",
|
||||
"nearDinnerCancelBookChargeHour": "2",
|
||||
"reportMealLimitDay": 0,
|
||||
"reserveEndTime": "",
|
||||
"reserveLimitDay": 0,
|
||||
"reserveRefundEndTime": ""
|
||||
}
|
||||
this.rangeTime=["08:00:00", "18:00:00"]
|
||||
this.resetForm("baseForm");
|
||||
},
|
||||
|
|
@ -661,11 +821,12 @@
|
|||
handleUpdate(row) {
|
||||
console.log(row)
|
||||
this.reset();
|
||||
this.activeName="baseSetting"
|
||||
getCanteenInfoModifyApi({"canteenId":row.canteenId}).then(response => {
|
||||
console.log(response)
|
||||
this.canteenId = response.canteenId;
|
||||
this.baseForm = response.canteenSaveDTO;
|
||||
this.getCanteenNum()
|
||||
// this.getCanteenNum()
|
||||
if(response.canteenSaveDTO.imgUrl){
|
||||
this.fileList=[{url:response.canteenSaveDTO.imgUrl}]
|
||||
this.checkUrlList=[response.canteenSaveDTO.imgUrl]
|
||||
|
|
@ -678,6 +839,11 @@
|
|||
this.orderDTO = response.orderDTO;
|
||||
this.payDTO = response.payDTO;
|
||||
this.mealtimeList = response.mealtimeList;
|
||||
this.mealtimeList.forEach(item=>{
|
||||
this.$set(item,"orderTimeList",[item.startTime,item.endTime])
|
||||
this.$set(item,"reserveTimeList",[item.reserveStartTime||'',item.reserveEndTime||''])
|
||||
this.$set(item,"currTimeList",[item.currStartTime||'',item.currEndTime||''])
|
||||
})
|
||||
this.open = true;
|
||||
this.title = "修改";
|
||||
});
|
||||
|
|
@ -730,11 +896,7 @@
|
|||
this.baseForm.imgUrl = this.checkUrlList[0]
|
||||
let param ={
|
||||
"canteenSaveDTO": this.baseForm,
|
||||
"payDTO": {//支付设置
|
||||
"ifEnablePay": "2",
|
||||
"payMap": {},
|
||||
"payTypes": ""
|
||||
},
|
||||
"payDTO": this.payDTO,
|
||||
"deliveryModel": {//配送设置
|
||||
"deliveries": "",
|
||||
"deliveryList": [
|
||||
|
|
@ -767,10 +929,7 @@
|
|||
"ifEnableDelivery": "2",
|
||||
"minDeliveryFeeOnOff": 1
|
||||
},
|
||||
"orderDTO": {//订单设置
|
||||
"reportMealLimitDay": 0,
|
||||
"reserveLimitDay": 0
|
||||
},
|
||||
"orderDTO": this.orderDTO,
|
||||
"mealtimeList":this.mealtimeList
|
||||
}
|
||||
if (this.canteenId != "") {
|
||||
|
|
@ -936,11 +1095,33 @@
|
|||
//查询餐次时段列表
|
||||
getMealtimeList() {
|
||||
getMealtimeListApi({}).then((response) => {
|
||||
this.mealtimeList = response
|
||||
console.log(response)
|
||||
this.mealtimeList = response;
|
||||
this.mealtimeList.forEach(item=>{
|
||||
this.$set(item,"orderTimeList",[item.startTime,item.endTime])
|
||||
this.$set(item,"reserveTimeList",['',''])
|
||||
this.$set(item,"currTimeList",['',''])
|
||||
})
|
||||
});
|
||||
},
|
||||
|
||||
changeOrderTimeList(row){
|
||||
console.log(row)
|
||||
row.startTime = row.orderTimeList[0]
|
||||
row.endTime = row.orderTimeList[1]
|
||||
},
|
||||
changeReserveTimeList(row){ //item.reserveStartTime,item.reserveEndTime
|
||||
console.log(row)
|
||||
if(row.reserveTimeList){
|
||||
row.reserveStartTime = row.reserveTimeList[0]
|
||||
row.reserveEndTime = row.reserveTimeList[1]
|
||||
}
|
||||
},
|
||||
changeCurrTimeList(row){ //item.currStartTime,item.currEndTime
|
||||
console.log(row)
|
||||
if(row.currTimeList){
|
||||
row.currStartTime = row.currTimeList[0]
|
||||
row.currEndTime = row.currTimeList[1]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
<el-input
|
||||
v-model="queryParams.stallName"
|
||||
placeholder="请输入档口名称"
|
||||
clearable
|
||||
clearable maxlength="30"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
|
|
@ -53,13 +53,13 @@
|
|||
<el-table-column label="负责人" align="center" prop="custName" :show-overflow-tooltip="true" width="80"/>
|
||||
<el-table-column label="联系电话" align="center" prop="contactTel" :show-overflow-tooltip="true" width="100"/>
|
||||
<el-table-column label="档口标签" align="center" prop="labelNameStr" :show-overflow-tooltip="true" width="80"/>
|
||||
<el-table-column label="品类" align="center" prop="kindNameStr" :show-overflow-tooltip="true" width="80"/>
|
||||
<el-table-column label="档口状态" align="center" prop="businessState" :show-overflow-tooltip="true" width="80">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.businessState==1">休息</span>
|
||||
<span v-if="scope.row.businessState==2">营业</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="品类" align="center" prop="kindNameStr" :show-overflow-tooltip="true" width="80"/>
|
||||
<el-table-column label="营业时间" align="center" prop="startBusinessTime" :show-overflow-tooltip="true" width="180">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.startBusinessTime }}-{{ scope.row.endBusinessTime }}
|
||||
|
|
@ -105,8 +105,9 @@
|
|||
<el-table-column label="线上流水号前缀" align="center" prop="onLineMealCodePrefix" :show-overflow-tooltip="true" width="120"/>
|
||||
<el-table-column label="线下流水号前缀" align="center" prop="offLineMealCodePrefix" :show-overflow-tooltip="true" width="120"/>
|
||||
<el-table-column label="档口图片" align="center" prop="imgUrl" width="100">
|
||||
<template slot-scope="scope">
|
||||
<img :src="scope.row.imgUrl" alt="" style="width: 80px;height: 40px;" @click="openImg(scope.row)">
|
||||
<template slot-scope="scope">
|
||||
<img :src="scope.row.imgUrl" v-if="scope.row.imgUrl" alt="" style="width: 80px;height: 40px;" @click="openImg(scope.row)">
|
||||
<span v-else>无</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="配送设置" align="center" prop="stallName" :show-overflow-tooltip="true" width="80">
|
||||
|
|
@ -277,14 +278,14 @@
|
|||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="线上流水号前缀" prop="onLineMealCodePrefix">
|
||||
<el-input v-model="baseForm.onLineMealCodePrefix" placeholder="请输入线上流水号前缀" maxlength="20" clearable/>
|
||||
<el-input v-model="baseForm.onLineMealCodePrefix" placeholder="请输入线上流水号前缀" maxlength="30" clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="线下流水号前缀" prop="offLineMealCodePrefix">
|
||||
<el-input v-model="baseForm.offLineMealCodePrefix" placeholder="请输入线下流水号前缀" maxlength="20" clearable/>
|
||||
<el-input v-model="baseForm.offLineMealCodePrefix" placeholder="请输入线下流水号前缀" maxlength="30" clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
|
|
@ -477,7 +478,7 @@
|
|||
<div style="font-weight: bold;margin: 10px 0;">预订第二天及以后相关设置</div>
|
||||
<el-row style="margin-bottom: 10px;">
|
||||
<el-col :span="12">
|
||||
<span>预订餐最多允许订</span><el-input style="width: 100px;margin: auto 5px;" v-model="orderDTO.reserveLimitDay" @input="(v)=>(orderDTO.reserveLimitDay=v.replace(/[^\d]/g,''))"></el-input><span>天</span>
|
||||
<span>预订餐最多允许订</span><el-input style="width: 100px;margin: auto 5px;" maxlength="5" v-model="orderDTO.reserveLimitDay" @input="(v)=>(orderDTO.reserveLimitDay=v.replace(/[^\d]/g,''))"></el-input><span>天</span>
|
||||
<el-checkbox v-model="orderDTO.ifReserveSkipHoliday" style="margin: auto 5px;" :true-label="1" :false-label="2">跳过节假日</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@
|
|||
<el-table-column label="评价内容" align="center" prop="description" :show-overflow-tooltip="true" width="200"/>
|
||||
<el-table-column label="评价照片" align="center" prop="pictureList" :show-overflow-tooltip="true" width="180">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.pictureList&&scope.row.pictureList.length>0">
|
||||
<div v-if="scope.row.pictureList&&scope.row.pictureList.length>0" style="display: flex;width: 100%;flex-wrap: wrap;">
|
||||
<img v-for="(item,index) in scope.row.pictureList" :key="index" :src="item" alt="" style="width: 80px;height: 40px;" @click="openImg(item)">
|
||||
</div>
|
||||
<span v-else>无</span>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<el-input
|
||||
v-model="queryParams.deviceSearchInfo"
|
||||
placeholder="请输入关键字"
|
||||
clearable
|
||||
clearable maxlength="20"
|
||||
style="width: 400px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
|
|
@ -600,6 +600,7 @@
|
|||
}
|
||||
this.getList()
|
||||
},
|
||||
|
||||
methods: {
|
||||
//区域树
|
||||
getTreeData() {
|
||||
|
|
@ -618,6 +619,8 @@
|
|||
this.queryParams.areaIdList=arr;
|
||||
getCanteenByAreaApi(param).then((response) => {
|
||||
this.canteenOptions=response||[]
|
||||
this.queryParams.canteenIdList=[];
|
||||
this.queryParams.stallIdList=[];
|
||||
});
|
||||
},
|
||||
//查询-食堂
|
||||
|
|
@ -629,6 +632,7 @@
|
|||
}
|
||||
getStallByCanteenApi(param).then((response) => {
|
||||
this.stallOptions=response||[]
|
||||
this.queryParams.stallIdList=[];
|
||||
});
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
|
|
|
|||
|
|
@ -274,10 +274,10 @@
|
|||
|
||||
|
||||
<!-- 添加或修改菜品对话框 -->
|
||||
<el-dialog :title="title+'-菜品'" :visible.sync="openDish" width="800px" append-to-body :close-on-click-modal="false">
|
||||
<el-dialog :title="title+'-菜品'" :visible.sync="openDish" width="900px" append-to-body :close-on-click-modal="false">
|
||||
<el-tabs v-model="activeName">
|
||||
<!-- 基础信息 -->
|
||||
<el-tab-pane label="基础信息" name="baseInfo" style="height: 600px;overflow-y: auto;">
|
||||
<el-tab-pane label="基础信息" name="1" style="height: 600px;overflow-y: auto;">
|
||||
<el-form ref="baseForm" :model="baseForm" :rules="baseFormRules" label-width="90px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
|
|
@ -362,7 +362,7 @@
|
|||
<el-form-item label="单价" prop="price" v-if="baseForm.sizeType==1">
|
||||
<el-input
|
||||
v-model="baseForm.price"
|
||||
placeholder="请输入单价"
|
||||
placeholder="请输入单价" maxlength="10"
|
||||
@input="handleNumericInput('price', $event)"
|
||||
@blur="formatNumericValue('price')"
|
||||
>
|
||||
|
|
@ -373,7 +373,7 @@
|
|||
<el-col :span="12">
|
||||
<el-form-item label="成本价" prop="materialCost" v-if="baseForm.sizeType==1">
|
||||
<el-input
|
||||
v-model="baseForm.materialCost"
|
||||
v-model="baseForm.materialCost" maxlength="10"
|
||||
placeholder="请输入成本价" disabled
|
||||
@input="handleNumericInput('materialCost', $event)"
|
||||
@blur="formatNumericValue('materialCost')"
|
||||
|
|
@ -387,7 +387,7 @@
|
|||
<el-form-item label="小份单价" prop="littlePrice" v-if="baseForm.sizeType==2&&baseForm.salesMode==1">
|
||||
<el-input
|
||||
v-model="baseForm.littlePrice"
|
||||
placeholder="请输入小份单价"
|
||||
placeholder="请输入小份单价" maxlength="10"
|
||||
@input="handleNumericInput('littlePrice', $event)"
|
||||
@blur="formatNumericValue('littlePrice')"
|
||||
>
|
||||
|
|
@ -397,7 +397,7 @@
|
|||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="小份份量" prop="littleWeight" v-if="baseForm.sizeType==2&&baseForm.salesMode==1">
|
||||
<el-input v-model="baseForm.littleWeight" placeholder="小份份量" maxlength="30" clearable @input="(v)=>(baseForm.littleWeight=v.replace(/[^\d]/g,''))">
|
||||
<el-input v-model="baseForm.littleWeight" placeholder="小份份量" maxlength="9" clearable @input="(v)=>(baseForm.littleWeight=v.replace(/[^\d]/g,''))">
|
||||
<template slot="append">g</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
|
@ -406,7 +406,7 @@
|
|||
<el-form-item label="大份单价" prop="largePrice" v-if="baseForm.sizeType==2&&baseForm.salesMode==1">
|
||||
<el-input
|
||||
v-model="baseForm.largePrice"
|
||||
placeholder="请输入大份单价"
|
||||
placeholder="请输入大份单价" maxlength="10"
|
||||
@input="handleNumericInput('largePrice', $event)"
|
||||
@blur="formatNumericValue('largePrice')"
|
||||
>
|
||||
|
|
@ -416,7 +416,7 @@
|
|||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="大份份量" prop="largeWeight" v-if="baseForm.sizeType==2&&baseForm.salesMode==1">
|
||||
<el-input v-model="baseForm.largeWeight" placeholder="大份份量" maxlength="30" clearable @input="(v)=>(baseForm.largeWeight=v.replace(/[^\d]/g,''))">
|
||||
<el-input v-model="baseForm.largeWeight" placeholder="大份份量" maxlength="9" clearable @input="(v)=>(baseForm.largeWeight=v.replace(/[^\d]/g,''))">
|
||||
<template slot="append">g</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
|
@ -425,7 +425,7 @@
|
|||
<el-col :span="12">
|
||||
<el-form-item label="小份成本价" prop="littleMaterialCost" v-if="baseForm.sizeType==2&&baseForm.salesMode==1">
|
||||
<el-input
|
||||
v-model="baseForm.littleMaterialCost"
|
||||
v-model="baseForm.littleMaterialCost" maxlength="10"
|
||||
placeholder="请输入小份成本价" disabled
|
||||
@input="handleNumericInput('littleMaterialCost', $event)"
|
||||
@blur="formatNumericValue('littleMaterialCost')"
|
||||
|
|
@ -437,7 +437,7 @@
|
|||
<el-col :span="12">
|
||||
<el-form-item label="大份成本价" prop="materialCost" v-if="baseForm.sizeType==2&&baseForm.salesMode==1">
|
||||
<el-input
|
||||
v-model="baseForm.materialCost"
|
||||
v-model="baseForm.materialCost" maxlength="10"
|
||||
placeholder="请输入大份成本价" disabled
|
||||
@input="handleNumericInput('materialCost', $event)"
|
||||
@blur="formatNumericValue('materialCost')"
|
||||
|
|
@ -449,14 +449,14 @@
|
|||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="份量" prop="weight" v-if="baseForm.sizeType==1&&baseForm.salesMode==1">
|
||||
<el-input v-model="baseForm.weight" placeholder="份量" maxlength="30" clearable @input="(v)=>(baseForm.weight=v.replace(/[^\d]/g,''))">
|
||||
<el-input v-model="baseForm.weight" placeholder="份量" maxlength="9" clearable @input="(v)=>(baseForm.weight=v.replace(/[^\d]/g,''))">
|
||||
<template slot="append">g</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="质量偏差" prop="weightDeviation" v-if="baseForm.salesMode==1">
|
||||
<el-input v-model="baseForm.weightDeviation" placeholder="份量" maxlength="30" clearable @input="(v)=>(baseForm.weight=v.replace(/[^\d]/g,''))">
|
||||
<el-input v-model="baseForm.weightDeviation" placeholder="份量" maxlength="9" clearable @input="(v)=>(baseForm.weight=v.replace(/[^\d]/g,''))">
|
||||
<template slot="append">%</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
|
@ -601,9 +601,356 @@
|
|||
</el-form>
|
||||
</el-tab-pane>
|
||||
<!-- 组成成分 -->
|
||||
<!-- <el-tab-pane label="组成成分" name="paySetting" style="height: 600px;overflow-y: auto;">
|
||||
|
||||
</el-tab-pane> -->
|
||||
<el-tab-pane label="组成成分" name="2" style="height: 600px;overflow-y: auto;" :disabled="baseForm.weight==null&&baseForm.largeWeight==null&&baseForm.littleWeight==null">
|
||||
<div>
|
||||
<el-button type="primary" icon="el-icon-plus" size="mini" v-if="materialList.length==0" @click="addDishMaterial">增加</el-button>
|
||||
<div v-else style="font-size: 18px;font-weight: bold;color: #606266;">
|
||||
<span v-if="baseForm.sizeType==1">{{baseForm.weight}}g含原材料如下:</span>
|
||||
<span v-else>小份{{baseForm.littleWeight}}g/大份{{baseForm.largeWeight}}g 含原材料如下:</span>
|
||||
</div>
|
||||
</div>
|
||||
<el-table :data="materialList" height="500px">
|
||||
<el-table-column label="原料" align="center" key="materialId" prop="materialId" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.materialId" filterable remote
|
||||
reserve-keyword placeholder="请选择原料" style="width: 180px;margin-right: 20px;"
|
||||
:remote-method="remoteMethod" :loading="loading">
|
||||
<el-option v-for="lab in materialOptions"
|
||||
:key="lab.materialId"
|
||||
:label="lab.materialName"
|
||||
:value="lab.materialId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="主/辅料" align="center" key="materialId" prop="materialId" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.materialType" placeholder="请选择" style="width: 100px;margin-right: 20px;" clearable>
|
||||
<el-option label="主料" :value="1" />
|
||||
<el-option label="辅料" :value="2" />
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="大份克数" align="center" key="materialId" prop="materialId" width="180" v-if="baseForm.sizeType==1">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.weight" placeholder="克数" maxlength="9" style="width: 170px;margin-right: 20px;" clearable @input="(v)=>(scope.row.weight=v.replace(/[^\d]/g,''))">
|
||||
<template slot="append">g</template>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="大份克数" align="center" key="materialId" prop="materialId" width="180" v-if="baseForm.sizeType==2">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.largeWeight" placeholder="大份克数" maxlength="9" style="width: 170px;margin-right: 20px;" clearable @input="(v)=>(scope.row.largeWeight=v.replace(/[^\d]/g,''))">
|
||||
<template slot="append">g</template>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="小份克数" align="center" key="materialId" prop="materialId" width="180" v-if="baseForm.sizeType==2">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.littleWeight" placeholder="小份克数" maxlength="9" style="width: 170px;margin-right: 20px;" clearable @input="(v)=>(scope.row.littleWeight=v.replace(/[^\d]/g,''))">
|
||||
<template slot="append">g</template>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" icon="el-icon-plus" size="mini" v-if="scope.$index==(materialList.length-1)" @click="addDishMaterial">增加</el-button>
|
||||
<el-button type="danger" icon="el-icon-delete" size="mini" @click="delDishMaterial(scope.$index)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- <div v-for="(item,index) in materialList" :key="index">
|
||||
<div>原材料{{ index+1 }}</div>
|
||||
<div style="width: 100%;display: flex;align-items: center;">
|
||||
<el-select v-model="item.materialId" filterable remote
|
||||
reserve-keyword placeholder="请选择原料" style="width: 200px;margin-right: 20px;"
|
||||
:remote-method="remoteMethod" :loading="loading">
|
||||
<el-option v-for="lab in materialOptions"
|
||||
:key="lab.materialId"
|
||||
:label="lab.materialName"
|
||||
:value="lab.materialId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-select v-model="item.materialType" placeholder="请选择" style="width: 100px;margin-right: 20px;" clearable>
|
||||
<el-option label="主料" :value="1" />
|
||||
<el-option label="辅料" :value="2" />
|
||||
</el-select>
|
||||
<el-input v-model="item.weight" placeholder="克数" v-if="baseForm.sizeType==1" maxlength="9" style="width: 200px;margin-right: 20px;" clearable @input="(v)=>(item.weight=v.replace(/[^\d]/g,''))">
|
||||
<template slot="append">g</template>
|
||||
</el-input>
|
||||
<el-input v-model="item.largeWeight" placeholder="大份克数" v-if="baseForm.sizeType==2" maxlength="9" style="width: 200px;margin-right: 20px;" clearable @input="(v)=>(item.largeWeight=v.replace(/[^\d]/g,''))">
|
||||
<template slot="append">g</template>
|
||||
</el-input>
|
||||
<el-input v-model="item.littleWeight" placeholder="小份克数" v-if="baseForm.sizeType==2" maxlength="9" style="width: 200px;margin-right: 20px;" clearable @input="(v)=>(item.littleWeight=v.replace(/[^\d]/g,''))">
|
||||
<template slot="append">g</template>
|
||||
</el-input>
|
||||
<el-button type="primary" icon="el-icon-plus" size="mini" v-if="index==(materialList.length-1)" @click="addDishMaterial">增加</el-button>
|
||||
<el-button type="danger" icon="el-icon-delete" size="mini" @click="delDishMaterial(index)">删除</el-button>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="营养信息" name="3" style="height: 600px;overflow-y: auto;" v-if="title=='新增'">
|
||||
<div v-if="baseForm.sizeType==1" style="font-size: 18px;font-weight: bold;color: #606266;">每{{ baseForm.weight }}g 含营养信息</div>
|
||||
<el-descriptions v-if="baseForm.sizeType==1" title="" :column="2" size="small" border labelStyle="width:150px;">
|
||||
<el-descriptions-item>
|
||||
<template slot="label">热量(千卡)</template>
|
||||
{{baseForm.dishesNutrition.calories||0}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">蛋白质(g)</template>
|
||||
{{baseForm.dishesNutrition.protein||0}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item>
|
||||
<template slot="label">脂肪(g)</template>
|
||||
{{baseForm.dishesNutrition.fat||0}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">碳水化合物(g)</template>
|
||||
{{baseForm.dishesNutrition.carbohydrate||0}}
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item>
|
||||
<template slot="label">膳食纤维(g)</template>
|
||||
{{baseForm.dishesNutrition.dietaryFiber||0}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">胆固醇(mg)</template>
|
||||
{{baseForm.dishesNutrition.cholesterol||0}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item>
|
||||
<template slot="label">钙(mg)</template>
|
||||
{{baseForm.dishesNutrition.calcium||0}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">钠(mg)</template>
|
||||
{{baseForm.dishesNutrition.sodium||0}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item>
|
||||
<template slot="label">总嘌呤含量(mg)</template>
|
||||
{{baseForm.dishesNutrition.purine||0}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">铁(mg)</template>
|
||||
{{baseForm.dishesNutrition.iron||0}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item>
|
||||
<template slot="label">碘(μg)</template>
|
||||
{{baseForm.dishesNutrition.iodine||0}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">钾(mg)</template>
|
||||
{{baseForm.dishesNutrition.kalium||0}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item>
|
||||
<template slot="label">维生素a(μg)</template>
|
||||
{{baseForm.dishesNutrition.vitaminA||0}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">维生素c(mg)</template>
|
||||
{{baseForm.dishesNutrition.vitaminC||0}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item>
|
||||
<template slot="label">维生素e(mg)</template>
|
||||
{{baseForm.dishesNutrition.vitaminE||0}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">镁(mg)</template>
|
||||
{{baseForm.dishesNutrition.magnesium||0}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item>
|
||||
<template slot="label">锌(mg)</template>
|
||||
{{baseForm.dishesNutrition.zinc||0}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">血糖生成指数(GI)</template>
|
||||
{{baseForm.dishesNutrition.glycemicIndex||0}}
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
</el-descriptions>
|
||||
<div v-if="baseForm.sizeType==2" style="font-size: 18px;font-weight: bold;color: #606266;">大份{{ baseForm.largeWeight }}g 含营养信息</div>
|
||||
<el-descriptions v-if="baseForm.sizeType==2" title="" :column="2" size="small" border labelStyle="width:150px;">
|
||||
<el-descriptions-item>
|
||||
<template slot="label">热量(千卡)</template>
|
||||
{{baseForm.dishesNutrition.calories||0}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">蛋白质(g)</template>
|
||||
{{baseForm.dishesNutrition.protein||0}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item>
|
||||
<template slot="label">脂肪(g)</template>
|
||||
{{baseForm.dishesNutrition.fat||0}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">碳水化合物(g)</template>
|
||||
{{baseForm.dishesNutrition.carbohydrate||0}}
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item>
|
||||
<template slot="label">膳食纤维(g)</template>
|
||||
{{baseForm.dishesNutrition.dietaryFiber||0}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">胆固醇(mg)</template>
|
||||
{{baseForm.dishesNutrition.cholesterol||0}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item>
|
||||
<template slot="label">钙(mg)</template>
|
||||
{{baseForm.dishesNutrition.calcium||0}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">钠(mg)</template>
|
||||
{{baseForm.dishesNutrition.sodium||0}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item>
|
||||
<template slot="label">总嘌呤含量(mg)</template>
|
||||
{{baseForm.dishesNutrition.purine||0}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">铁(mg)</template>
|
||||
{{baseForm.dishesNutrition.iron||0}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item>
|
||||
<template slot="label">碘(μg)</template>
|
||||
{{baseForm.dishesNutrition.iodine||0}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">钾(mg)</template>
|
||||
{{baseForm.dishesNutrition.kalium||0}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item>
|
||||
<template slot="label">维生素a(μg)</template>
|
||||
{{baseForm.dishesNutrition.vitaminA||0}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">维生素c(mg)</template>
|
||||
{{baseForm.dishesNutrition.vitaminC||0}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item>
|
||||
<template slot="label">维生素e(mg)</template>
|
||||
{{baseForm.dishesNutrition.vitaminE||0}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">镁(mg)</template>
|
||||
{{baseForm.dishesNutrition.magnesium||0}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item>
|
||||
<template slot="label">锌(mg)</template>
|
||||
{{baseForm.dishesNutrition.zinc||0}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">血糖生成指数(GI)</template>
|
||||
{{baseForm.dishesNutrition.glycemicIndex||0}}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<div v-if="baseForm.sizeType==2" style="font-size: 18px;font-weight: bold;color: #606266;">小份{{ baseForm.littleWeight }}g 含营养信息</div>
|
||||
<el-descriptions v-if="baseForm.sizeType==2" title="" :column="2" size="small" border labelStyle="width:150px;">
|
||||
<el-descriptions-item>
|
||||
<template slot="label">热量(千卡)</template>
|
||||
{{baseForm.littleDishesNutrition.calories||0}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">蛋白质(g)</template>
|
||||
{{baseForm.littleDishesNutrition.protein||0}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item>
|
||||
<template slot="label">脂肪(g)</template>
|
||||
{{baseForm.littleDishesNutrition.fat||0}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">碳水化合物(g)</template>
|
||||
{{baseForm.littleDishesNutrition.carbohydrate||0}}
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item>
|
||||
<template slot="label">膳食纤维(g)</template>
|
||||
{{baseForm.littleDishesNutrition.dietaryFiber||0}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">胆固醇(mg)</template>
|
||||
{{baseForm.littleDishesNutrition.cholesterol||0}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item>
|
||||
<template slot="label">钙(mg)</template>
|
||||
{{baseForm.littleDishesNutrition.calcium||0}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">钠(mg)</template>
|
||||
{{baseForm.littleDishesNutrition.sodium||0}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item>
|
||||
<template slot="label">总嘌呤含量(mg)</template>
|
||||
{{baseForm.littleDishesNutrition.purine||0}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">铁(mg)</template>
|
||||
{{baseForm.littleDishesNutrition.iron||0}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item>
|
||||
<template slot="label">碘(μg)</template>
|
||||
{{baseForm.littleDishesNutrition.iodine||0}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">钾(mg)</template>
|
||||
{{baseForm.littleDishesNutrition.kalium||0}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item>
|
||||
<template slot="label">维生素a(μg)</template>
|
||||
{{baseForm.littleDishesNutrition.vitaminA||0}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">维生素c(mg)</template>
|
||||
{{baseForm.littleDishesNutrition.vitaminC||0}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item>
|
||||
<template slot="label">维生素e(mg)</template>
|
||||
{{baseForm.littleDishesNutrition.vitaminE||0}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">镁(mg)</template>
|
||||
{{baseForm.littleDishesNutrition.magnesium||0}}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item>
|
||||
<template slot="label">锌(mg)</template>
|
||||
{{baseForm.littleDishesNutrition.zinc||0}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label">血糖生成指数(GI)</template>
|
||||
{{baseForm.littleDishesNutrition.glycemicIndex||0}}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-tab-pane>
|
||||
<!-- 菜品识别注册图 -->
|
||||
<!-- <el-tab-pane label="菜品识别注册图" name="deliverySetting" style="height: 600px;overflow-y: auto;">
|
||||
|
||||
|
|
@ -643,7 +990,7 @@
|
|||
import { menuDishesTypeAllListApi,addMenuDishesTypeApi, editMenuDishesTypeApi, removeMenuDishesTypeApi, systemAreaTreeApi,getCanteenByAreaApi,getStallByCanteenApi} from "@/api/dish/dish";
|
||||
import { getMenuDishesListApi,addMenuDishesApi, editMenuDishesApi,menuDishesDetailApi,removeMenuDishesApi } from "@/api/dish/dish";
|
||||
import { getMenuDishesCookListApi, getMenuDishesLabelListApi, getMenuDishesTasteListApi, getMenuDishesEffectListApi, getMenuDishesStyleListApi, getMenuDishesSuitListApi } from "@/api/dish/type"
|
||||
import { removeMaterialApi,batchRemoveMaterialApi} from "@/api/dish/material";
|
||||
import { getMaterialListApi } from "@/api/dish/material";
|
||||
import { imgUpLoadTwo } from '@/api/system/upload'
|
||||
import { getToken } from '@/utils/auth'
|
||||
export default {
|
||||
|
|
@ -712,7 +1059,7 @@
|
|||
stallOptions2:[],//档口下拉选
|
||||
batchIds:[],
|
||||
openDish: false,//菜品弹窗开关
|
||||
activeName:"baseInfo",
|
||||
activeName:"1",
|
||||
dishesCookOptions:[],
|
||||
dishesLabelOptions:[],
|
||||
dishesTasteOptions:[],
|
||||
|
|
@ -748,7 +1095,8 @@
|
|||
effectId:null,
|
||||
suitIdList:[],
|
||||
intro:"",
|
||||
imageUr:""
|
||||
imageUr:"",
|
||||
dishesNutrition:{}
|
||||
},
|
||||
// 表单校验
|
||||
baseFormRules: {
|
||||
|
|
@ -794,6 +1142,8 @@
|
|||
// 上传的地址
|
||||
url: process.env.VUE_APP_BASE_API + '/smart-canteen/api/v1/menumaterial/batch/import/material',
|
||||
},
|
||||
materialList:[],
|
||||
materialOptions:[],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
|
@ -1022,7 +1372,8 @@
|
|||
effectId:null,
|
||||
suitIdList:[],
|
||||
intro:"",
|
||||
imageUr:""
|
||||
imageUr:"",
|
||||
dishesNutrition:{}
|
||||
}
|
||||
this.resetForm("baseForm");
|
||||
},
|
||||
|
|
@ -1030,14 +1381,17 @@
|
|||
handleAdd() {
|
||||
this.fileList=[]
|
||||
this.checkUrlList=[]
|
||||
this.materialList=[]
|
||||
this.getAllSelectList()
|
||||
this.resetDishDialog()
|
||||
this.activeName="1"
|
||||
this.title = "新增";
|
||||
this.openDish = true;
|
||||
},
|
||||
//修改计价方式
|
||||
changeSalesMode(e){
|
||||
console.log(e)
|
||||
this.materialList=[]
|
||||
this.$set(this.baseForm,"sizeType",'1')
|
||||
this.$set(this.baseForm,"weight",100)
|
||||
this.$set(this.baseForm,"price",null)
|
||||
|
|
@ -1054,6 +1408,7 @@
|
|||
},
|
||||
changeSizeType(e){
|
||||
console.log(e)
|
||||
this.materialList=[]
|
||||
this.$set(this.baseForm,"price",null)
|
||||
this.$set(this.baseForm,"weight",null)
|
||||
this.$set(this.baseForm,"littlePrice",null)
|
||||
|
|
@ -1082,11 +1437,24 @@
|
|||
if(this.baseForm.sizeType==1){
|
||||
this.$set(this.baseForm,"price",Number(response.price)/100)
|
||||
this.$set(this.baseForm,"materialCost",Number(response.materialCost)/100)
|
||||
this.$set(this,"materialList",response.materialList)
|
||||
}else{
|
||||
this.$set(this.baseForm,"littlePrice",Number(response.littlePrice)/100)
|
||||
this.$set(this.baseForm,"largePrice",Number(response.largePrice)/100)
|
||||
this.$set(this.baseForm,"littleMaterialCost",Number(response.littleMaterialCost)/100)
|
||||
this.$set(this.baseForm,"materialCost",Number(response.materialCost)/100)
|
||||
let arr = []
|
||||
this.baseForm.materialList.forEach((item,index)=>{
|
||||
let obj = {
|
||||
materialId: item.materialId,
|
||||
materialName: item.materialName,
|
||||
materialType: item.materialType,
|
||||
littleWeight: this.baseForm.littleMaterialList[index].weight,
|
||||
largeWeight: item.weight
|
||||
}
|
||||
arr.push(obj)
|
||||
})
|
||||
this.$set(this,"materialList",arr)
|
||||
}
|
||||
if(this.baseForm.imageUrl){
|
||||
this.fileList=[{url:this.baseForm.imageUrl}]
|
||||
|
|
@ -1094,12 +1462,62 @@
|
|||
}else{
|
||||
this.fileList=[]
|
||||
this.checkUrlList=[]
|
||||
}
|
||||
}
|
||||
this.$set(this,"materialOptions",response.materialList)
|
||||
this.activeName="1"
|
||||
this.title = "修改";
|
||||
this.openDish = true;
|
||||
});
|
||||
|
||||
});
|
||||
},
|
||||
//----组成成分------
|
||||
//添加原料
|
||||
addDishMaterial(){
|
||||
if(this.baseForm.sizeType==1){
|
||||
let obj = {
|
||||
materialId: null,
|
||||
materialType: null,
|
||||
weight: null
|
||||
}
|
||||
this.materialList.push(obj)
|
||||
}else{
|
||||
let obj = {
|
||||
materialId: null,
|
||||
materialType: null,
|
||||
littleWeight: null,
|
||||
largeWeight: null
|
||||
}
|
||||
this.materialList.push(obj)
|
||||
}
|
||||
},
|
||||
//删除原料
|
||||
delDishMaterial(index){
|
||||
this.materialList.splice(index,1)
|
||||
},
|
||||
//组成成分-原料下拉查询
|
||||
remoteMethod(query) {
|
||||
if (query !== '') {
|
||||
this.loading = true;
|
||||
setTimeout(() => {
|
||||
this.loading = false;
|
||||
let param = {
|
||||
current: 1,
|
||||
materialName: query,
|
||||
materialType: 1,
|
||||
size: 20
|
||||
}
|
||||
getMaterialListApi(param).then(response => {
|
||||
this.materialOptions = response.data.records
|
||||
});
|
||||
// this.options = this.list.filter(item => {
|
||||
// return item.label.toLowerCase()
|
||||
// .indexOf(query.toLowerCase()) > -1;
|
||||
// });
|
||||
}, 200);
|
||||
} else {
|
||||
this.materialOptions = [];
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
/** 处理对话框提交 */
|
||||
handleDialogSubmit() {
|
||||
|
|
@ -1113,11 +1531,26 @@
|
|||
if(param.sizeType==1){
|
||||
param.price = Number(param.price)*100;
|
||||
param.materialCost = Number(param.materialCost)*100;
|
||||
param.materialList = this.materialList
|
||||
}else{
|
||||
param.littlePrice = Number(param.littlePrice)*100;
|
||||
param.largePrice = Number(param.largePrice)*100;
|
||||
param.littleMaterialCost = Number(param.littleMaterialCost)*100;
|
||||
param.materialCost = Number(param.materialCost)*100;
|
||||
param.materialList=[]
|
||||
param.littleMaterialList=[]
|
||||
this.materialList.forEach(item=>{
|
||||
param.materialList.push({
|
||||
materialId: item.materialId,
|
||||
materialType: item.materialType,
|
||||
weight: item.largeWeight
|
||||
})
|
||||
param.littleMaterialList.push({
|
||||
materialId: item.materialId,
|
||||
materialType: item.materialType,
|
||||
weight: item.littleWeight
|
||||
})
|
||||
})
|
||||
}
|
||||
if (this.title === "新增") {
|
||||
addMenuDishesApi(param).then(response => {
|
||||
|
|
@ -1220,11 +1653,7 @@
|
|||
this.$modal.msgSuccess("后台导入中...");
|
||||
this.getList()
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
handleNumericInput(field, event) {
|
||||
const value = event;
|
||||
// 只允许输入数字和小数点
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@
|
|||
<el-input
|
||||
v-model="queryParams.materialName"
|
||||
placeholder="请输入原料名称"
|
||||
clearable
|
||||
clearable maxlength="30"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
|
|
@ -101,7 +101,7 @@
|
|||
<el-input
|
||||
v-model="queryParams.barCode"
|
||||
placeholder="请输入条码"
|
||||
clearable
|
||||
clearable maxlength="30"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
|
|
@ -110,7 +110,7 @@
|
|||
<el-input
|
||||
v-model="queryParams.materialCode"
|
||||
placeholder="请输入原料编码"
|
||||
clearable
|
||||
clearable maxlength="30"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -74,14 +74,14 @@
|
|||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="tableListData" height="800">
|
||||
<el-table-column label="序号" align="center" width="80" type="index">
|
||||
<el-table-column label="序号" align="center" width="80" type="index" fixed="left">
|
||||
<template slot-scope="scope">
|
||||
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="区域名称" align="center" prop="areaName" />
|
||||
<el-table-column label="食堂名称" align="center" prop="canteenName" />
|
||||
<el-table-column label="档口名称" align="center" prop="stallName" />
|
||||
<el-table-column label="区域名称" align="center" prop="areaName" fixed="left" width="150"/>
|
||||
<el-table-column label="食堂名称" align="center" prop="canteenName" fixed="left" width="150"/>
|
||||
<el-table-column label="档口名称" align="center" prop="stallName" fixed="left" width="150"/>
|
||||
<el-table-column label="菜谱名称" align="center" prop="recipeName" width="200">
|
||||
<template slot-scope="scope">
|
||||
<div style="display: flex;align-items: center;justify-content: center;" v-if="activeName=='currentRecipe'">
|
||||
|
|
@ -146,7 +146,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="用户范围" align="center" prop="effName" v-if="activeName=='pageRecipe'"/>
|
||||
|
||||
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width">
|
||||
<el-table-column label="操作" align="center" width="150" class-name="small-padding fixed-width" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
|
|
|
|||
|
|
@ -653,21 +653,24 @@
|
|||
});
|
||||
},
|
||||
handleAreaChange(e){
|
||||
console.log(this.queryParams.areaIdList)
|
||||
// console.log(this.queryParams.areaIdList)
|
||||
let param= {
|
||||
areaIdList:this.queryParams.areaIdList
|
||||
}
|
||||
getCanteenByAreaApi(param).then((response) => {
|
||||
this.canteenOptions=response||[]
|
||||
this.canteenOptions=response||[]
|
||||
this.queryParams.canteenIdList=[]
|
||||
this.queryParams.stallIdList=[]
|
||||
});
|
||||
},
|
||||
handleCanteenChange(e){
|
||||
console.log(this.queryParams.canteenIdList)
|
||||
// console.log(this.queryParams.canteenIdList)
|
||||
let param= {
|
||||
canteenIdList:this.queryParams.canteenIdList
|
||||
canteenIdList:this.queryParams.canteenIdList
|
||||
}
|
||||
getStallByCanteenApi(param).then((response) => {
|
||||
this.stallOptions=response||[]
|
||||
this.stallOptions=response||[]
|
||||
this.queryParams.stallIdList=[]
|
||||
});
|
||||
},
|
||||
//订单状态
|
||||
|
|
|
|||
|
|
@ -659,21 +659,24 @@ export default {
|
|||
});
|
||||
},
|
||||
handleAreaChange(e){
|
||||
console.log(this.queryParams.areaIdList)
|
||||
// console.log(this.queryParams.areaIdList)
|
||||
let param= {
|
||||
areaIdList:this.queryParams.areaIdList
|
||||
areaIdList:this.queryParams.areaIdList
|
||||
}
|
||||
getCanteenByAreaApi(param).then((response) => {
|
||||
this.canteenOptions=response||[]
|
||||
this.canteenOptions=response||[]
|
||||
this.queryParams.canteenIdList=[]
|
||||
this.queryParams.stallIdList=[]
|
||||
});
|
||||
},
|
||||
handleCanteenChange(e){
|
||||
console.log(this.queryParams.canteenIdList)
|
||||
// console.log(this.queryParams.canteenIdList)
|
||||
let param= {
|
||||
canteenIdList:this.queryParams.canteenIdList
|
||||
canteenIdList:this.queryParams.canteenIdList
|
||||
}
|
||||
getStallByCanteenApi(param).then((response) => {
|
||||
this.stallOptions=response||[]
|
||||
this.stallOptions=response||[]
|
||||
this.queryParams.stallIdList=[]
|
||||
});
|
||||
},
|
||||
//订单状态
|
||||
|
|
|
|||
|
|
@ -0,0 +1,321 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="90px">
|
||||
<el-form-item label="时间类型">
|
||||
<el-select v-model="queryParams.dateType" style="width: 240px">
|
||||
<el-option label="按日" :value="2"></el-option>
|
||||
<el-option label="按月" :value="1"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="日期范围" v-if="queryParams.dateType==2">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
type="daterange"
|
||||
align="right"
|
||||
unlink-panels
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 220px"
|
||||
:picker-options="pickerOptions">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="日期范围" v-if="queryParams.dateType==1">
|
||||
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="所属区域" prop="areaIdList">
|
||||
<el-cascader v-model="queryParams.areaIdList"
|
||||
:options="treeAreaOptions" :filterable="true" style="width: 220px" :show-all-levels="false"
|
||||
:props="{
|
||||
multiple: true,
|
||||
emitPath: false,// 若设置 false,则只返回该节点的值,只返回最后选择的id
|
||||
checkStrictly: true,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
|
||||
value:'id',label:'treeName'
|
||||
}" clearable collapse-tags @change="getTenantGroupAreaTreeData">
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item label="食堂/超市" prop="canteenStallIds">
|
||||
<el-cascader v-model="queryParams.canteenStallIds"
|
||||
:options="tenantOptions" :filterable="true" style="width: 100%;" :show-all-levels="false"
|
||||
:props="{
|
||||
multiple:true,
|
||||
emitPath: false,// 若设置 false,则只返回该节点的值,只返回最后选择的id
|
||||
checkStrictly: true,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
|
||||
value:'id',label:'treeName'
|
||||
}" collapse-tags
|
||||
clearable>
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery1">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery1">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="width: 100%;display: flex;align-items: center;margin-bottom: 20px;">
|
||||
<div style="width: 24%;">
|
||||
<div class="title">营业额(元)</div>
|
||||
<div class="num">78058.76</div>
|
||||
</div>
|
||||
<div style="width: 24%;">
|
||||
<div class="title">用户数(人)</div>
|
||||
<div class="num">1036</div>
|
||||
</div>
|
||||
<div style="width: 24%;">
|
||||
<div class="title">订单数(个)</div>
|
||||
<div class="num">2215</div>
|
||||
</div>
|
||||
<div style="width: 24%;">
|
||||
<div class="title">均单价(元)</div>
|
||||
<div class="num">8.4</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%;margin-bottom: 20px;display: flex;justify-content: flex-end;padding-right: 40px;">
|
||||
<el-radio-group v-model="lineType" size="mini">
|
||||
<el-radio-button label="按食堂"></el-radio-button>
|
||||
<el-radio-button label="按餐次"></el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div id="lineChartOne" style="width: 100%;height: 300px;margin-bottom: 20px;"></div>
|
||||
<div style="width: 100%;height: auto;margin-bottom: 20px;">
|
||||
<div id="pieChartOne" style="width: 50%;height: 250px;"></div>
|
||||
<div id="pieChartTwo" style="width: 50%;height: 250px;"></div>
|
||||
</div>
|
||||
<div style="width: 100%;height: auto;margin-bottom: 20px;">
|
||||
<div id="pieChartThree" style="width: 50%;height: 250px;"></div>
|
||||
<div id="pieChartFour" style="width: 50%;height: 250px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts'
|
||||
import { systemAreaTreeApi,tenantGroupAreaTreeApi } from '@/api/reportCenter/analysis'
|
||||
export default {
|
||||
name: "",
|
||||
data() {
|
||||
return {
|
||||
dateRange:[this.formatDate(new Date()),this.formatDate(new Date())],
|
||||
pickerOptions: {
|
||||
shortcuts: [{
|
||||
text: '最近一周',
|
||||
onClick(picker) {
|
||||
const start = new Date();
|
||||
const end = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 6);
|
||||
picker.$emit('pick', [start, end]);
|
||||
}
|
||||
},{
|
||||
text: '最近一个月',
|
||||
onClick(picker) {
|
||||
const start = new Date();
|
||||
const end = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
||||
picker.$emit('pick', [start, end]);
|
||||
}
|
||||
},{
|
||||
text: '最近三个月',
|
||||
onClick(picker) {
|
||||
const start = new Date();
|
||||
const end = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 91);
|
||||
picker.$emit('pick', [start, end]);
|
||||
}
|
||||
}]
|
||||
},
|
||||
treeAreaOptions:[],//区域树
|
||||
tenantOptions:[],//食堂超市树 queryParams.areaIdList
|
||||
queryParams:{
|
||||
dateType:2,
|
||||
areaIdList:[],
|
||||
canteenStallIds:[]
|
||||
},
|
||||
lineType:'按食堂',
|
||||
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getAreaTreeData()
|
||||
this.getData()
|
||||
},
|
||||
methods: {
|
||||
//区域树
|
||||
getAreaTreeData() {
|
||||
systemAreaTreeApi({}).then((response) => {
|
||||
this.treeAreaOptions = response;
|
||||
});
|
||||
},
|
||||
//食堂超市树
|
||||
getTenantGroupAreaTreeData() {
|
||||
tenantGroupAreaTreeApi({
|
||||
// "dataSelectList": this.queryParams.areaIdList,
|
||||
"size": -1,
|
||||
"current": 1
|
||||
}).then((response) => {
|
||||
this.tenantOptions = response;
|
||||
});
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery1() {
|
||||
this.getData();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery1() {
|
||||
this.dateRange = [this.formatDate(new Date()),this.formatDate(new Date())],
|
||||
this.queryParams = {
|
||||
dateType:2,
|
||||
areaIdList:[],
|
||||
canteenStallIds:[]
|
||||
}
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery1();
|
||||
},
|
||||
/** 查询列表 */
|
||||
getData() {
|
||||
console.log(this.queryParams)
|
||||
console.log(this.dateRange)
|
||||
// let param = {
|
||||
// "startDate": this.queryParams.startDate,
|
||||
// "endDate": this.queryParams.endDate,
|
||||
// }
|
||||
// accountDataTotalApi(param).then(response => {
|
||||
// this.accTotalData = response.data
|
||||
// console.log(this.accTotalData)
|
||||
// });
|
||||
this.InitECharts()
|
||||
},
|
||||
InitECharts() {
|
||||
// const chartBox = this.$echarts.init(document.getElementById("lineChartOne"));
|
||||
var option = {
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'shadow',
|
||||
},
|
||||
},
|
||||
legend: {
|
||||
bottom: '-2%',
|
||||
// data: ["Forest", "Steppe", "Desert", "Wetland"],
|
||||
},
|
||||
grid: {
|
||||
left: '0',
|
||||
right: '0',
|
||||
bottom: '10%',
|
||||
containLabel: true,
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
axisTick: { show: false },
|
||||
axisLabel: { color: '#b3b5bb' },
|
||||
data: ['一级', '二级', '三级'],
|
||||
},
|
||||
],
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value',
|
||||
name: '单位(次)',
|
||||
nameTextStyle: {
|
||||
color: '#b3b5bb',
|
||||
alighn: 'end',
|
||||
padding: [0, 0, 0, -15],
|
||||
},
|
||||
nameGap: 30,
|
||||
axisTick: { show: false },
|
||||
axisLine: { show: false },
|
||||
axisLabel: { color: '#b3b5bb' },
|
||||
// 修改y轴分割线
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
color: '#e6e6e6',
|
||||
type: 'dashed',
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: '新增',
|
||||
type: 'bar',
|
||||
barGap: '10%',
|
||||
emphasis: {
|
||||
focus: 'series',
|
||||
},
|
||||
data: [2500, 6000, 4200],
|
||||
itemStyle: {
|
||||
color: '#0091ff',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: '修改',
|
||||
type: 'bar',
|
||||
barGap: '10%',
|
||||
emphasis: {
|
||||
focus: 'series',
|
||||
},
|
||||
itemStyle: {
|
||||
color: '#44d7b6',
|
||||
},
|
||||
data: [5900, 4100, 7900],
|
||||
},
|
||||
{
|
||||
name: '删除',
|
||||
type: 'bar',
|
||||
barGap: '10%',
|
||||
emphasis: {
|
||||
focus: 'series',
|
||||
},
|
||||
itemStyle: {
|
||||
color: '#f7b500',
|
||||
},
|
||||
data: [2500, 5800, 4100],
|
||||
},
|
||||
{
|
||||
name: '导出',
|
||||
type: 'bar',
|
||||
barGap: '10%',
|
||||
emphasis: {
|
||||
focus: 'series',
|
||||
},
|
||||
itemStyle: {
|
||||
color: '#fa1f1f',
|
||||
},
|
||||
data: [1800, 1500, 1900],
|
||||
},
|
||||
],
|
||||
};
|
||||
let myCharts = echarts.init(document.querySelector('#lineChartOne'));
|
||||
myCharts.setOption(option)
|
||||
// chartBox.setOption(option);
|
||||
// // 根据页面大小自动响应图表大小
|
||||
// window.addEventListener("resize", function () {
|
||||
// chartBox.resize();
|
||||
// });
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//日期
|
||||
formatDate(date) {
|
||||
// 格式化为 YYYY-MM-DD
|
||||
const year = date.getFullYear();
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始
|
||||
const day = String(date.getDate()).padStart(2, '0');
|
||||
return `${year}-${month}-${day}`;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.title{
|
||||
color: #00000073;font-size: 14px;margin-bottom: 20px;
|
||||
}
|
||||
.num{
|
||||
font-size: 20px;font-weight: 600;margin-top: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
@ -0,0 +1,344 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-tabs v-model="activeName" @tab-click="handleTabClick">
|
||||
<el-tab-pane label="营业额总览" name="1">
|
||||
<!-- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="90px">
|
||||
<el-form-item label="时间类型">
|
||||
<el-select v-model="queryParams.dateType" style="width: 240px">
|
||||
<el-option label="按日" :value="2"></el-option>
|
||||
<el-option label="按月" :value="1"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="日期范围" v-if="queryParams.dateType==2">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
type="daterange"
|
||||
align="right"
|
||||
unlink-panels
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 220px"
|
||||
:picker-options="pickerOptions">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="日期范围" v-if="queryParams.dateType==1">
|
||||
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="所属区域" prop="areaIdList">
|
||||
<el-cascader v-model="queryParams.areaIdList"
|
||||
:options="treeAreaOptions" :filterable="true" style="width: 220px" :show-all-levels="false"
|
||||
:props="{
|
||||
multiple: true,
|
||||
emitPath: false,// 若设置 false,则只返回该节点的值,只返回最后选择的id
|
||||
checkStrictly: true,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
|
||||
value:'id',label:'treeName'
|
||||
}" clearable collapse-tags @change="getTenantGroupAreaTreeData">
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item label="食堂/超市" prop="canteenStallIds">
|
||||
<el-cascader v-model="queryParams.canteenStallIds"
|
||||
:options="tenantOptions" :filterable="true" style="width: 100%;" :show-all-levels="false"
|
||||
:props="{
|
||||
multiple:true,
|
||||
emitPath: false,// 若设置 false,则只返回该节点的值,只返回最后选择的id
|
||||
checkStrictly: true,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
|
||||
value:'id',label:'treeName'
|
||||
}" collapse-tags
|
||||
clearable>
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery1">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery1">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="width: 100%;display: flex;align-items: center;margin-bottom: 20px;">
|
||||
<div style="width: 24%;">
|
||||
<div class="title">营业额(元)</div>
|
||||
<div class="num">78058.76</div>
|
||||
</div>
|
||||
<div style="width: 24%;">
|
||||
<div class="title">用户数(人)</div>
|
||||
<div class="num">1036</div>
|
||||
</div>
|
||||
<div style="width: 24%;">
|
||||
<div class="title">订单数(个)</div>
|
||||
<div class="num">2215</div>
|
||||
</div>
|
||||
<div style="width: 24%;">
|
||||
<div class="title">均单价(元)</div>
|
||||
<div class="num">8.4</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="width: 100%;margin-bottom: 20px;display: flex;justify-content: flex-end;padding-right: 40px;">
|
||||
<el-radio-group v-model="lineType" size="mini">
|
||||
<el-radio-button label="按食堂"></el-radio-button>
|
||||
<el-radio-button label="按餐次"></el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div id="lineChartOne" style="width: 100%;height: 300px;margin-bottom: 20px;"></div>
|
||||
<div style="width: 100%;height: auto;margin-bottom: 20px;">
|
||||
<div id="pieChartOne" style="width: 50%;height: 250px;"></div>
|
||||
<div id="pieChartTwo" style="width: 50%;height: 250px;"></div>
|
||||
</div>
|
||||
<div style="width: 100%;height: auto;margin-bottom: 20px;">
|
||||
<div id="pieChartThree" style="width: 50%;height: 250px;"></div>
|
||||
<div id="pieChartFour" style="width: 50%;height: 250px;"></div>
|
||||
</div> -->
|
||||
<Business />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="餐次营业额" name="2"></el-tab-pane>
|
||||
<el-tab-pane label="食堂营业额" name="3"></el-tab-pane>
|
||||
<el-tab-pane label="充值分析" name="4"></el-tab-pane>
|
||||
<el-tab-pane label="用户满意度" name="5"></el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import * as echarts from 'echarts'
|
||||
// import { systemAreaTreeApi,tenantGroupAreaTreeApi } from '@/api/reportCenter/analysis'
|
||||
import Business from './business.vue'
|
||||
export default {
|
||||
name: "",
|
||||
dicts: [],
|
||||
components: {
|
||||
Business
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeName:'1',
|
||||
// dateRange:[this.formatDate(new Date()),this.formatDate(new Date())],
|
||||
// pickerOptions: {
|
||||
// shortcuts: [{
|
||||
// text: '最近一周',
|
||||
// onClick(picker) {
|
||||
// const start = new Date();
|
||||
// const end = new Date();
|
||||
// start.setTime(start.getTime() - 3600 * 1000 * 24 * 6);
|
||||
// picker.$emit('pick', [start, end]);
|
||||
// }
|
||||
// },{
|
||||
// text: '最近一个月',
|
||||
// onClick(picker) {
|
||||
// const start = new Date();
|
||||
// const end = new Date();
|
||||
// start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
||||
// picker.$emit('pick', [start, end]);
|
||||
// }
|
||||
// },{
|
||||
// text: '最近三个月',
|
||||
// onClick(picker) {
|
||||
// const start = new Date();
|
||||
// const end = new Date();
|
||||
// start.setTime(start.getTime() - 3600 * 1000 * 24 * 91);
|
||||
// picker.$emit('pick', [start, end]);
|
||||
// }
|
||||
// }]
|
||||
// },
|
||||
// treeAreaOptions:[],//区域树
|
||||
// tenantOptions:[],//食堂超市树 queryParams.areaIdList
|
||||
// queryParams:{
|
||||
// dateType:2,
|
||||
// areaIdList:[],
|
||||
// canteenStallIds:[]
|
||||
// },
|
||||
// lineType:'按食堂',
|
||||
|
||||
};
|
||||
},
|
||||
created() {
|
||||
// this.getAreaTreeData()
|
||||
},
|
||||
methods: {
|
||||
handleTabClick(tab, event) {
|
||||
console.log(tab.name,tab.label)
|
||||
},
|
||||
// //区域树
|
||||
// getAreaTreeData() {
|
||||
// systemAreaTreeApi({}).then((response) => {
|
||||
// this.treeAreaOptions = response;
|
||||
// });
|
||||
// },
|
||||
// //食堂超市树
|
||||
// getTenantGroupAreaTreeData() {
|
||||
// tenantGroupAreaTreeApi({
|
||||
// // "dataSelectList": this.queryParams.areaIdList,
|
||||
// "size": -1,
|
||||
// "current": 1
|
||||
// }).then((response) => {
|
||||
// this.tenantOptions = response;
|
||||
// });
|
||||
// },
|
||||
|
||||
|
||||
|
||||
|
||||
// /** 搜索按钮操作 */
|
||||
// handleQuery1() {
|
||||
// this.getData();
|
||||
// },
|
||||
// /** 重置按钮操作 */
|
||||
// resetQuery1() {
|
||||
// this.dateRange = [this.formatDate(new Date()),this.formatDate(new Date())],
|
||||
// this.queryParams = {
|
||||
// dateType:2,
|
||||
// areaIdList:[],
|
||||
// canteenStallIds:[]
|
||||
// }
|
||||
// this.resetForm("queryForm");
|
||||
// this.handleQuery1();
|
||||
// },
|
||||
// /** 查询列表 */
|
||||
// getData() {
|
||||
// console.log(this.queryParams)
|
||||
// console.log(this.dateRange)
|
||||
// // let param = {
|
||||
// // "startDate": this.queryParams.startDate,
|
||||
// // "endDate": this.queryParams.endDate,
|
||||
// // }
|
||||
// // accountDataTotalApi(param).then(response => {
|
||||
// // this.accTotalData = response.data
|
||||
// // console.log(this.accTotalData)
|
||||
// // });
|
||||
// this.InitECharts()
|
||||
// },
|
||||
// InitECharts() {
|
||||
// // const chartBox = this.$echarts.init(document.getElementById("lineChartOne"));
|
||||
// var option = {
|
||||
// tooltip: {
|
||||
// trigger: 'axis',
|
||||
// axisPointer: {
|
||||
// type: 'shadow',
|
||||
// },
|
||||
// },
|
||||
// legend: {
|
||||
// bottom: '-2%',
|
||||
// // data: ["Forest", "Steppe", "Desert", "Wetland"],
|
||||
// },
|
||||
// grid: {
|
||||
// left: '0',
|
||||
// right: '0',
|
||||
// bottom: '10%',
|
||||
// containLabel: true,
|
||||
// },
|
||||
// xAxis: [
|
||||
// {
|
||||
// type: 'category',
|
||||
// axisTick: { show: false },
|
||||
// axisLabel: { color: '#b3b5bb' },
|
||||
// data: ['一级', '二级', '三级'],
|
||||
// },
|
||||
// ],
|
||||
// yAxis: [
|
||||
// {
|
||||
// type: 'value',
|
||||
// name: '单位(次)',
|
||||
// nameTextStyle: {
|
||||
// color: '#b3b5bb',
|
||||
// alighn: 'end',
|
||||
// padding: [0, 0, 0, -15],
|
||||
// },
|
||||
// nameGap: 30,
|
||||
// axisTick: { show: false },
|
||||
// axisLine: { show: false },
|
||||
// axisLabel: { color: '#b3b5bb' },
|
||||
// // 修改y轴分割线
|
||||
// splitLine: {
|
||||
// lineStyle: {
|
||||
// color: '#e6e6e6',
|
||||
// type: 'dashed',
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// ],
|
||||
// series: [
|
||||
// {
|
||||
// name: '新增',
|
||||
// type: 'bar',
|
||||
// barGap: '10%',
|
||||
// emphasis: {
|
||||
// focus: 'series',
|
||||
// },
|
||||
// data: [2500, 6000, 4200],
|
||||
// itemStyle: {
|
||||
// color: '#0091ff',
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// name: '修改',
|
||||
// type: 'bar',
|
||||
// barGap: '10%',
|
||||
// emphasis: {
|
||||
// focus: 'series',
|
||||
// },
|
||||
// itemStyle: {
|
||||
// color: '#44d7b6',
|
||||
// },
|
||||
// data: [5900, 4100, 7900],
|
||||
// },
|
||||
// {
|
||||
// name: '删除',
|
||||
// type: 'bar',
|
||||
// barGap: '10%',
|
||||
// emphasis: {
|
||||
// focus: 'series',
|
||||
// },
|
||||
// itemStyle: {
|
||||
// color: '#f7b500',
|
||||
// },
|
||||
// data: [2500, 5800, 4100],
|
||||
// },
|
||||
// {
|
||||
// name: '导出',
|
||||
// type: 'bar',
|
||||
// barGap: '10%',
|
||||
// emphasis: {
|
||||
// focus: 'series',
|
||||
// },
|
||||
// itemStyle: {
|
||||
// color: '#fa1f1f',
|
||||
// },
|
||||
// data: [1800, 1500, 1900],
|
||||
// },
|
||||
// ],
|
||||
// };
|
||||
// let myCharts = echarts.init(document.querySelector('#lineChartOne'));
|
||||
// myCharts.setOption(option)
|
||||
// // chartBox.setOption(option);
|
||||
// // // 根据页面大小自动响应图表大小
|
||||
// // window.addEventListener("resize", function () {
|
||||
// // chartBox.resize();
|
||||
// // });
|
||||
// },
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// //日期
|
||||
// formatDate(date) {
|
||||
// // 格式化为 YYYY-MM-DD
|
||||
// const year = date.getFullYear();
|
||||
// const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始
|
||||
// const day = String(date.getDate()).padStart(2, '0');
|
||||
// return `${year}-${month}-${day}`;
|
||||
// }
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.title{
|
||||
color: #00000073;font-size: 14px;margin-bottom: 20px;
|
||||
}
|
||||
.num{
|
||||
font-size: 20px;font-weight: 600;margin-top: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
@ -301,6 +301,7 @@
|
|||
}
|
||||
getSupermarketByAreaApi(param).then((response) => {
|
||||
this.supermarketOptions=response.records||[]
|
||||
this.queryParams.canteenIdList = []
|
||||
});
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@
|
|||
<el-table-column label="用户姓名" align="center" prop="custName" :show-overflow-tooltip="true" width="100"/>
|
||||
<el-table-column label="用户手机号" align="center" prop="mobile" :show-overflow-tooltip="true" width="120"/>
|
||||
<el-table-column label="所属组织" align="center" prop="orgFullName" :show-overflow-tooltip="true" width="120"/>
|
||||
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width" fixed="right">
|
||||
<el-table-column label="操作" align="center" width="100" class-name="small-padding fixed-width" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
|
|
|
|||
|
|
@ -181,6 +181,7 @@
|
|||
}
|
||||
getSupermarketByAreaApi(param).then((response) => {
|
||||
this.supermarketOptions=response.records||[]
|
||||
this.queryParams.canteenIdList = []
|
||||
});
|
||||
},
|
||||
systemMaterialTree() {
|
||||
|
|
|
|||
|
|
@ -198,6 +198,7 @@
|
|||
}
|
||||
getSupermarketByAreaApi(param).then((response) => {
|
||||
this.supermarketOptions=response.records||[]
|
||||
this.queryParams.canteenIdList = []
|
||||
});
|
||||
},
|
||||
systemMaterialTree() {
|
||||
|
|
|
|||
|
|
@ -217,6 +217,7 @@ export default {
|
|||
rules: {
|
||||
materialName: [{ required: true, message: '请输入商品名称', trigger: 'blur' }],
|
||||
areaId: [{ required: true, message: '请选择所属区域', trigger: 'change' }],
|
||||
salePrice: [{ required: true, message: '请输入零售价', trigger: 'change' }],
|
||||
categoryId: [{ required: true, message: '请选择商品类别', trigger: 'change' }],
|
||||
salesMode: [{ required: true, message: '请选择计量类型', trigger: 'change' }],
|
||||
unitId: [{ required: true, message: '请选择商品单位', trigger: 'change' }],
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@
|
|||
<el-input
|
||||
v-model="queryParams.materialName"
|
||||
placeholder="请输入商品名称"
|
||||
clearable
|
||||
clearable maxlength="30"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
|
|
@ -101,7 +101,7 @@
|
|||
<el-input
|
||||
v-model="queryParams.barCode"
|
||||
placeholder="请输入条码"
|
||||
clearable
|
||||
clearable maxlength="30"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
|
|
@ -110,7 +110,7 @@
|
|||
<el-input
|
||||
v-model="queryParams.materialCode"
|
||||
placeholder="请输入商品编码"
|
||||
clearable
|
||||
clearable maxlength="30"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -54,7 +54,8 @@
|
|||
<el-table-column label="超市地址" align="center" prop="address" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="图片" align="center" prop="imgUrl" width="120">
|
||||
<template slot-scope="scope">
|
||||
<img :src="scope.row.imgUrl" alt="" style="width: 80px;height: 40px;" @click="openImg(scope.row)">
|
||||
<img :src="scope.row.imgUrl" v-if="scope.row.imgUrl" alt="" style="width: 80px;height: 40px;" @click="openImg(scope.row)">
|
||||
<span v-else>无</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="联系人" align="center" prop="userName" :show-overflow-tooltip="true" width="100"/>
|
||||
|
|
@ -238,7 +239,7 @@
|
|||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<!-- <el-col :span="12">
|
||||
<el-form-item label="是否开启收款码" prop="ifEnablePayCode">
|
||||
<el-switch
|
||||
v-model="baseForm.ifEnablePayCode"
|
||||
|
|
@ -248,7 +249,7 @@
|
|||
:inactive-value="2">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
|
||||
|
||||
|
|
@ -483,7 +484,8 @@
|
|||
areaIdList:e
|
||||
}
|
||||
drpWareHousePageApi(param).then(response => {
|
||||
this.wareHouseOptions = response.data.records
|
||||
this.wareHouseOptions = response.data.records
|
||||
this.queryParams.warehouseId = null
|
||||
});
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@
|
|||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
type="danger"
|
||||
size="mini" :disabled="multiple"
|
||||
@click="handleBatchRefund"
|
||||
>批量退单</el-button>
|
||||
|
|
@ -185,7 +185,7 @@
|
|||
@click="handleRefundPart(scope.row)"
|
||||
>部分退款</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
size="mini" style="color: red;"
|
||||
type="text" v-if="scope.row.orderStateMix==1||scope.row.orderStateMix==11"
|
||||
@click="handleRefund(scope.row)"
|
||||
>退单</el-button>
|
||||
|
|
@ -538,6 +538,7 @@
|
|||
}
|
||||
getSupermarketByAreaApi(param).then((response) => {
|
||||
this.supermarketOptions=response.records||[]
|
||||
this.queryParams.canteenIdList = []
|
||||
});
|
||||
},
|
||||
handleCanteenChange(e){
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@
|
|||
<el-input v-model="form.unitName" placeholder="请输入计量单位名称" maxlength="10" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单位换算(g)" prop="rate">
|
||||
<el-input v-model="form.rate" placeholder="请输入计量单位名称" maxlength="10" @input="(v)=>(form.rate=v.replace(/[^\d]/g,''))"/>
|
||||
<el-input v-model="form.rate" placeholder="请输入单位换算" maxlength="10" @input="(v)=>(form.rate=v.replace(/[^\d]/g,''))"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="计量类型" prop="weighType">
|
||||
<el-radio-group v-model="form.weighType">
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ module.exports = {
|
|||
// 部署生产环境和开发环境下的URL。
|
||||
// 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上
|
||||
// 例如 https://www.bonus.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.bonus.vip/admin/,则设置 baseUrl 为 /admin/。
|
||||
publicPath: process.env.NODE_ENV === 'production' ? '/' : '/',
|
||||
publicPath: process.env.NODE_ENV === 'production' ? '/glweb/' : '/',
|
||||
// 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
|
||||
outputDir: 'dist',
|
||||
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
|
||||
|
|
@ -35,10 +35,10 @@ module.exports = {
|
|||
proxy: {
|
||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
// target: `http://192.168.2.209:38080`,
|
||||
// target: `http://192.168.2.75:58080`,
|
||||
// target: `http://192.168.0.61:58080`,
|
||||
target: `http://192.168.0.44:58085`,
|
||||
// target: `http://192.168.0.244:18877`,
|
||||
// target: `http://192.168.0.44:58085`,
|
||||
target: `http://192.168.0.244:58580`,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
['^' + process.env.VUE_APP_BASE_API]: '',
|
||||
|
|
|
|||
Loading…
Reference in New Issue