测试问题修改

This commit is contained in:
zzyuan 2025-03-27 16:31:51 +08:00
parent 194e4a3b02
commit 82d938e60b
23 changed files with 181 additions and 80 deletions

View File

@ -80,6 +80,18 @@ export function getCanteenLabelApi(data) {
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({

View File

@ -123,7 +123,17 @@ export function getKindListApi(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({

View File

@ -68,7 +68,7 @@
<el-table-column label="用户编号" align="center" prop="custNum" :show-overflow-tooltip="true" v-if="activeName=='cust'"/>
<el-table-column label="用户姓名" align="center" prop="custName" :show-overflow-tooltip="true" v-if="activeName=='cust'"/>
<el-table-column label="用户手机号" align="center" prop="mobile" :show-overflow-tooltip="true" v-if="activeName=='cust'"/>
<el-table-column label="所属组织" align="center" prop="orgFullName" :show-overflow-tooltip="true" v-if="activeName=='cust'||activeName=='organization'"/>
<el-table-column label="所属组织" align="center" prop="custOrgFullName" :show-overflow-tooltip="true" v-if="activeName=='cust'||activeName=='organization'"/>
<el-table-column label="用户类别" align="center" prop="psnTypeName" :show-overflow-tooltip="true" v-if="activeName=='cust'||activeName=='psn'"/>
<el-table-column label="补贴" align="center">
<el-table-column label="笔数" align="center" prop="times" :show-overflow-tooltip="true" />

View File

@ -180,7 +180,7 @@
keyword:null,
psnTypeList:[],
orgIdList:[],
orgLevel:2
orgLevel:1
},
};
},
@ -234,7 +234,7 @@
keyword:null,
psnTypeList:[],
orgIdList:[],
orgLevel:2
orgLevel:1
}
if(this.activeName=='organization'){
let arr = this.lookForAllId(this.deptOptions)
@ -257,10 +257,11 @@
keyword:null,
psnTypeList:[],
orgIdList:[],
orgLevel:2
orgLevel:1
}
if(this.activeName=='organization'){
let arr = this.lookForAllId(this.deptOptions)
console.log(arr)
this.$set(this.queryParams,'orgIdList',arr)
}
this.resetForm("queryForm");

View File

@ -196,6 +196,15 @@
})
.filter((node) => node.status !== '1')
},
lookForAllId(data = [], arr = []) {
for (let item of data) {
if(!item.children){
arr.push(item.id)
}
if (item.children && item.children.length) this.lookForAllId(item.children, arr)
}
return arr
},
handleTabClick(tab, event) {
console.log(tab.name,tab.label)
// if(this.activeName=='cust'){
@ -217,6 +226,10 @@
orgIdList:[],
orgLevel:1
}
if(this.activeName=='organization'){
let arr = this.lookForAllId(this.deptOptions)
this.$set(this.queryParams,'orgIdList',arr)
}
this.resetForm("queryForm");
this.handleQuery()
},
@ -236,6 +249,10 @@
orgIdList:[],
orgLevel:1
}
if(this.activeName=='organization'){
let arr = this.lookForAllId(this.deptOptions)
this.$set(this.queryParams,'orgIdList',arr)
}
this.resetForm("queryForm");
this.handleQuery();
},

View File

