区域食堂档口接口对接
This commit is contained in:
parent
54e9fdef21
commit
6bdc71dbc2
|
|
@ -1,30 +1,29 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 系统区域权限树
|
||||
export function systemAreaTreeApi(data) {
|
||||
export function systemAreaTreeApi(query) {
|
||||
return request({
|
||||
url: '/smart-canteen/api/v2/alloc/area/system-auth/tree',
|
||||
method: 'post',
|
||||
url: '/smart-canteen/alloc_area/areaTree',
|
||||
method: 'get',
|
||||
headers: {
|
||||
"merchant-id":"378915229716713472",
|
||||
},
|
||||
data: data
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 查询区域列表
|
||||
export function getAreaListApi(data) {
|
||||
export function getAreaListApi(query) {
|
||||
return request({
|
||||
url: '/smart-canteen/api/v2/alloc/area/page',
|
||||
method: 'post',
|
||||
url: '/smart-canteen/alloc_area/list',
|
||||
method: 'get',
|
||||
headers: {
|
||||
"merchant-id":"378915229716713472",
|
||||
},
|
||||
data: data
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 集团版--权限区域食堂档口树
|
||||
// 集团版--权限 区域=>食堂/超市=>档口 树
|
||||
export function tenantGroupAreaTreeApi(data) {
|
||||
return request({
|
||||
url: '/smart-canteen/api/v2/alloc/canteen/tenant-group-area/tree',
|
||||
|
|
@ -35,49 +34,23 @@ export function tenantGroupAreaTreeApi(data) {
|
|||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 根据区域id,查询区域名称
|
||||
export function getAreaNameApi(data) {
|
||||
return request({
|
||||
url: '/smart-canteen/api/v2/alloc/area/get-area-name',
|
||||
method: 'post',
|
||||
headers: {
|
||||
"merchant-id":"378915229716713472",
|
||||
},
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 查询区域(食堂,档口,餐线)编号
|
||||
export function getAreaNumApi(data) {
|
||||
return request({
|
||||
url: 'smart-canteen/api/v2/alloc/canteen/get-canteen-num',
|
||||
method: 'post',
|
||||
headers: {
|
||||
"merchant-id":"378915229716713472",
|
||||
},
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 新增区域
|
||||
export function addAreaApi(data) {
|
||||
return request({
|
||||
url: 'smart-canteen/api/v2/alloc/area/add',
|
||||
url: 'smart-canteen/alloc_area',
|
||||
method: 'post',
|
||||
headers: {
|
||||
"merchant-id":"378915229716713472",
|
||||
},
|
||||
data: data
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
//修改区域
|
||||
export function updateAreaApi(data) {
|
||||
return request({
|
||||
url: 'smart-canteen/api/v2/alloc/area/update',
|
||||
url: 'smart-canteen/alloc_area/edit',
|
||||
method: 'post',
|
||||
headers: {
|
||||
"merchant-id":"378915229716713472",
|
||||
|
|
@ -85,14 +58,14 @@ export function updateAreaApi(data) {
|
|||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
//删除区域
|
||||
export function removeAreaApi(data) {
|
||||
export function removeAreaApi(areaIds) {
|
||||
return request({
|
||||
url: 'smart-canteen/api/v2/alloc/area/remove',
|
||||
url: 'smart-canteen/alloc_area/del/'+areaIds,
|
||||
method: 'post',
|
||||
headers: {
|
||||
"merchant-id":"378915229716713472",
|
||||
},
|
||||
data: data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,20 +1,20 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询食堂列表
|
||||
export function getPageCanteenApi(data) {
|
||||
export function getPageCanteenApi(query) {
|
||||
return request({
|
||||
url: '/smart-canteen/api/v2/alloc/canteen/page-canteen',
|
||||
method: 'post',
|
||||
url: '/smart-canteen/alloc_canteen/list',
|
||||
method: 'get',
|
||||
headers: {
|
||||
"merchant-id":"378915229716713472",
|
||||
},
|
||||
data: data
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 新增食堂
|
||||
export function addCanteenApi(data) {
|
||||
return request({
|
||||
url: '/smart-canteen/api/v2/alloc/canteen/add-canteen',
|
||||
url: '/smart-canteen/alloc_canteen',
|
||||
method: 'post',
|
||||
headers: {
|
||||
"merchant-id":"378915229716713472",
|
||||
|
|
@ -23,20 +23,19 @@ export function addCanteenApi(data) {
|
|||
})
|
||||
}
|
||||
// 获取食堂
|
||||
export function getCanteenInfoModifyApi(data) {
|
||||
export function getCanteenInfoModifyApi(canteenId) {
|
||||
return request({
|
||||
url: '/smart-canteen/api/v2/alloc/canteen/get-canteen-for-modify',
|
||||
method: 'post',
|
||||
url: '/smart-canteen/alloc_canteen/'+canteenId,
|
||||
method: 'get',
|
||||
headers: {
|
||||
"merchant-id":"378915229716713472",
|
||||
},
|
||||
data: data
|
||||
}
|
||||
})
|
||||
}
|
||||
// 修改食堂
|
||||
export function updateCanteenApi(data) {
|
||||
return request({
|
||||
url: '/smart-canteen/api/v2/alloc/canteen/modify-canteen',
|
||||
url: '/smart-canteen/alloc_canteen/edit',
|
||||
method: 'post',
|
||||
headers: {
|
||||
"merchant-id":"378915229716713472",
|
||||
|
|
@ -45,75 +44,15 @@ export function updateCanteenApi(data) {
|
|||
})
|
||||
}
|
||||
// 删除食堂
|
||||
export function removeCanteenApi(data) {
|
||||
export function removeCanteenApi(canteenIds) {
|
||||
return request({
|
||||
url: '/smart-canteen/api/v2/alloc/canteen/remove-canteen',
|
||||
url: '/smart-canteen/alloc_canteen/del/'+canteenIds,
|
||||
method: 'post',
|
||||
headers: {
|
||||
"merchant-id":"378915229716713472",
|
||||
},
|
||||
data: data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 查询食堂编号
|
||||
export function getCanteenNumApi(data) {
|
||||
return request({
|
||||
url: 'smart-canteen/api/v2/alloc/canteen/get-canteen-num',
|
||||
method: 'post',
|
||||
headers: {
|
||||
"merchant-id":"378915229716713472",
|
||||
},
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询食堂标签列表(分页)
|
||||
export function getCanteenLabelApi(data) {
|
||||
return request({
|
||||
url: '/smart-canteen/api/v2/alloc/label/page',
|
||||
method: 'post',
|
||||
headers: {
|
||||
"merchant-id":"378915229716713472",
|
||||
},
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 通过角色查人员
|
||||
export function userListByRoleApi(data) {
|
||||
return request({
|
||||
url: '/system/user/listByPost',
|
||||
method: 'post',
|
||||
headers: {
|
||||
"merchant-id":"378915229716713472",
|
||||
},
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 人员职位职称查询
|
||||
export function queryAllCustJobApi(data) {
|
||||
return request({
|
||||
url: '/smart-canteen/custJob/queryAllCustJob',
|
||||
method: 'post',
|
||||
headers: {
|
||||
"merchant-id":"378915229716713472",
|
||||
},
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 分页查询人员及职位信息
|
||||
export function queryCustJobPageApi(data) {
|
||||
return request({
|
||||
url: '/smart-canteen/custInfo/page-cust-job-info',
|
||||
method: 'post',
|
||||
headers: {
|
||||
"merchant-id":"378915229716713472",
|
||||
},
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询餐次时段列表
|
||||
export function getMealtimeListApi(data) {
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 通过区域Id查询食堂
|
||||
export function getCanteenByAreaApi(data) {
|
||||
export function getCanteenByAreaApi(query) {
|
||||
return request({
|
||||
url: '/smart-canteen/api/v2/alloc/canteen/list-all-auth-canteen',
|
||||
method: 'post',
|
||||
url: '/smart-canteen/alloc_canteen/list',
|
||||
method: 'get',
|
||||
headers: {
|
||||
"merchant-id":"378915229716713472",
|
||||
},
|
||||
data: data
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -30,20 +30,20 @@ export function getStallByCanteenApi(data) {
|
|||
|
||||
|
||||
// 查询档口列表
|
||||
export function getPageStallApi(data) {
|
||||
export function getPageStallApi(query) {
|
||||
return request({
|
||||
url: '/smart-canteen/api/v2/alloc/canteen/page-stall',
|
||||
method: 'post',
|
||||
url: '/smart-canteen/alloc_stall/list',
|
||||
method: 'get',
|
||||
headers: {
|
||||
"merchant-id":"378915229716713472",
|
||||
},
|
||||
data: data
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 新增档口
|
||||
export function addStallApi(data) {
|
||||
return request({
|
||||
url: '/smart-canteen/api/v2/alloc/canteen/add-stall',
|
||||
url: '/smart-canteen/alloc_stall',
|
||||
method: 'post',
|
||||
headers: {
|
||||
"merchant-id":"378915229716713472",
|
||||
|
|
@ -52,20 +52,19 @@ export function addStallApi(data) {
|
|||
})
|
||||
}
|
||||
// 获取档口
|
||||
export function getStallInfoModifyApi(data) {
|
||||
export function getStallInfoModifyApi(stallId) {
|
||||
return request({
|
||||
url: '/smart-canteen/api/v2/alloc/canteen/get-stall-for-modify',
|
||||
method: 'post',
|
||||
url: '/smart-canteen/alloc_stall/'+stallId,
|
||||
method: 'get',
|
||||
headers: {
|
||||
"merchant-id":"378915229716713472",
|
||||
},
|
||||
data: data
|
||||
}
|
||||
})
|
||||
}
|
||||
// 修改档口
|
||||
export function updateStallApi(data) {
|
||||
return request({
|
||||
url: '/smart-canteen/api/v2/alloc/canteen/modify-stall',
|
||||
url: '/smart-canteen/alloc_stall/edit',
|
||||
method: 'post',
|
||||
headers: {
|
||||
"merchant-id":"378915229716713472",
|
||||
|
|
@ -74,14 +73,13 @@ export function updateStallApi(data) {
|
|||
})
|
||||
}
|
||||
// 删除档口
|
||||
export function removeStallApi(data) {
|
||||
export function removeStallApi(stallIds) {
|
||||
return request({
|
||||
url: '/smart-canteen/api/v2/alloc/canteen/remove-stall',
|
||||
url: '/smart-canteen/alloc_stall/del/'+stallIds,
|
||||
method: 'post',
|
||||
headers: {
|
||||
"merchant-id":"378915229716713472",
|
||||
},
|
||||
data: data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ export function systemAreaTreeApi(data) {
|
|||
})
|
||||
}
|
||||
|
||||
//区域食堂档口树
|
||||
//集团版--权限 区域=>食堂/超市=>档口 树
|
||||
export function tenantGroupAreaTreeApi(data) {
|
||||
return request({
|
||||
url: '/smart-canteen/api/v2/alloc/canteen/tenant-group-area/tree',
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@
|
|||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
size="mini"
|
||||
@click="handleBatchEdit"
|
||||
|
|
@ -66,7 +66,7 @@
|
|||
<el-badge :value="expiredCount" class="item">
|
||||
<el-button size="mini" @click="openExpiredAcc" >过期用户</el-button>
|
||||
</el-badge>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
<el-table v-loading="loading" :data="tableListData" height="800" :span-method="objectSpanMethod">
|
||||
|
|
@ -127,11 +127,11 @@
|
|||
|
||||
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width" fixed="right">
|
||||
<template slot-scope="scope" v-if="scope.$index!=10">
|
||||
<el-button
|
||||
<!-- <el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>编辑</el-button>
|
||||
>编辑</el-button> -->
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text" style="color: red;"
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
:filter-node-method="filterNode"
|
||||
ref="tree"
|
||||
node-key="id"
|
||||
:default-expand-all="false"
|
||||
:default-expand-all="true"
|
||||
highlight-current
|
||||
@node-click="handleNodeClick"
|
||||
>
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
<el-button
|
||||
type="text"
|
||||
size="mini"
|
||||
icon="el-icon-plus" v-if="data.sortNo<3"
|
||||
icon="el-icon-plus" v-if="data.level<1"
|
||||
@click.stop="() => appendTreeNode(data)"
|
||||
>
|
||||
</el-button>
|
||||
|
|
@ -109,13 +109,13 @@
|
|||
<template slot-scope="scope">
|
||||
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="区域编号" align="center" key="areaNum" prop="areaNum" show-overflow-tooltip/>
|
||||
</el-table-column>
|
||||
<el-table-column label="区域名称" align="center" key="areaName" prop="areaName" show-overflow-tooltip/>
|
||||
<el-table-column label="区域描述" align="center" key="areaDescribe" prop="areaDescribe" show-overflow-tooltip/>
|
||||
<el-table-column label="上级区域" align="center" key="superAreaName" prop="superAreaName" show-overflow-tooltip/>
|
||||
<el-table-column label="负责人" align="center" key="director" prop="director" show-overflow-tooltip/>
|
||||
<el-table-column label="电话" align="center" key="contactTel" prop="contactTel" show-overflow-tooltip/>
|
||||
<!-- <el-table-column label="上级区域" align="center" key="parentName" prop="parentName" show-overflow-tooltip/> -->
|
||||
<el-table-column label="联系人" align="center" key="director" prop="director" show-overflow-tooltip/>
|
||||
<el-table-column label="联系方式" align="center" key="contactTel" prop="contactTel" show-overflow-tooltip/>
|
||||
<el-table-column label="创建时间" align="center" key="createTime" prop="createTime" show-overflow-tooltip/>
|
||||
<el-table-column label="操作" align="center" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
|
|
@ -151,23 +151,11 @@
|
|||
<el-dialog
|
||||
:title="title+'-区域'"
|
||||
:visible.sync="open"
|
||||
width="1000px"
|
||||
width="600px"
|
||||
append-to-body
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="区域编号" prop="areaNum">
|
||||
<el-input
|
||||
v-model="form.areaNum"
|
||||
type="text" disabled
|
||||
placeholder="请输入区域编号"
|
||||
maxlength="30"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="区域名称" prop="areaName">
|
||||
<el-input
|
||||
v-model="form.areaName"
|
||||
|
|
@ -175,11 +163,7 @@
|
|||
placeholder="请输入区域名称"
|
||||
maxlength="30"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
</el-form-item>
|
||||
<el-form-item label="区域描述" prop="areaDescribe">
|
||||
<el-input
|
||||
v-model="form.areaDescribe"
|
||||
|
|
@ -187,31 +171,32 @@
|
|||
placeholder="请输入区域描述"
|
||||
maxlength="30"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="上级区域" prop="superAreaName">
|
||||
<el-input
|
||||
v-model="form.superAreaName"
|
||||
</el-form-item>
|
||||
<el-form-item label="上级区域" prop="parentName" v-if="title=='新增'">
|
||||
<el-input v-model="form.parentName"
|
||||
type="text" disabled
|
||||
placeholder="请输入上级区域"
|
||||
maxlength="30"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="负责人" prop="director">
|
||||
</el-form-item>
|
||||
<el-form-item label="上级区域" prop="parentId" v-if="title=='修改'">
|
||||
<el-cascader v-model="form.parentId"
|
||||
:options="treeOptions" :filterable="true" style="width: 100%;" :show-all-levels="false"
|
||||
:props="{
|
||||
emitPath: false,// 若设置 false,则只返回该节点的值,只返回最后选择的id
|
||||
checkStrictly: true,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
|
||||
value:'id',label:'label'
|
||||
}" clearable>
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系人" prop="director">
|
||||
<el-input
|
||||
v-model="form.director"
|
||||
type="text" clearable
|
||||
placeholder="请输入负责人"
|
||||
maxlength="30"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
</el-form-item>
|
||||
<el-form-item label="联系方式" prop="contactTel">
|
||||
<el-input
|
||||
v-model="form.contactTel"
|
||||
|
|
@ -220,8 +205,6 @@
|
|||
maxlength="11" clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<template>
|
||||
|
|
@ -242,7 +225,7 @@
|
|||
<script>
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
import { systemAreaTreeApi,getAreaListApi,getAreaNameApi,getAreaNumApi,addAreaApi,updateAreaApi,removeAreaApi } from "@/api/base/area";
|
||||
import { systemAreaTreeApi,getAreaListApi,addAreaApi,updateAreaApi,removeAreaApi } from "@/api/base/area";
|
||||
// import { imgUpLoad } from "@/api/system/upload";
|
||||
|
||||
export default {
|
||||
|
|
@ -266,7 +249,7 @@
|
|||
isMousemoveId: null,
|
||||
defaultProps: {
|
||||
children: "children",
|
||||
label: "treeName",
|
||||
label: "label",
|
||||
},
|
||||
areaName:"",
|
||||
areaId:"",
|
||||
|
|
@ -322,12 +305,13 @@
|
|||
// 筛选节点 - 左侧树
|
||||
filterNode(value, data) {
|
||||
if (!value) return true;
|
||||
return data.treeName.indexOf(value) !== -1;
|
||||
return data.label.indexOf(value) !== -1;
|
||||
},
|
||||
/** 查询新增页面-上级类型下拉树结构 */
|
||||
getTreeData() {
|
||||
systemAreaTreeApi({}).then((response) => {
|
||||
this.treeOptions = response;
|
||||
this.treeOptions = response.data;
|
||||
this.addLevel(this.treeOptions)
|
||||
console.log(this.treeOptions)
|
||||
if(this.treeOptions&&this.treeOptions.length>0){
|
||||
this.areaId = this.treeOptions[0].id
|
||||
|
|
@ -338,6 +322,14 @@
|
|||
}
|
||||
});
|
||||
},
|
||||
addLevel(nodes, level = 0) {
|
||||
nodes.forEach(node => {
|
||||
node.level = level; // 设置当前节点的层级
|
||||
if (node.children) { // 如果节点有子节点,递归处理子节点
|
||||
this.addLevel(node.children, level + 1);
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
|
|
@ -361,7 +353,7 @@
|
|||
"current": this.queryParams.pageNum
|
||||
}
|
||||
getAreaListApi(params).then((response) => {
|
||||
this.typeList = response.records;
|
||||
this.typeList = response.rows;
|
||||
this.total = Number(response.total);
|
||||
this.loading = false;
|
||||
});
|
||||
|
|
@ -371,45 +363,13 @@
|
|||
console.log(data)
|
||||
this.areaId = data.id;
|
||||
this.handleQuery();
|
||||
},
|
||||
|
||||
// 节点单击事件 - 左侧树
|
||||
async getAreaName(data) {
|
||||
let params= {
|
||||
"areaId":data.id
|
||||
}
|
||||
const res = await getAreaNameApi(params);
|
||||
this.$set(this.form,"superAreaName",res.msg)
|
||||
},
|
||||
// 节点单击事件 - 左侧树
|
||||
async getAreaNum(data) {
|
||||
let params= {
|
||||
"superId":data.id||""
|
||||
}
|
||||
if(data.parentId=="-1"){
|
||||
params.canteenTreeType=-1
|
||||
}else{
|
||||
params.canteenTreeType=0
|
||||
}
|
||||
const res = await getAreaNumApi(params);
|
||||
this.$set(this.form,"areaNum",res.data)
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
/* 树节点增加 */
|
||||
appendTreeNode(data) {
|
||||
console.log("dataAdd", data);
|
||||
this.reset();
|
||||
if(data.parentId=="-1"){
|
||||
this.$set(this.form,"superAreaName",data.treeName)
|
||||
this.getAreaNum(data)
|
||||
}else{
|
||||
this.getAreaName(data)
|
||||
this.getAreaNum(data)
|
||||
}
|
||||
|
||||
this.$set(this.form,"areaName","")
|
||||
this.$set(this.form,"superId",data.id)
|
||||
this.$set(this.form,"parentName",data.label)
|
||||
this.$set(this.form,"parentId",data.id)
|
||||
this.open = true;
|
||||
this.title = "新增";
|
||||
},
|
||||
|
|
@ -419,7 +379,7 @@
|
|||
this.$modal
|
||||
.confirm("是否确认删除数据项?")
|
||||
.then(function () {
|
||||
return removeAreaApi({"areaId":data.id});
|
||||
return removeAreaApi(data.id);
|
||||
})
|
||||
.then(() => {
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
|
|
@ -454,12 +414,12 @@
|
|||
console.log(row)
|
||||
this.$set(this.form,"areaDescribe",row.areaDescribe)
|
||||
this.$set(this.form,"areaId",row.areaId)
|
||||
this.$set(this.form,"areaName",row.areaName)
|
||||
this.$set(this.form,"areaNum",row.areaNum)
|
||||
this.$set(this.form,"areaName",row.areaName)
|
||||
this.$set(this.form,"contactTel",row.contactTel)
|
||||
this.$set(this.form,"director",row.director)
|
||||
this.$set(this.form,"superAreaName",row.superAreaName)
|
||||
this.$set(this.form,"superId",row.superId)
|
||||
this.$set(this.form,"parentName",row.parentName)
|
||||
this.$set(this.form,"parentId",row.parentId)
|
||||
|
||||
this.open = true;
|
||||
this.title = "修改";
|
||||
},
|
||||
|
|
@ -491,7 +451,7 @@
|
|||
this.$modal
|
||||
.confirm("是否确认删除数据项?")
|
||||
.then(function () {
|
||||
return removeAreaApi({"areaId":row.areaId});
|
||||
return removeAreaApi(row.areaId);
|
||||
})
|
||||
.then(() => {
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
|
|
@ -499,26 +459,7 @@
|
|||
this.getTreeData();
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
|
||||
|
||||
|
||||
getParentName(list, id) {
|
||||
try {
|
||||
list.forEach((e) => {
|
||||
if (e.id == id) {
|
||||
this.form.label = e.label;
|
||||
throw new Error();
|
||||
} else {
|
||||
if (e.children && e.children.length > 0) {
|
||||
this.getParentName(e.children, id);
|
||||
}
|
||||
}
|
||||
});
|
||||
} catch (error) {}
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,15 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="所属区域" prop="areaIds">
|
||||
<el-cascader
|
||||
v-model="queryParams.areaIds" :show-all-levels="false" :filterable="true"
|
||||
:options="treeOptions" :props="treeProps" collapse-tags clearable
|
||||
@change="handleTreeChange"></el-cascader>
|
||||
<el-form-item label="所属区域" prop="areaId">
|
||||
<el-cascader v-model="queryParams.areaId"
|
||||
:options="treeOptions" :filterable="true" style="width: 100%;" :show-all-levels="false"
|
||||
:props="{
|
||||
emitPath: false,// 若设置 false,则只返回该节点的值,只返回最后选择的id
|
||||
checkStrictly: false,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
|
||||
value:'id',label:'label'
|
||||
}" clearable>
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item label="食堂名称" prop="canteenName">
|
||||
<el-input
|
||||
|
|
@ -31,25 +35,21 @@
|
|||
size="mini"
|
||||
@click="handleAdd"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="tableListData" height="800">
|
||||
<el-table-column label="食堂编号" align="center" prop="canteenNum" :show-overflow-tooltip="true" width="100" fixed="left"/>
|
||||
<el-table-column label="食堂名称" align="center" prop="canteenName" :show-overflow-tooltip="true" width="150" fixed="left"/>
|
||||
<el-table-column label="所属区域" align="center" prop="areaNameStr" :show-overflow-tooltip="true" width="180"/>
|
||||
<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="businessState" :show-overflow-tooltip="true" width="80">
|
||||
<el-table-column label="所属区域" align="center" prop="areaName" :show-overflow-tooltip="true" width="180"/>
|
||||
<el-table-column label="负责人" align="center" prop="director" :show-overflow-tooltip="true" width="120"/>
|
||||
<el-table-column label="联系电话" align="center" prop="contactTel" :show-overflow-tooltip="true" width="120"/>
|
||||
<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="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 }}
|
||||
|
|
@ -79,49 +79,18 @@
|
|||
>
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="最大容纳人数" align="center" prop="capacity" :show-overflow-tooltip="true" width="100"/>
|
||||
<!-- <el-table-column label="客流统计" align="center" prop="" :show-overflow-tooltip="true" width="80">
|
||||
<template slot-scope="scope">
|
||||
<span style="color: #4b80fd;">详情</span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<!-- <el-table-column label="区域人数统计" align="center" prop="" :show-overflow-tooltip="true" width="80">
|
||||
<template slot-scope="scope">
|
||||
<span style="color: #4b80fd;">详情</span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="食堂图片" align="center" prop="imgUrl" width="100">
|
||||
</el-table-column> -->
|
||||
<el-table-column label="食堂图片" align="center" prop="imgUrl">
|
||||
<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="canteenName" :show-overflow-tooltip="true" width="80">
|
||||
<template slot-scope="scope">
|
||||
<span style="color: #4b80fd;">详情</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="配送设置" align="center" prop="canteenName" :show-overflow-tooltip="true" width="80">
|
||||
<template slot-scope="scope">
|
||||
<span style="color: #4b80fd;">详情</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="预订/点餐/报餐设置" align="center" prop="" :show-overflow-tooltip="true" width="140">
|
||||
<template slot-scope="scope">
|
||||
<span style="color: #4b80fd;">详情</span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="收款码" align="center" prop="payCodeUrl" :show-overflow-tooltip="true" width="80">
|
||||
<template slot-scope="scope">
|
||||
<span>未开启</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" align="center" prop="crtime" :show-overflow-tooltip="true" width="160"/>
|
||||
<el-table-column label="更新时间" align="center" prop="uptime" :show-overflow-tooltip="true" width="160"/>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="更新时间" align="center" prop="updateTime" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
<!-- <el-button
|
||||
size="mini"
|
||||
type="text" v-if="scope.row.businessState==2"
|
||||
@click="handleRest(scope.row)"
|
||||
|
|
@ -130,7 +99,7 @@
|
|||
size="mini"
|
||||
type="text" v-if="scope.row.businessState==1"
|
||||
@click="handleBuss(scope.row)"
|
||||
>营业</el-button>
|
||||
>营业</el-button> -->
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
|
|
@ -158,38 +127,33 @@
|
|||
<el-dialog :title="title+'-食堂'" :visible.sync="open" width="1000px" append-to-body>
|
||||
<el-tabs v-model="activeName" @tab-click="handleTabClick">
|
||||
<!-- 基础设置 -->
|
||||
<el-tab-pane label="基础设置" name="baseSetting" style="height: 600px;overflow-y: auto;">
|
||||
<el-tab-pane label="基础设置" name="baseSetting" style="height: 500px;overflow-y: auto;">
|
||||
<el-form ref="baseForm" :model="baseForm" :rules="baseFormRules" label-width="80px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="食堂编号" prop="canteenNum">
|
||||
<el-input v-model="baseForm.canteenNum" placeholder="请输入食堂编号" maxlength="30" disabled clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="食堂名称" prop="canteenName">
|
||||
<el-input v-model="baseForm.canteenName" placeholder="请输入食堂名称" maxlength="30" clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属区域" prop="areaId">
|
||||
<el-cascader v-model="baseForm.areaId"
|
||||
:options="treeOptions" :filterable="true" style="width: 400px;" :show-all-levels="false"
|
||||
:props="{
|
||||
emitPath: false,// 若设置 false,则只返回该节点的值,只返回最后选择的id
|
||||
checkStrictly: true,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
|
||||
value:'id',label:'treeName'
|
||||
checkStrictly: false,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
|
||||
value:'id',label:'label'
|
||||
}"
|
||||
clearable @change="handleTreeChange2" >
|
||||
clearable>
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="营业时间">
|
||||
<el-time-picker
|
||||
is-range
|
||||
is-range style="width: 100%;"
|
||||
v-model="rangeTime"
|
||||
value-format="HH:mm:ss"
|
||||
range-separator="至"
|
||||
|
|
@ -199,43 +163,24 @@
|
|||
</el-time-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="食堂标签" prop="labelNameList">
|
||||
<el-select v-model="baseForm.labelNameList" multiple placeholder="请选择食堂标签" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="dict in dict.type.stall_tag"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.label"
|
||||
/>
|
||||
<!-- <el-option v-for="item in labelOptions"
|
||||
:key="item.labelName"
|
||||
:label="item.labelName"
|
||||
:value="item.labelName"
|
||||
></el-option> -->
|
||||
<el-form-item label="营业状态">
|
||||
<el-select v-model="baseForm.businessState" placeholder="请选择营业状态" style="width: 100%;" clearable>
|
||||
<el-option label="休息" :value="1" />
|
||||
<el-option label="营业" :value="2" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="食堂最大容纳人数" prop="capacity">
|
||||
<el-input v-model="baseForm.capacity" placeholder="请输入食堂最大容纳人数" maxlength="9" clearable
|
||||
@input="(v)=>(baseForm.capacity=v.replace(/[^\d]/g,''))"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="负责人" prop="custId">
|
||||
<!-- <el-select v-model="baseForm.custName" placeholder="请选择负责人" style="width: 100%;" @focus="openChosenCharger"></el-select> -->
|
||||
<el-select v-model="baseForm.custId" placeholder="请选择负责人" style="width: 100%;" clearable @change="chosenUser">
|
||||
<el-option v-for="item in userOptions"
|
||||
:key="item.custId"
|
||||
:label="item.nickName"
|
||||
:value="item.custId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-form-item label="负责人" prop="director">
|
||||
<el-input
|
||||
v-model="baseForm.director"
|
||||
type="text" clearable
|
||||
placeholder="请输入负责人"
|
||||
maxlength="30"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
|
|
@ -247,7 +192,7 @@
|
|||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否开启预订餐" prop="ifReserve">
|
||||
<el-form-item label="是否开启预订餐" prop="ifReserve" label-width="120">
|
||||
<el-switch
|
||||
v-model="baseForm.ifReserve"
|
||||
active-text="开启"
|
||||
|
|
@ -269,18 +214,7 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<!-- <el-col :span="12">
|
||||
<el-form-item label="是否开启收款码" prop="ifEnablePayCode">
|
||||
<el-switch
|
||||
v-model="baseForm.ifEnablePayCode"
|
||||
active-text="开启"
|
||||
inactive-text="关闭"
|
||||
:active-value="1"
|
||||
:inactive-value="2">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="食堂图片">
|
||||
<el-upload
|
||||
|
|
@ -364,7 +298,7 @@
|
|||
</div>
|
||||
</el-tab-pane> -->
|
||||
<!-- 预订/点餐/报餐设置 -->
|
||||
<el-tab-pane label="预订设置" name="orderSetting" style="height: 600px;overflow-y: auto;">
|
||||
<!-- <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">
|
||||
|
|
@ -404,8 +338,7 @@
|
|||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"
|
||||
placeholder="选择时间范围" @change="changeOrderTimeList(scope.row)">
|
||||
</el-time-picker>
|
||||
<!-- <span>{{scope.row.startTime}}</span>-<span>{{scope.row.endTime}}</span> -->
|
||||
</el-time-picker>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="预定餐" align="center">
|
||||
|
|
@ -498,7 +431,7 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
</el-tab-pane> -->
|
||||
</el-tabs>
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
|
|
@ -507,45 +440,7 @@
|
|||
</div>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<el-dialog title="选择负责人" :visible.sync="openJob" width="800px" append-to-body>
|
||||
<el-form :model="dialogQueryParams" ref="dialogQueryForm" size="small" :inline="true" label-width="68px">
|
||||
<el-form-item label="" prop="keyword">
|
||||
<el-input v-model="dialogQueryParams.keyword" placeholder="请输入姓名,编号,手机号" clearable style="width: 240px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="job">
|
||||
<el-select v-model="dialogQueryParams.job" placeholder="请选择职位" style="width: 100%;">
|
||||
<el-option v-for="item in jobOptions"
|
||||
:key="item.jobId"
|
||||
:label="item.jobName"
|
||||
:value="item.jobCode"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleDialogQuery">搜索</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table :data="jobTableData" height="500" highlight-current-row @current-change="handleCurrentChange">
|
||||
<el-table-column label="负责人姓名" align="center" prop="custName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="负责人编号" align="center" prop="custNum" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="负责人手机号" align="center" prop="mobile" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="职位" align="center" prop="job" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="所属组织" align="center" prop="orgFullName" :show-overflow-tooltip="true"/>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="dialogTotal>0"
|
||||
:total="dialogTotal"
|
||||
:page.sync="dialogQueryParams.pageNum"
|
||||
:limit.sync="dialogQueryParams.pageSize"
|
||||
@pagination="queryCustJobPage"
|
||||
/>
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="confirmChosenCharger">确 定</el-button>
|
||||
<el-button @click="openJob=false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible">
|
||||
<img width="100%" :src="dialogImageUrl" alt="">
|
||||
|
|
@ -560,8 +455,8 @@
|
|||
|
||||
<script>
|
||||
import { systemAreaTreeApi } from "@/api/base/area";
|
||||
import { getPageCanteenApi, getCanteenNumApi, addCanteenApi, getCanteenInfoModifyApi, updateCanteenApi, removeCanteenApi } from "@/api/base/canteen";
|
||||
import { getCanteenLabelApi, queryAllCustJobApi, queryCustJobPageApi, getMealtimeListApi,changeIfReserveApi,changeBusinessStateApi,userListByRoleApi } from "@/api/base/canteen";
|
||||
import { getPageCanteenApi, addCanteenApi, getCanteenInfoModifyApi, updateCanteenApi, removeCanteenApi } from "@/api/base/canteen";
|
||||
import { getMealtimeListApi,changeIfReserveApi,changeBusinessStateApi } from "@/api/base/canteen";
|
||||
import { imgUpLoadTwo } from '@/api/system/upload'
|
||||
export default {
|
||||
name: "",
|
||||
|
|
@ -588,9 +483,9 @@
|
|||
open: false,
|
||||
treeOptions:[],//区域树
|
||||
treeProps:{
|
||||
multiple: true,
|
||||
multiple: false,
|
||||
value:"id",
|
||||
label:"treeName",
|
||||
label:"label",
|
||||
children:"children",
|
||||
},
|
||||
// 查询参数
|
||||
|
|
@ -598,7 +493,7 @@
|
|||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
canteenName: undefined,
|
||||
areaIds: [],
|
||||
areaId: undefined,
|
||||
},
|
||||
activeName:"baseSetting",
|
||||
canteenId:"",//食堂数据-编辑
|
||||
|
|
@ -607,16 +502,14 @@
|
|||
"areaId": "",
|
||||
"canteenName": "",
|
||||
"canteenNum": "",
|
||||
"capacity": "",
|
||||
"contactTel": "",
|
||||
"custId": "",
|
||||
"director": "",
|
||||
"endBusinessTime": "",
|
||||
"startBusinessTime": "",
|
||||
"ifBook": 2,
|
||||
"ifEnablePayCode": 2,
|
||||
"ifReserve": 2,
|
||||
"imgUrl": "",
|
||||
"labelNameList": []
|
||||
},//基础设置
|
||||
rangeTime:["08:00:00", "18:00:00"],//营业时间
|
||||
// 表单校验
|
||||
|
|
@ -635,19 +528,6 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
labelOptions:[],//食堂标签下拉
|
||||
userOptions:[],//负责人下拉
|
||||
//选择负责人弹窗
|
||||
openJob: false,
|
||||
jobOptions:[],//职位标签下拉
|
||||
dialogQueryParams:{//负责人查询条件
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
jobTableData:[],//负责人弹窗
|
||||
// 总条数
|
||||
dialogTotal: 0,
|
||||
currentCustRow:{},//选中的负责人数据
|
||||
fileList: [],//食堂图片
|
||||
checkUrlList: [],//食堂图片
|
||||
checkUrlNameList: [],//食堂图片
|
||||
|
|
@ -713,9 +593,6 @@
|
|||
created() {
|
||||
this.getTreeData();
|
||||
this.getList();
|
||||
this.getCanteenLabel()
|
||||
this.queryAllCustJob()
|
||||
this.mgruserListByRole()
|
||||
},
|
||||
computed: {
|
||||
//图片上传1张后,隐藏上传框
|
||||
|
|
@ -727,13 +604,9 @@
|
|||
//区域树
|
||||
getTreeData() {
|
||||
systemAreaTreeApi({}).then((response) => {
|
||||
this.treeOptions = response;
|
||||
console.log(this.treeOptions)
|
||||
this.treeOptions = response.data;
|
||||
});
|
||||
},
|
||||
handleTreeChange(e){
|
||||
console.log(e)
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
|
|
@ -747,25 +620,19 @@
|
|||
/** 查询列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
let arr=[]
|
||||
if(this.queryParams.areaIds.length>0){
|
||||
this.queryParams.areaIds.forEach(item=>{
|
||||
arr.push(item[item.length - 1])
|
||||
})
|
||||
}
|
||||
let param = {
|
||||
"current": this.queryParams.pageNum,
|
||||
"size": this.queryParams.pageSize,
|
||||
"canteenType": 1,
|
||||
"canteenName": this.queryParams.canteenName,
|
||||
"areaIdList":arr
|
||||
"areaId":this.queryParams.areaId
|
||||
}
|
||||
getPageCanteenApi(param).then(response => {
|
||||
this.tableListData = response.records;
|
||||
this.tableListData = response.rows;
|
||||
this.total = Number(response.total);
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
|
||||
//修改食堂是否支持预订餐
|
||||
changeIfReserve(row){
|
||||
let param = {
|
||||
|
|
@ -784,7 +651,7 @@
|
|||
handleAdd() {
|
||||
this.canteenId=""
|
||||
this.reset();
|
||||
this.getMealtimeList()
|
||||
// this.getMealtimeList()
|
||||
this.activeName="baseSetting"
|
||||
this.open = true;
|
||||
this.title = "新增";
|
||||
|
|
@ -799,21 +666,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.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");
|
||||
},
|
||||
|
|
@ -822,28 +689,27 @@
|
|||
console.log(row)
|
||||
this.reset();
|
||||
this.activeName="baseSetting"
|
||||
getCanteenInfoModifyApi({"canteenId":row.canteenId}).then(response => {
|
||||
getCanteenInfoModifyApi(row.canteenId).then(response => {
|
||||
console.log(response)
|
||||
this.canteenId = response.canteenId;
|
||||
this.baseForm = response.canteenSaveDTO;
|
||||
// this.getCanteenNum()
|
||||
if(response.canteenSaveDTO.imgUrl){
|
||||
this.fileList=[{url:response.canteenSaveDTO.imgUrl}]
|
||||
this.checkUrlList=[response.canteenSaveDTO.imgUrl]
|
||||
this.canteenId = response.data.canteenId;
|
||||
this.baseForm = response.data;
|
||||
if(response.data.imgUrl){
|
||||
this.fileList=[{url:response.data.imgUrl}]
|
||||
this.checkUrlList=[response.data.imgUrl]
|
||||
}else{
|
||||
this.fileList=[]
|
||||
this.checkUrlList=[]
|
||||
}
|
||||
this.rangeTime=[response.canteenSaveDTO.startBusinessTime, response.canteenSaveDTO.endBusinessTime]
|
||||
this.deliveryModel = response.deliveryModel;
|
||||
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.rangeTime=[response.data.startBusinessTime, response.data.endBusinessTime]
|
||||
// this.deliveryModel = response.deliveryModel;
|
||||
// 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 = "修改";
|
||||
});
|
||||
|
|
@ -851,7 +717,7 @@
|
|||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
this.$modal.confirm('是否确认删除数据项?').then(function() {
|
||||
return removeCanteenApi({"canteenId":row.canteenId});
|
||||
return removeCanteenApi(row.canteenId);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
|
|
@ -894,44 +760,45 @@
|
|||
this.baseForm.startBusinessTime=this.rangeTime[0]
|
||||
this.baseForm.endBusinessTime=this.rangeTime[1]
|
||||
this.baseForm.imgUrl = this.checkUrlList[0]
|
||||
let param ={
|
||||
"canteenSaveDTO": this.baseForm,
|
||||
"payDTO": this.payDTO,
|
||||
"deliveryModel": {//配送设置
|
||||
"deliveries": "",
|
||||
"deliveryList": [
|
||||
{
|
||||
"deliveryEndTime": "23:59:59",
|
||||
"deliveryStartTime": "00:00:00",
|
||||
"deliveryType": 2
|
||||
},
|
||||
{
|
||||
"deliveryEndTime": "23:59:59",
|
||||
"deliveryStartTime": "00:00:00",
|
||||
"deliveryType": 3
|
||||
},
|
||||
{
|
||||
"deliveryEndTime": "23:59:59",
|
||||
"deliveryStartTime": "00:00:00",
|
||||
"deliveryType": 4
|
||||
},
|
||||
{
|
||||
"deliveryEndTime": "23:59:59",
|
||||
"deliveryStartTime": "00:00:00",
|
||||
"deliveryType": 5
|
||||
},
|
||||
{
|
||||
"deliveryEndTime": "23:59:59",
|
||||
"deliveryStartTime": "00:00:00",
|
||||
"deliveryType": 6
|
||||
}
|
||||
],
|
||||
"ifEnableDelivery": "2",
|
||||
"minDeliveryFeeOnOff": 1
|
||||
},
|
||||
"orderDTO": this.orderDTO,
|
||||
"mealtimeList":this.mealtimeList
|
||||
}
|
||||
// let param ={
|
||||
// "allocCanteen": this.baseForm,
|
||||
// "payDTO": this.payDTO,
|
||||
// "deliveryModel": {//配送设置
|
||||
// "deliveries": "",
|
||||
// "deliveryList": [
|
||||
// {
|
||||
// "deliveryEndTime": "23:59:59",
|
||||
// "deliveryStartTime": "00:00:00",
|
||||
// "deliveryType": 2
|
||||
// },
|
||||
// {
|
||||
// "deliveryEndTime": "23:59:59",
|
||||
// "deliveryStartTime": "00:00:00",
|
||||
// "deliveryType": 3
|
||||
// },
|
||||
// {
|
||||
// "deliveryEndTime": "23:59:59",
|
||||
// "deliveryStartTime": "00:00:00",
|
||||
// "deliveryType": 4
|
||||
// },
|
||||
// {
|
||||
// "deliveryEndTime": "23:59:59",
|
||||
// "deliveryStartTime": "00:00:00",
|
||||
// "deliveryType": 5
|
||||
// },
|
||||
// {
|
||||
// "deliveryEndTime": "23:59:59",
|
||||
// "deliveryStartTime": "00:00:00",
|
||||
// "deliveryType": 6
|
||||
// }
|
||||
// ],
|
||||
// "ifEnableDelivery": "2",
|
||||
// "minDeliveryFeeOnOff": 1
|
||||
// },
|
||||
// "orderDTO": this.orderDTO,
|
||||
// "mealtimeList":this.mealtimeList
|
||||
// }
|
||||
let param = this.baseForm
|
||||
if (this.canteenId != "") {
|
||||
param.canteenId = this.canteenId
|
||||
updateCanteenApi(param).then(response => {
|
||||
|
|
@ -949,99 +816,6 @@
|
|||
}
|
||||
});
|
||||
},
|
||||
//基础设置-选择区域
|
||||
handleTreeChange2(val){
|
||||
if(val){
|
||||
setTimeout(()=>{
|
||||
this.getCanteenNum()
|
||||
},500)
|
||||
}
|
||||
},
|
||||
//获取食堂编号
|
||||
async getCanteenNum() {
|
||||
let params= {
|
||||
"superId":this.baseForm.areaId,
|
||||
"canteenTreeType":1
|
||||
}
|
||||
const res = await getCanteenNumApi(params);
|
||||
this.$set(this.baseForm,"canteenNum",res.data)
|
||||
},
|
||||
//查询食堂标签下拉
|
||||
getCanteenLabel() {
|
||||
// let param = { "current": 1,"size": -1}
|
||||
// getCanteenLabelApi(param).then((response) => {
|
||||
// this.labelOptions = response.records;
|
||||
// });
|
||||
},
|
||||
//商户类用户
|
||||
mgruserListByRole(){
|
||||
let param = {
|
||||
"roleKey": "ROLE_MERCHANT"
|
||||
}
|
||||
userListByRoleApi(param).then(response => {
|
||||
this.userOptions = response.rows
|
||||
});
|
||||
},
|
||||
//选中
|
||||
chosenUser(e){
|
||||
let obj = {}
|
||||
this.userOptions.forEach(item=>{
|
||||
if(item.userId == e){
|
||||
obj=item
|
||||
}
|
||||
})
|
||||
this.$set(this.baseForm,"custName",obj.userName)
|
||||
this.$set(this.baseForm,"contactTel",obj.phonenumber)
|
||||
},
|
||||
//选择负责人
|
||||
openChosenCharger(){
|
||||
this.queryCustJobPage()
|
||||
this.currentCustRow = {}
|
||||
this.openJob=true
|
||||
},
|
||||
//人员职位职称下拉
|
||||
queryAllCustJob() {
|
||||
queryAllCustJobApi({}).then((response) => {
|
||||
this.jobOptions = response.data
|
||||
console.log(response)
|
||||
});
|
||||
},
|
||||
//负责人弹窗-查询按钮
|
||||
handleDialogQuery(){
|
||||
this.dialogQueryParams.pageNum=1
|
||||
this.queryCustJobPage()
|
||||
},
|
||||
//负责人弹窗-人员分页查询接口
|
||||
queryCustJobPage() {
|
||||
let param = {
|
||||
"current": this.dialogQueryParams.pageNum,
|
||||
"ifQueryJob": 1,
|
||||
"size": this.dialogQueryParams.pageSize,
|
||||
"job": this.dialogQueryParams.job,
|
||||
"keyword": this.dialogQueryParams.keyword
|
||||
}
|
||||
queryCustJobPageApi(param).then((response) => {
|
||||
this.jobTableData = response.records
|
||||
this.dialogTotal = Number(response.total);
|
||||
console.log(response)
|
||||
});
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
console.log(val)
|
||||
this.currentCustRow = val;
|
||||
},
|
||||
confirmChosenCharger(){
|
||||
if(this.currentCustRow != {}){
|
||||
this.baseForm.custName = this.currentCustRow.custName;
|
||||
this.baseForm.custId = this.currentCustRow.custId;
|
||||
this.$set(this.baseForm,"contactTel",this.currentCustRow.mobile)
|
||||
}else{
|
||||
this.baseForm.custName = this.baseForm.custName||""
|
||||
this.baseForm.custId = this.baseForm.custId||""
|
||||
this.$set(this.baseForm,"contactTel",this.baseForm.contactTel||"")
|
||||
}
|
||||
this.openJob=false
|
||||
},
|
||||
// 食堂图片上传
|
||||
handleRemove(file, fileList) {
|
||||
console.log(file, fileList);
|
||||
|
|
|
|||
|
|
@ -1,11 +1,15 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="所属区域" prop="areaArr">
|
||||
<el-cascader
|
||||
v-model="queryParams.areaArr" :show-all-levels="false" :filterable="true"
|
||||
:options="treeOptions" :props="treeProps" collapse-tags clearable
|
||||
@change="handleTreeChange"></el-cascader>
|
||||
<el-form-item label="所属区域" prop="areaId">
|
||||
<el-cascader v-model="queryParams.areaId"
|
||||
:options="treeOptions" :filterable="true" style="width: 100%;" :show-all-levels="false"
|
||||
:props="{
|
||||
emitPath: false,// 若设置 false,则只返回该节点的值,只返回最后选择的id
|
||||
checkStrictly: false,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
|
||||
value:'id',label:'label'
|
||||
}" clearable @change="handleTreeChange">
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属食堂" prop="canteenId">
|
||||
<el-select v-model="queryParams.canteenId" placeholder="请选择所属食堂" clearable style="width: 100%;">
|
||||
|
|
@ -40,20 +44,16 @@
|
|||
size="mini"
|
||||
@click="handleAdd"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="tableListData" height="800">
|
||||
<el-table-column label="档口编号" align="center" prop="stallNum" :show-overflow-tooltip="true" width="100" fixed="left"/>
|
||||
<el-table-column label="档口名称" align="center" prop="stallName" :show-overflow-tooltip="true" width="150" fixed="left"/>
|
||||
<el-table-column label="档口名称" align="center" prop="stallName" :show-overflow-tooltip="true" width="180" fixed="left"/>
|
||||
<el-table-column label="所属区域" align="center" prop="areaName" :show-overflow-tooltip="true" width="160"/>
|
||||
<el-table-column label="所属食堂" align="center" prop="canteenName" :show-overflow-tooltip="true" width="160"/>
|
||||
<el-table-column label="负责人" align="center" prop="custName" :show-overflow-tooltip="true" width="80"/>
|
||||
<el-table-column label="负责人" align="center" prop="director" :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>
|
||||
|
|
@ -77,31 +77,7 @@
|
|||
>
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="报餐" align="center" prop="ifBook" :show-overflow-tooltip="true" width="140">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.ifBook"
|
||||
active-text="开启"
|
||||
inactive-text="关闭"
|
||||
:active-value="1"
|
||||
:inactive-value="2"
|
||||
>
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="叫号" align="center" prop="ifUseCallNum" :show-overflow-tooltip="true" width="140">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.ifUseCallNum"
|
||||
active-text="开启"
|
||||
inactive-text="关闭"
|
||||
:active-value="1"
|
||||
:inactive-value="2"
|
||||
>
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
</el-table-column>
|
||||
<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">
|
||||
|
|
@ -110,27 +86,17 @@
|
|||
<span v-else>无</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="配送设置" align="center" prop="stallName" :show-overflow-tooltip="true" width="80">
|
||||
<template slot-scope="scope">
|
||||
<span style="color: #4b80fd;">详情</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="预订/点餐/报餐设置" align="center" prop="" :show-overflow-tooltip="true" width="140">
|
||||
<template slot-scope="scope">
|
||||
<span style="color: #4b80fd;">详情</span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="收款码" align="center" prop="payCodeUrl" :show-overflow-tooltip="true" width="80">
|
||||
<!-- <el-table-column label="收款码" align="center" prop="payCodeUrl" :show-overflow-tooltip="true" width="80">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.payCodeUrl">未开启</span>
|
||||
<span v-else>未开启</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" align="center" prop="crtime" :show-overflow-tooltip="true" width="160"/>
|
||||
<el-table-column label="更新时间" align="center" prop="uptime" :show-overflow-tooltip="true" width="160"/>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" :show-overflow-tooltip="true" width="160"/>
|
||||
<el-table-column label="更新时间" align="center" prop="updateTime" :show-overflow-tooltip="true" width="160"/>
|
||||
<el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
<!-- <el-button
|
||||
size="mini"
|
||||
type="text" v-if="scope.row.businessState==2"
|
||||
@click="handleRest(scope.row)"
|
||||
|
|
@ -139,7 +105,7 @@
|
|||
size="mini"
|
||||
type="text" v-if="scope.row.businessState==1"
|
||||
@click="handleBuss(scope.row)"
|
||||
>营业</el-button>
|
||||
>营业</el-button> -->
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
|
|
@ -166,37 +132,32 @@
|
|||
<el-dialog :title="title+'-档口'" :visible.sync="open" width="1200px" append-to-body>
|
||||
<el-tabs v-model="activeName" @tab-click="handleTabClick">
|
||||
<!-- 基础设置 -->
|
||||
<el-tab-pane label="基础设置" name="baseSetting" style="height: 600px;overflow-y: auto;">
|
||||
<el-tab-pane label="基础设置" name="baseSetting" style="height: 500px;overflow-y: auto;">
|
||||
<el-form ref="baseForm" :model="baseForm" :rules="baseFormRules" label-width="80px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="档口编号" prop="stallNum">
|
||||
<el-input v-model="baseForm.stallNum" placeholder="请输入档口编号" maxlength="30" disabled clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="档口名称" prop="stallName">
|
||||
<el-input v-model="baseForm.stallName" placeholder="请输入档口名称" maxlength="30" clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属区域" prop="areaId">
|
||||
<el-cascader v-model="baseForm.areaId"
|
||||
:options="treeOptions" :filterable="true" style="width: 400px;" :show-all-levels="false"
|
||||
:options="treeOptions" :filterable="true" style="width: 100%;" :show-all-levels="false"
|
||||
:props="{
|
||||
emitPath: false,// 若设置 false,则只返回该节点的值,只返回最后选择的id
|
||||
checkStrictly: true,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
|
||||
value:'id',label:'treeName'
|
||||
checkStrictly: false,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
|
||||
value:'id',label:'label'
|
||||
}"
|
||||
clearable @change="handleTreeChange2" >
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属食堂" prop="canteenId">
|
||||
<el-select v-model="baseForm.canteenId" placeholder="请选择所属食堂" style="width: 100%;" @change="chosenCanteen">
|
||||
<el-select v-model="baseForm.canteenId" placeholder="请选择所属食堂" style="width: 100%;">
|
||||
<el-option v-for="item in canteenOptions2"
|
||||
:key="item.canteenId"
|
||||
:label="item.canteenName"
|
||||
|
|
@ -204,33 +165,30 @@
|
|||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="负责人" prop="custId">
|
||||
<!-- <el-select v-model="baseForm.custName" placeholder="请选择负责人" style="width: 100%;" @focus="openChosenCharger"></el-select> -->
|
||||
<el-select v-model="baseForm.custId" placeholder="请选择负责人" style="width: 100%;" clearable @change="chosenUser">
|
||||
<el-option v-for="item in userOptions"
|
||||
:key="item.custId"
|
||||
:label="item.nickName"
|
||||
:value="item.custId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-form-item label="负责人" prop="director">
|
||||
<el-input
|
||||
v-model="baseForm.director"
|
||||
type="text" clearable
|
||||
placeholder="请输入负责人"
|
||||
maxlength="30"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系电话" prop="contactTel">
|
||||
<el-input v-model="baseForm.contactTel" placeholder="请输入联系电话" maxlength="11" clearable
|
||||
@input="(v)=>(baseForm.contactTel=v.replace(/[^\d]/g,''))"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="营业时间">
|
||||
<el-time-picker
|
||||
is-range
|
||||
is-range
|
||||
v-model="rangeTime"
|
||||
value-format="HH:mm:ss"
|
||||
range-separator="至"
|
||||
|
|
@ -239,57 +197,24 @@
|
|||
placeholder="选择时间范围">
|
||||
</el-time-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="档口标签" prop="labelNameList">
|
||||
<el-select v-model="baseForm.labelNameList" multiple placeholder="请选择档口标签" style="width: 100%;" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.stall_tag"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.label"
|
||||
/>
|
||||
<!-- <el-option v-for="item in labelOptions"
|
||||
:key="item.labelId"
|
||||
:label="item.labelName"
|
||||
:value="item.labelId"
|
||||
></el-option> -->
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="档口品类" prop="kindNameList">
|
||||
<el-select v-model="baseForm.kindNameList" multiple placeholder="请选择档口品类" style="width: 100%;">
|
||||
<el-option
|
||||
v-for="dict in dict.type.stall_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.label"
|
||||
/>
|
||||
<!-- <el-option v-for="item in kindOptions"
|
||||
:key="item.kindId"
|
||||
:label="item.kindName"
|
||||
:value="item.kindId"
|
||||
></el-option> -->
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="线上流水号前缀" prop="onLineMealCodePrefix">
|
||||
<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="30" clearable/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否启用叫号" prop="ifUseCallNum">
|
||||
<el-form-item label="是否启用叫号" prop="ifUseCallNum" label-width="120">
|
||||
<el-switch
|
||||
v-model="baseForm.ifUseCallNum"
|
||||
active-text="开启"
|
||||
|
|
@ -299,11 +224,8 @@
|
|||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否开启预订餐" prop="ifReserve">
|
||||
<el-form-item label="是否开启预订餐" prop="ifReserve" label-width="120">
|
||||
<el-switch
|
||||
v-model="baseForm.ifReserve"
|
||||
active-text="开启"
|
||||
|
|
@ -313,8 +235,10 @@
|
|||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否开启报餐" prop="ifBook">
|
||||
<el-form-item label="是否开启报餐" prop="ifBook" label-width="120">
|
||||
<el-switch
|
||||
v-model="baseForm.ifBook"
|
||||
active-text="开启"
|
||||
|
|
@ -323,9 +247,7 @@
|
|||
:inactive-value="2">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="档口图片">
|
||||
<el-upload
|
||||
|
|
@ -347,6 +269,9 @@
|
|||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
|
||||
<!-- <el-col :span="12">
|
||||
<el-form-item label="是否开启收款码" prop="ifEnablePayCode">
|
||||
<el-switch
|
||||
|
|
@ -366,7 +291,7 @@
|
|||
<!-- <el-tab-pane label="配送设置" name="deliverySetting" style="height: 600px;overflow-y: auto;">
|
||||
</el-tab-pane> -->
|
||||
<!-- 预订/点餐/报餐设置 -->
|
||||
<el-tab-pane label="预订设置" name="orderSetting" style="height: 600px;overflow-y: auto;">
|
||||
<!-- <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">
|
||||
|
|
@ -407,7 +332,6 @@
|
|||
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">
|
||||
|
|
@ -500,7 +424,7 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
</el-tab-pane> -->
|
||||
</el-tabs>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
|
|
@ -508,46 +432,7 @@
|
|||
</div>
|
||||
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<el-dialog title="选择负责人" :visible.sync="openJob" width="800px" append-to-body>
|
||||
<el-form :model="dialogQueryParams" ref="dialogQueryForm" size="small" :inline="true" label-width="68px">
|
||||
<el-form-item label="" prop="keyword">
|
||||
<el-input v-model="dialogQueryParams.keyword" placeholder="请输入姓名,编号,手机号" clearable style="width: 240px"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="job">
|
||||
<el-select v-model="dialogQueryParams.job" placeholder="请选择职位" style="width: 100%;">
|
||||
<el-option v-for="item in jobOptions"
|
||||
:key="item.jobId"
|
||||
:label="item.jobName"
|
||||
:value="item.jobCode"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleDialogQuery">搜索</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table :data="jobTableData" height="500" highlight-current-row @current-change="handleCurrentChange">
|
||||
<el-table-column label="负责人姓名" align="center" prop="custName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="负责人编号" align="center" prop="custNum" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="负责人手机号" align="center" prop="mobile" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="职位" align="center" prop="job" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="所属组织" align="center" prop="orgFullName" :show-overflow-tooltip="true"/>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="dialogTotal>0"
|
||||
:total="dialogTotal"
|
||||
:page.sync="dialogQueryParams.pageNum"
|
||||
:limit.sync="dialogQueryParams.pageSize"
|
||||
@pagination="queryCustJobPage"
|
||||
/>
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="confirmChosenCharger">确 定</el-button>
|
||||
<el-button @click="openJob=false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible">
|
||||
<img width="100%" :src="dialogImageUrl" alt="">
|
||||
|
|
@ -563,7 +448,7 @@
|
|||
<script>
|
||||
import { systemAreaTreeApi } from "@/api/base/area";
|
||||
import { getCanteenByAreaApi, getPageStallApi, getStallNumApi, addStallApi, getStallInfoModifyApi, updateStallApi, removeStallApi } from "@/api/base/stall";
|
||||
import { getLabelListApi, getKindListApi, queryAllCustJobApi, queryCustJobPageApi, getMealtimeListApi,changeIfReserveApi,changeBusinessStateApi,userListByRoleApi } from "@/api/base/stall";
|
||||
import { getMealtimeListApi,changeIfReserveApi,changeBusinessStateApi,userListByRoleApi } from "@/api/base/stall";
|
||||
import { imgUpLoadTwo } from '@/api/system/upload'
|
||||
// import C from "highlight.js/lib/languages/1c";
|
||||
export default {
|
||||
|
|
@ -593,7 +478,7 @@ export default {
|
|||
treeProps:{
|
||||
multiple: true,
|
||||
value:"id",
|
||||
label:"treeName",
|
||||
label:"label",
|
||||
children:"children",
|
||||
},
|
||||
// 查询参数
|
||||
|
|
@ -619,11 +504,10 @@ export default {
|
|||
"onLineMealCodePrefix": null,
|
||||
"payCodeUrl": null,
|
||||
"areaId": "",
|
||||
"canteenId": "420840523025092608",
|
||||
"stallName": "",
|
||||
"stallNum": "",
|
||||
"canteenId": "",
|
||||
"stallName": "",
|
||||
"contactTel": "",
|
||||
"custId": "379497835516661760",
|
||||
"director": "",
|
||||
"endBusinessTime": "",
|
||||
"startBusinessTime": "",
|
||||
"ifBook": 2,
|
||||
|
|
@ -655,25 +539,11 @@ export default {
|
|||
}
|
||||
]
|
||||
},
|
||||
labelOptions:[],//标签下拉
|
||||
kindOptions:[],//品类下拉
|
||||
//选择负责人弹窗
|
||||
openJob: false,
|
||||
jobOptions:[],//职位标签下拉
|
||||
dialogQueryParams:{//负责人查询条件
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
jobTableData:[],//负责人弹窗
|
||||
// 总条数
|
||||
dialogTotal: 0,
|
||||
currentCustRow:null,//选中的负责人数据
|
||||
fileList: [],//档口图片
|
||||
checkUrlList: [],//档口图片
|
||||
checkUrlNameList: [],//档口图片
|
||||
dialogVisible:false,//图片弹窗
|
||||
dialogImageUrl:"",//图片弹窗
|
||||
|
||||
deliveryModel:{},//配送设置
|
||||
mealtimeList:[],//餐次列表
|
||||
orderDTO: {//预定餐订单设置
|
||||
|
|
@ -696,10 +566,7 @@ export default {
|
|||
created() {
|
||||
this.getTreeData();
|
||||
this.getList();
|
||||
this.getLabel()
|
||||
this.getKind()
|
||||
this.queryAllCustJob()
|
||||
this.mgruserListByRole()
|
||||
|
||||
},
|
||||
computed: {
|
||||
//图片上传1张后,隐藏上传框
|
||||
|
|
@ -711,20 +578,17 @@ export default {
|
|||
//区域树
|
||||
getTreeData() {
|
||||
systemAreaTreeApi({}).then((response) => {
|
||||
this.treeOptions = response;
|
||||
this.treeOptions = response.data;
|
||||
});
|
||||
},
|
||||
handleTreeChange(e){
|
||||
let arr=[]
|
||||
e.forEach(item=>{
|
||||
arr.push(item[item.length - 1])
|
||||
})
|
||||
handleTreeChange(e){
|
||||
let param= {
|
||||
areaIdList:arr
|
||||
"areaId":e,
|
||||
"canteenType": 1
|
||||
}
|
||||
this.queryParams.areaIdList=arr;
|
||||
getCanteenByAreaApi(param).then((response) => {
|
||||
this.canteenOptions=response||[]
|
||||
this.canteenOptions=response.rows||[]
|
||||
this.queryParams.canteenId=null
|
||||
});
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
|
|
@ -756,7 +620,7 @@ export default {
|
|||
"areaIdList": this.queryParams.areaIdList
|
||||
}
|
||||
getPageStallApi(param).then(response => {
|
||||
this.tableListData = response.records;
|
||||
this.tableListData = response.rows;
|
||||
this.total = Number(response.total);
|
||||
this.loading = false;
|
||||
});
|
||||
|
|
@ -782,7 +646,7 @@ export default {
|
|||
handleAdd() {
|
||||
this.stallId=""
|
||||
this.reset();
|
||||
this.getMealtimeList()
|
||||
// this.getMealtimeList()
|
||||
this.activeName="baseSetting"
|
||||
this.open = true;
|
||||
this.title = "新增";
|
||||
|
|
@ -797,21 +661,21 @@ export default {
|
|||
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.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");
|
||||
},
|
||||
|
|
@ -820,35 +684,33 @@ export default {
|
|||
console.log(row)
|
||||
this.reset();
|
||||
this.activeName="baseSetting"
|
||||
getStallInfoModifyApi({"stallId":row.stallId}).then(response => {
|
||||
console.log(response)
|
||||
this.stallId = response.stallId;
|
||||
this.baseForm = response.stallSaveDTO;
|
||||
if(response.stallSaveDTO.imgUrl){
|
||||
this.fileList=[{url:response.stallSaveDTO.imgUrl}]
|
||||
this.checkUrlList=[response.stallSaveDTO.imgUrl]
|
||||
getStallInfoModifyApi(row.stallId).then(response => {
|
||||
this.stallId = response.data.stallId;
|
||||
this.baseForm = response.data;
|
||||
if(response.data.imgUrl){
|
||||
this.fileList=[{url:response.data.imgUrl}]
|
||||
this.checkUrlList=[response.data.imgUrl]
|
||||
}else{
|
||||
this.fileList=[]
|
||||
this.checkUrlList=[]
|
||||
}
|
||||
this.areaId = this.baseForm.areaId
|
||||
let arr=[this.baseForm.areaId]
|
||||
setTimeout(()=>{
|
||||
// 选择区域后获取相应食堂
|
||||
getCanteenByAreaApi({ areaIdList:arr }).then((response) => {
|
||||
this.canteenOptions2=response||[]
|
||||
getCanteenByAreaApi({"areaId":row.areaId,"canteenType": 1}).then((response) => {
|
||||
this.canteenOptions2=response.rows||[]
|
||||
this.$forceUpdate()
|
||||
});
|
||||
},500)
|
||||
this.rangeTime=[response.stallSaveDTO.startBusinessTime, response.stallSaveDTO.endBusinessTime]
|
||||
this.deliveryModel = response.deliveryModel;
|
||||
this.orderDTO = response.orderDTO;
|
||||
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||''])
|
||||
})
|
||||
},200)
|
||||
this.rangeTime=[response.data.startBusinessTime, response.data.endBusinessTime]
|
||||
// this.deliveryModel = response.deliveryModel;
|
||||
// this.orderDTO = response.orderDTO;
|
||||
// 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 = "修改";
|
||||
});
|
||||
|
|
@ -856,7 +718,7 @@ export default {
|
|||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
this.$modal.confirm('是否确认删除数据项?').then(function() {
|
||||
return removeStallApi({"stallId":row.stallId});
|
||||
return removeStallApi(row.stallId);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
|
|
@ -889,7 +751,7 @@ export default {
|
|||
this.getList();
|
||||
this.$modal.msgSuccess("操作成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function() {
|
||||
console.log(this.baseForm)
|
||||
|
|
@ -899,43 +761,44 @@ export default {
|
|||
this.baseForm.startBusinessTime=this.rangeTime[0]
|
||||
this.baseForm.endBusinessTime=this.rangeTime[1]
|
||||
this.baseForm.imgUrl = this.checkUrlList[0]
|
||||
let param ={
|
||||
"stallSaveDTO": this.baseForm,
|
||||
"deliveryModel": {//配送设置
|
||||
"deliveries": "",
|
||||
"deliveryList": [
|
||||
{
|
||||
"deliveryEndTime": "23:59:59",
|
||||
"deliveryStartTime": "00:00:00",
|
||||
"deliveryType": 2
|
||||
},
|
||||
{
|
||||
"deliveryEndTime": "23:59:59",
|
||||
"deliveryStartTime": "00:00:00",
|
||||
"deliveryType": 3
|
||||
},
|
||||
{
|
||||
"deliveryEndTime": "23:59:59",
|
||||
"deliveryStartTime": "00:00:00",
|
||||
"deliveryType": 4
|
||||
},
|
||||
{
|
||||
"deliveryEndTime": "23:59:59",
|
||||
"deliveryStartTime": "00:00:00",
|
||||
"deliveryType": 5
|
||||
},
|
||||
{
|
||||
"deliveryEndTime": "23:59:59",
|
||||
"deliveryStartTime": "00:00:00",
|
||||
"deliveryType": 6
|
||||
}
|
||||
],
|
||||
"ifEnableDelivery": "2",
|
||||
"minDeliveryFeeOnOff": 1
|
||||
},
|
||||
"orderDTO":this.orderDTO,
|
||||
"mealtimeList":this.mealtimeList
|
||||
}
|
||||
// let param ={
|
||||
// "stallSaveDTO": this.baseForm,
|
||||
// "deliveryModel": {//配送设置
|
||||
// "deliveries": "",
|
||||
// "deliveryList": [
|
||||
// {
|
||||
// "deliveryEndTime": "23:59:59",
|
||||
// "deliveryStartTime": "00:00:00",
|
||||
// "deliveryType": 2
|
||||
// },
|
||||
// {
|
||||
// "deliveryEndTime": "23:59:59",
|
||||
// "deliveryStartTime": "00:00:00",
|
||||
// "deliveryType": 3
|
||||
// },
|
||||
// {
|
||||
// "deliveryEndTime": "23:59:59",
|
||||
// "deliveryStartTime": "00:00:00",
|
||||
// "deliveryType": 4
|
||||
// },
|
||||
// {
|
||||
// "deliveryEndTime": "23:59:59",
|
||||
// "deliveryStartTime": "00:00:00",
|
||||
// "deliveryType": 5
|
||||
// },
|
||||
// {
|
||||
// "deliveryEndTime": "23:59:59",
|
||||
// "deliveryStartTime": "00:00:00",
|
||||
// "deliveryType": 6
|
||||
// }
|
||||
// ],
|
||||
// "ifEnableDelivery": "2",
|
||||
// "minDeliveryFeeOnOff": 1
|
||||
// },
|
||||
// "orderDTO":this.orderDTO,
|
||||
// "mealtimeList":this.mealtimeList
|
||||
// }
|
||||
let param = this.baseForm
|
||||
if (this.stallId != "") {
|
||||
param.stallId = this.stallId
|
||||
updateStallApi(param).then(response => {
|
||||
|
|
@ -955,120 +818,16 @@ export default {
|
|||
},
|
||||
|
||||
//基础设置-选择区域
|
||||
handleTreeChange2(val){
|
||||
// setTimeout(()=>{
|
||||
if(val){
|
||||
let arr=[val]
|
||||
let param= { areaIdList:arr }
|
||||
handleTreeChange2(val){
|
||||
if(val){
|
||||
let param= {"areaId":val,"canteenType": 1}
|
||||
// 选择区域后获取相应食堂
|
||||
getCanteenByAreaApi(param).then((response) => {
|
||||
this.canteenOptions2=response||[]
|
||||
this.baseForm.canteenId=null
|
||||
this.baseForm.stallNum=null
|
||||
this.canteenOptions2=response.rows||[]
|
||||
this.$set(this.baseForm,"canteenId",null)
|
||||
});
|
||||
}
|
||||
// },800)
|
||||
},
|
||||
//选择食堂后获取档口编号
|
||||
chosenCanteen(e){
|
||||
console.log(e)
|
||||
this.baseForm.canteenId=e
|
||||
this.$refs['baseForm'].clearValidate(['canteenId']);
|
||||
this.getStallNum()
|
||||
},
|
||||
//获取档口编号
|
||||
async getStallNum() {
|
||||
let params= {
|
||||
"superId":this.baseForm.canteenId,
|
||||
"canteenTreeType":2
|
||||
}
|
||||
const res = await getStallNumApi(params);
|
||||
this.$set(this.baseForm,"stallNum",res.data)
|
||||
this.$forceUpdate()
|
||||
},
|
||||
//查询标签下拉
|
||||
getLabel() {
|
||||
// let param = { "current": 1,"size": -1}
|
||||
// getLabelListApi(param).then((response) => {
|
||||
// this.labelOptions = response.records;
|
||||
// });
|
||||
},
|
||||
//查询标签下拉
|
||||
getKind() {
|
||||
// let param = { "current": 1,"size": -1}
|
||||
// getKindListApi(param).then((response) => {
|
||||
// this.kindOptions = response.records;
|
||||
// });
|
||||
},
|
||||
//商户类用户
|
||||
mgruserListByRole(){
|
||||
let param = {
|
||||
"roleKey": "ROLE_MERCHANT"
|
||||
}
|
||||
userListByRoleApi(param).then(response => {
|
||||
this.userOptions = response.rows
|
||||
});
|
||||
},
|
||||
//选中
|
||||
chosenUser(e){
|
||||
let obj = {}
|
||||
this.userOptions.forEach(item=>{
|
||||
if(item.userId == e){
|
||||
obj=item
|
||||
}
|
||||
})
|
||||
this.$set(this.baseForm,"custName",obj.userName)
|
||||
this.$set(this.baseForm,"contactTel",obj.phonenumber)
|
||||
},
|
||||
//选择负责人
|
||||
openChosenCharger(){
|
||||
this.queryCustJobPage()
|
||||
this.currentCustRow = null
|
||||
this.openJob=true
|
||||
},
|
||||
//人员职位职称下拉
|
||||
queryAllCustJob() {
|
||||
queryAllCustJobApi({}).then((response) => {
|
||||
this.jobOptions = response.data
|
||||
console.log(response)
|
||||
});
|
||||
},
|
||||
//负责人弹窗-查询按钮
|
||||
handleDialogQuery(){
|
||||
this.dialogQueryParams.pageNum=1
|
||||
this.queryCustJobPage()
|
||||
},
|
||||
//负责人弹窗-人员分页查询接口
|
||||
queryCustJobPage() {
|
||||
let param = {
|
||||
"current": this.dialogQueryParams.pageNum,
|
||||
"ifQueryJob": 1,
|
||||
"size": this.dialogQueryParams.pageSize,
|
||||
"job": this.dialogQueryParams.job,
|
||||
"keyword": this.dialogQueryParams.keyword
|
||||
}
|
||||
queryCustJobPageApi(param).then((response) => {
|
||||
this.jobTableData = response.records
|
||||
this.dialogTotal = Number(response.total);
|
||||
console.log(response)
|
||||
});
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
console.log(val)
|
||||
this.currentCustRow = val;
|
||||
},
|
||||
confirmChosenCharger(){
|
||||
if(this.currentCustRow){
|
||||
this.baseForm.custName = this.currentCustRow.custName;
|
||||
this.baseForm.custId = this.currentCustRow.custId;
|
||||
this.$set(this.baseForm,"contactTel",this.currentCustRow.mobile)
|
||||
}else{
|
||||
this.baseForm.custName = this.baseForm.custName||""
|
||||
this.baseForm.custId = this.baseForm.custId||""
|
||||
this.$set(this.baseForm,"contactTel",this.baseForm.contactTel||"")
|
||||
}
|
||||
this.openJob=false
|
||||
},
|
||||
}
|
||||
},
|
||||
// 档口图片上传
|
||||
handleRemove(file, fileList) {
|
||||
console.log(file, fileList);
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
<el-button
|
||||
type="text"
|
||||
size="mini"
|
||||
icon="el-icon-plus" v-if="data.level<3"
|
||||
icon="el-icon-plus" v-if="data.level<2"
|
||||
@click.stop="() => appendTreeNode(data)"
|
||||
>
|
||||
</el-button>
|
||||
|
|
@ -97,7 +97,7 @@
|
|||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="条码" prop="barCode">
|
||||
<!-- <el-form-item label="条码" prop="barCode">
|
||||
<el-input
|
||||
v-model="queryParams.barCode"
|
||||
placeholder="请输入条码"
|
||||
|
|
@ -105,7 +105,7 @@
|
|||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="原料编码" prop="materialCode">
|
||||
<el-input
|
||||
v-model="queryParams.materialCode"
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
<el-button
|
||||
type="text"
|
||||
size="mini"
|
||||
icon="el-icon-plus" v-if="data.level<3"
|
||||
icon="el-icon-plus" v-if="data.level<2"
|
||||
@click.stop="() => appendTreeNode(data)"
|
||||
>
|
||||
</el-button>
|
||||
|
|
|
|||
|
|
@ -195,30 +195,6 @@
|
|||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属区域" prop="areaIdList" v-if="roles.indexOf('admin')>-1||roles.indexOf('ROLE_ADMIN')>-1">
|
||||
<el-cascader v-model="form.areaIdList"
|
||||
:options="areaOptions" :filterable="true" style="width: 100%;" :show-all-levels="false"
|
||||
:props="{
|
||||
multiple:true,
|
||||
// emitPath: false,// 若设置 false,则只返回该节点的值,只返回最后选择的
|
||||
// checkStrictly: true,//来设置父子节点取消选中关联,从而达到选择任意一级选项的目的
|
||||
value:'id',label:'treeName'
|
||||
}" collapse-tags
|
||||
clearable @change="handleAreaChange">
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item label="食堂/超市" prop="dataIdList" v-if="roles.indexOf('admin')>-1||roles.indexOf('ROLE_ADMIN')>-1">
|
||||
<el-cascader v-model="form.dataIdList"
|
||||
: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 @change="handleAreaChange2">
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item label="菜单权限">
|
||||
<el-checkbox v-model="menuExpand" @change="handleCheckedTreeExpand($event, 'menu')">展开/折叠</el-checkbox>
|
||||
<el-checkbox v-model="menuNodeAll" @change="handleCheckedTreeNodeAll($event, 'menu')">全选/全不选
|
||||
|
|
@ -304,7 +280,6 @@ import {
|
|||
deptTreeSelect
|
||||
} from '@/api/system/role'
|
||||
import { treeselect as menuTreeselect, roleMenuTreeselect } from '@/api/system/menu'
|
||||
import { systemAreaTreeApi,tenantGroupAreaTreeApi } from "@/api/base/area";
|
||||
import store from '@/store'
|
||||
export default {
|
||||
name: 'Role',
|
||||
|
|
@ -391,16 +366,11 @@ export default {
|
|||
],
|
||||
roleSort: [
|
||||
{ required: true, message: '角色顺序不能为空', trigger: 'blur' }
|
||||
],
|
||||
areaIdList: [
|
||||
{ required: true, message: '所属区域不能为空', trigger: 'change' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getTreeData()
|
||||
this.getTenantGroupAreaTreeData()
|
||||
this.getList()
|
||||
const rolesList = store.getters && store.getters.roles
|
||||
this.roles = rolesList[0]
|
||||
|
|
@ -416,46 +386,6 @@ export default {
|
|||
this.loading = false
|
||||
}
|
||||
)
|
||||
},
|
||||
//区域树
|
||||
getTreeData() {
|
||||
systemAreaTreeApi({}).then((response) => {
|
||||
this.areaOptions = response;
|
||||
});
|
||||
},
|
||||
//食堂超市树
|
||||
getTenantGroupAreaTreeData() {
|
||||
tenantGroupAreaTreeApi({
|
||||
"size": -1,
|
||||
"current": 1
|
||||
}).then((response) => {
|
||||
this.tenantOptions = response;
|
||||
});
|
||||
},
|
||||
handleAreaChange(e){
|
||||
// 使用 concat 方法将二维数组扁平化为一维数组
|
||||
let flatArray = [].concat(...this.form.areaIdList);
|
||||
// 使用 Set 去重
|
||||
this.form.areaIds = Array.from(new Set(flatArray));
|
||||
},
|
||||
handleAreaChange2(e){
|
||||
// 使用 concat 方法将二维数组扁平化为一维数组
|
||||
let flatArray = [].concat(...this.form.dataIdList);
|
||||
// 使用 Set 去重
|
||||
this.form.dataIds = Array.from(new Set(flatArray));
|
||||
},
|
||||
getCheckTag(list, id) {
|
||||
for (let i in list) {
|
||||
if (list[i].id === id) {
|
||||
return [list[i]]
|
||||
}
|
||||
if (list[i].children != null) {
|
||||
let node = this.getCheckTag(list[i].children, id)
|
||||
if (node !== undefined) {
|
||||
return node.concat(list[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
/** 查询菜单树结构 */
|
||||
getMenuTreeselect() {
|
||||
|
|
@ -618,39 +548,7 @@ export default {
|
|||
const roleId = row.roleId || this.ids
|
||||
const roleMenu = this.getRoleMenuTreeselect(roleId)
|
||||
getRole(roleId).then(response => {
|
||||
this.form = response.data;
|
||||
this.form.areaIdList = []
|
||||
if(this.roles.indexOf('admin')>-1||this.roles.indexOf('ROLE_ADMIN')>-1){
|
||||
this.form.areaIds.forEach((item,index)=>{
|
||||
let arr = this.getCheckTag(this.areaOptions,item)
|
||||
if(arr){
|
||||
if(!arr[0].children){
|
||||
this.form.areaIdList.push([])
|
||||
for (let i in arr) {
|
||||
this.form.areaIdList[this.form.areaIdList.length-1].unshift(arr[i].id)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
// console.log(this.form.areaIds)
|
||||
// console.log(this.form.areaIdList)
|
||||
this.form.dataIdList = []
|
||||
if(this.roles.indexOf('admin')>-1||this.roles.indexOf('ROLE_ADMIN')>-1){
|
||||
this.form.dataIds.forEach((item,index)=>{
|
||||
let arr = this.getCheckTag(this.tenantOptions,item)
|
||||
if(arr){
|
||||
if(!arr[0].children){
|
||||
this.form.dataIdList.push([])
|
||||
for (let i in arr) {
|
||||
this.form.dataIdList[this.form.dataIdList.length-1].unshift(arr[i].id)
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
// console.log(this.form.dataIds)
|
||||
// console.log(this.form.dataIdList)
|
||||
this.form = response.data;
|
||||
this.open = true
|
||||
this.$nextTick(() => {
|
||||
roleMenu.then(res => {
|
||||
|
|
|
|||
|
|
@ -35,10 +35,8 @@ module.exports = {
|
|||
proxy: {
|
||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
// 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:58580`,
|
||||
target: `http://192.168.2.82:48380`,
|
||||
// target: `http://192.168.0.244:58580`,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
['^' + process.env.VUE_APP_BASE_API]: '',
|
||||
|
|
|
|||
Loading…
Reference in New Issue