@ -64,12 +64,12 @@
<!-- minAmount maxAmount -->
<el-form-item label="消费金额">
<el-input v-model="queryParams.minAmount" placeholder="最小金额" clearable style="width: 40%;"
@input="(v)=>(queryParams.minAmount=Number(v.replace(/[^\d.]/g,'')))">
@input="(v)=>(queryParams.minAmount=v.replace(/[^\d.]/g,''))">
<template slot="append"></template>
</el-input>
<span></span>
<el-input v-model="queryParams.maxAmount" placeholder="最大金额" clearable style="width: 40%;"
@input="(v)=>(queryParams.maxAmount=Number(v.replace(/[^\d.]/g,'')))">
@input="(v)=>(queryParams.maxAmount=v.replace(/[^\d.]/g,''))">
<template slot="append"></template>
</el-input>
</el-form-item>
@ -290,6 +290,12 @@
"beginTime":this.formatDate(this.dateRange[0]),
"endTime":this.formatDate(this.dateRange[1])
}
if(param.minAmount&&param.minAmount!=""){
param.minAmount = Number(param.minAmount*100)
}
if(param.maxAmount&&param.maxAmount!=""){
param.maxAmount = Number(param.maxAmount*100)
}
accountFlowPageApi(param).then(response => {
this.tableListData = response.resultPage.records;
this.total = Number(response.resultPage.total);

View File

@ -43,7 +43,7 @@
<el-button
type="text"
size="mini"
icon="el-icon-plus"
icon="el-icon-plus" v-if="data.sortNo<3"
@click.stop="() => appendTreeNode(data)"
>
</el-button>

View File

@ -226,8 +226,15 @@
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="负责人" prop="custName">
<el-select v-model="baseForm.custName" placeholder="请选择负责人" style="width: 100%;" @focus="openChosenCharger"></el-select>
<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.userId"
:label="item.nickName"
:value="item.userId"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
@ -422,7 +429,7 @@
<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 } from "@/api/base/canteen";
import { getCanteenLabelApi, queryAllCustJobApi, queryCustJobPageApi, getMealtimeListApi,changeIfReserveApi,changeBusinessStateApi,userListByRoleApi } from "@/api/base/canteen";
import { imgUpLoadTwo } from '@/api/system/upload'
export default {
name: "",
@ -497,6 +504,7 @@
]
},
labelOptions:[],//
userOptions:[],//
//
openJob: false,
jobOptions:[],//
@ -563,7 +571,7 @@
this.getList();
this.getCanteenLabel()
this.queryAllCustJob()
this.mgruserListByRole()
},
computed: {
//1
@ -625,9 +633,6 @@
});
},
handleTabClick(tab, event) {
console.log(tab, event);
},
@ -808,6 +813,26 @@
// 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()

View File

@ -207,8 +207,15 @@
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="负责人" prop="custName">
<el-select v-model="baseForm.custName" placeholder="请选择负责人" style="width: 100%;" @focus="openChosenCharger"></el-select>
<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.userId"
:label="item.nickName"
:value="item.userId"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
@ -251,7 +258,7 @@
</el-col>
</el-row>
<el-row>
<!-- <el-col :span="12">
<el-col :span="12">
<el-form-item label="档口品类" prop="kindNameList">
<el-select v-model="baseForm.kindNameList" multiple placeholder="请选择档口品类" style="width: 100%;">
<el-option
@ -267,19 +274,19 @@
></el-option>
</el-select>
</el-form-item>
</el-col> -->
</el-col>
<el-col :span="12">
<el-form-item label="线上流水号前缀" prop="onLineMealCodePrefix">
<el-input v-model="baseForm.onLineMealCodePrefix" placeholder="请输入线上流水号前缀" maxlength="20" 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-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="是否启用叫号" prop="ifUseCallNum">
<el-switch
@ -291,6 +298,9 @@
</el-switch>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="是否开启预订餐" prop="ifReserve">
<el-switch
@ -302,9 +312,6 @@
</el-switch>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="是否开启报餐" prop="ifBook">
<el-switch
@ -316,6 +323,8 @@
</el-switch>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="档口图片">
<el-upload
@ -337,8 +346,6 @@
</el-upload>
</el-form-item>
</el-col>
</el-row>
<el-row>
<!-- <el-col :span="12">
<el-form-item label="是否开启收款码" prop="ifEnablePayCode">
<el-switch
@ -423,7 +430,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 } from "@/api/base/stall";
import { getLabelListApi, getKindListApi, queryAllCustJobApi, queryCustJobPageApi, getMealtimeListApi,changeIfReserveApi,changeBusinessStateApi,userListByRoleApi } from "@/api/base/stall";
import { imgUpLoadTwo } from '@/api/system/upload'
// import C from "highlight.js/lib/languages/1c";
export default {
@ -466,6 +473,7 @@ export default {
areaArr: []
},
canteenOptions:[],//-
userOptions:[],//
activeName:"baseSetting",
areaId:"",
stallId:"",//-
@ -545,7 +553,7 @@ export default {
this.getLabel()
this.getKind()
this.queryAllCustJob()
this.mgruserListByRole()
},
computed: {
//1
@ -837,6 +845,26 @@ export default {
// 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()

View File

@ -283,8 +283,8 @@
<el-col :span="12">
<el-form-item label="菜品/套餐" prop="mealType">
<el-select v-model="baseForm.mealType" style="width: 100%;" >
<el-option label="菜品" value="1"></el-option>
<el-option label="套餐" value="2"></el-option>
<el-option label="菜品" :value="1"></el-option>
<el-option label="套餐" :value="2"></el-option>
</el-select>
</el-form-item>
</el-col>
@ -339,13 +339,12 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="计价方式" prop="salesMode">
<el-select v-model="baseForm.salesMode" style="width: 100%;" >
<el-option label="按份" value="1" />
<el-option label="称重" value="2" />
<el-option label="按份" :value="1" />
<el-option label="称重" :value="2" />
</el-select>
</el-form-item>
</el-col>
@ -678,7 +677,7 @@
stallId:null,
dishesNum:"",
dishesName:"",
salesMode:"1",
salesMode:1,
sizeType:"1",
price:"",
materialCost:0,
@ -928,14 +927,14 @@
resetDishDialog(){
this.baseForm = {
mealType:"1",///
mealType:1,///
publicDishes: 2,
areaId:null,
canteenId:null,
stallId:null,
dishesNum:"",
dishesName:"",
salesMode:"1",
salesMode:1,
sizeType:"1",
price:"",
materialCost:0,
@ -978,9 +977,9 @@
getStallByCanteenApi({canteenIdList:[this.baseForm.canteenId]}).then((response) => {
this.stallOptions2=response||[]
});
this.$set(this.baseForm,"salesMode",response.salesMode+'')
this.$set(this.baseForm,"salesMode",response.salesMode)
this.$set(this.baseForm,"sizeType",response.sizeType+'')
this.$set(this.baseForm,"mealType",response.mealType+'')
this.$set(this.baseForm,"mealType",response.mealType)
this.$set(this.baseForm,"price",Number(response.price)/100)
this.$set(this.baseForm,"materialCost",Number(response.materialCost)/100)
if(this.baseForm.imageUrl){
@ -998,12 +997,14 @@
/** 处理对话框提交 */
handleDialogSubmit() {
this.$refs.baseForm.validate(valid => {
if (valid) {
this.baseForm.imageUrl = this.checkUrlList[0];
this.baseForm.arr = this.checkUrlList;
this.baseForm.price = Number(this.baseForm.price)*100;
this.baseForm.prmaterialCostice = Number(this.baseForm.materialCost)*100;
this.baseForm.materialCost = Number(this.baseForm.materialCost)*100;
if (this.title === "新增") {
addMenuDishesApi(param).then(response => {
addMenuDishesApi(this.baseForm).then(response => {
this.$modal.msgSuccess("新增成功");
this.openDish = false;
this.getList();
@ -1015,6 +1016,8 @@
this.getList();
});
}
}
})
},
/** 删除按钮操作 */
handleDelete(row) {
@ -1046,7 +1049,6 @@
},
//
imgUpLoad(param, name, index) {
// console.log(param,'image')
param.type = 'dishes'
imgUpLoadTwo(param).then((res) => {
if (res.code == 200) {

View File

@ -41,7 +41,7 @@
<el-button
type="text"
size="mini"
icon="el-icon-plus"
icon="el-icon-plus" v-if="data.sortNo<3"
@click.stop="() => appendTreeNode(data)"
>
</el-button>

View File

@ -91,7 +91,7 @@
<el-row>
<el-col :span="12">
<el-form-item label="营养信息类别" prop="nutritionCategory" required>
<el-form-item label="营养信息类别" prop="nutritionCategory">
<el-cascader
v-model="form.nutritionCategory"
:options="cascaderOptions"
@ -103,7 +103,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="营养信息名称" prop="nutritionName" required>
<el-form-item label="营养信息名称" prop="nutritionName">
<el-input
v-model="form.nutritionName"
placeholder="请输入营养信息名称"
@ -115,7 +115,7 @@
<el-row>
<el-col :span="12">
<el-form-item label="食材编码" prop="nutritionCode" required>
<el-form-item label="食材编码" prop="nutritionCode">
<el-input
v-model="form.nutritionCode"
placeholder="请输入食材编码"
@ -686,7 +686,7 @@ export default {
this.form = response.data;
//
if (response.data.bigType && response.data.littleType) {
this.form.nutritionCategory = [response.data.bigType, response.data.littleType];
this.$set(this.form,"nutritionCategory",[response.data.bigType,'#'+response.data.littleType])
}
this.open = true;
this.title = "修改营养信息";

View File

@ -827,7 +827,7 @@ export default {
this.$refs["rowData"].validate(valid => {
if (valid) {
let param = {
refundAmount:Number(this.rowData.refundMoney),
refundAmount:Number(this.rowData.refundMoney*100),
orderId:this.rowData.orderId
}
refundOrderPartApi(param).then(response => {

View File

@ -41,7 +41,7 @@
<el-button
type="text"
size="mini"
icon="el-icon-plus"
icon="el-icon-plus" v-if="data.sortNo<3"
@click.stop="() => appendTreeNode(data)"
>
</el-button>

View File

@ -77,7 +77,7 @@
<el-table
v-if="refreshTable"
v-loading="loading"
:data="deptList"
:data="deptList" height="650"
row-key="deptId"
:default-expand-all="isExpandAll"
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"

View File

@ -90,7 +90,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange" height="650">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="字典编码" align="center" prop="dictCode" />
<el-table-column label="字典标签" align="center" prop="dictLabel">

View File

@ -107,7 +107,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="typeList" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="typeList" @selection-change="handleSelectionChange" height="650">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="字典编号" align="center" prop="dictId" />
<el-table-column label="字典名称" align="center" prop="dictName" :show-overflow-tooltip="true" />

View File

@ -52,7 +52,7 @@
v-if="refreshTable"
v-loading="loading"
:data="menuList"
row-key="menuId"
row-key="menuId" height="650"
:default-expand-all="isExpandAll"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
>

View File

@ -69,7 +69,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="noticeList" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="noticeList" @selection-change="handleSelectionChange" height="650" >
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" prop="noticeId" width="100" />
<el-table-column

View File

@ -111,7 +111,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table ref="tables" v-loading="loading" :data="list" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
<el-table ref="tables" v-loading="loading" height="650" :data="list" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="日志编号" align="center" prop="operId" />
<el-table-column label="系统模块" align="center" prop="title" :show-overflow-tooltip="true" />

View File

@ -79,7 +79,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange" height="650">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="岗位编号" align="center" prop="postId" />
<el-table-column label="岗位编码" align="center" prop="postCode" />

View File

@ -59,7 +59,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
<el-table v-loading="loading" height="650" :data="userList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="用户名称" prop="userName" :show-overflow-tooltip="true" />
<el-table-column label="用户昵称" prop="nickName" :show-overflow-tooltip="true" />

View File

@ -101,7 +101,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="roleList" @selection-change="handleSelectionChange" :selectable="checkSelectable" :row-class-name="getRowClassName">
<el-table v-loading="loading" height="650" :data="roleList" @selection-change="handleSelectionChange" :selectable="checkSelectable" :row-class-name="getRowClassName">
<el-table-column type="selection" min-width="55" align="center"/>
<el-table-column label="角色编号" prop="roleId" min-width="120" align="center"/>
<el-table-column label="角色名称" align="center" prop="roleName" :show-overflow-tooltip="true" min-width="150"/>