Compare commits

...

2 Commits

Author SHA1 Message Date
zzyuan c85262f492 测试问题修改 2025-06-11 09:58:37 +08:00
zzyuan 3cfc4a4585 测试问题修改 2025-06-10 18:31:24 +08:00
18 changed files with 160 additions and 77 deletions

View File

@ -107,7 +107,7 @@ export function removeMenuDishesApi(data) {
// 菜品列表-导入
export function importMenuDishesApi(data) {
return request({
url: '/smart-canteen/menu_dishes/import/dishes',
url: '/smart-canteen/cook_dishes/import/dishes',
method: 'post',
headers: {
"merchant-id":"378915229716713472",

View File

@ -65,7 +65,7 @@ export function updateNutrition(data) {
// 删除
export function delNutrition(data) {
return request({
url: '/smart-canteen/cook_nutrition/del/'+data.categoryId,
url: '/smart-canteen/cook_nutrition/del/'+data.nutritionId,
method: 'post'
})
}

View File

@ -5,7 +5,7 @@
<el-input v-model="queryParams.searchValue" placeholder="请输入用户姓名,编号,手机号" maxlength="20" clearable style="width: 240px"/>
</el-form-item>
<el-form-item label="账户状态" prop="accountStatusList">
<el-select v-model="queryParams.accountStatusList" multiple style="width: 240px" clearable>
<el-select v-model="queryParams.accountStatusList" style="width: 240px" clearable>
<el-option label="正常" value="0"></el-option>
<el-option label="停用" value="1"></el-option>
</el-select>
@ -584,7 +584,7 @@
queryParams: {
pageNum: 1,
pageSize: 10,
accountStatusList:[],
accountStatusList:null,
deptIdList:[],
searchValue:null,
userType:null
@ -684,11 +684,14 @@
let param = {
"pageNum": this.queryParams.pageNum,
"pageSize": this.queryParams.pageSize,
"accountStatusList": this.queryParams.accountStatusList,
"accountStatusList": [],
"deptIdList": this.queryParams.deptIdList,
"searchValue": this.queryParams.searchValue,
"userType": this.queryParams.userType
}
}
if(this.queryParams.accountStatusList){
param.accountStatusList = [this.queryParams.accountStatusList]
}
accInfoPageApi(param).then(response => {
this.tableListData = response.rows;
this.total = Number(response.total);
@ -872,7 +875,7 @@
let param = {
"pageNum": this.dialogParams.pageNum,
"pageSize": this.dialogParams.pageSize,
"accountStatusList": this.dialogParams.accountStatusList,
"accountStatusList": [],
"deptIdList": this.dialogParams.deptIdList,
"searchValue": this.dialogParams.searchValue,
"userType": this.dialogParams.userType

View File

@ -211,7 +211,6 @@
}
// param.type=2
this.tableListData2 = []
this.total2 = 0
accInfoWalletHistoryApi(param).then(response => {
this.tableListData2 = response.rows;
this.total2 = Number(response.total);

View File

@ -59,8 +59,7 @@
<span v-if="!scope.row.userId">合计</span>
<span v-else>{{ (queryParams1.pageNum - 1) * queryParams1.pageSize + scope.$index+1 }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="用户编号" align="center" prop="userId" :show-overflow-tooltip="true" width="120"/>
<el-table-column label="用户姓名" align="center" prop="nickName" :show-overflow-tooltip="true" width="120" />
<el-table-column label="用户手机号" align="center" prop="phoneNumber" :show-overflow-tooltip="true" width="120" />
@ -231,9 +230,7 @@
"startDateTime":this.formatDate(this.dateRange[0]),
"endDateTime":this.formatDate(this.dateRange[1])
}
param.type=1
this.tableListData1 = []
this.total1 = 0
param.type=1
accInfoWalletHistoryApi(param).then(response => {
this.tableListData1 = response.rows;
this.total1 = Number(response.total);

View File

@ -291,8 +291,9 @@
</div>
</el-dialog>
<el-dialog title="批量补贴预览" :visible.sync="openResult" width="800px" append-to-body>
<div>总人数 {{resultData.totalUserSum || '--' }} 补贴人数{{resultData.validCount || '--' }} 补贴总额{{(resultData.validTotalAmount/100) || '--' }} 无效人数{{resultData.invalidCount || '--'}}</div>
<el-table :data="resultData.errVOList" height="300">
<div style="margin-bottom: 10px;">总人数 {{resultData.totalUserSum || '--' }} 补贴人数{{resultData.validCount || '--' }} 补贴总额{{(resultData.validTotalAmount/100) || '--' }} 无效人数{{resultData.invalidCount || '--'}}</div>
<div style="font-weight: 600;">无效人数</div>
<el-table :data="resultData.errVOList" max-height="250">
<el-table-column label="用户编号" align="center" prop="userId" :show-overflow-tooltip="true" />
<el-table-column label="用户姓名" align="center" prop="nickName" :show-overflow-tooltip="true" />
<el-table-column label="用户手机号" align="center" prop="phoneNumber" :show-overflow-tooltip="true" />
@ -308,7 +309,24 @@
</template>
</el-table-column>
<el-table-column label="失败原因" align="center" prop="errorMessage" :show-overflow-tooltip="true"/>
</el-table>
</el-table>
<div style="font-weight: 600;">有效人数</div>
<el-table :data="resultData.successVoList" max-height="250">
<el-table-column label="用户编号" align="center" prop="userId" :show-overflow-tooltip="true" />
<el-table-column label="用户姓名" align="center" prop="nickName" :show-overflow-tooltip="true" />
<el-table-column label="用户手机号" align="center" prop="phoneNumber" :show-overflow-tooltip="true" />
<el-table-column label="所属组织" align="center" prop="deptFullName" :show-overflow-tooltip="true" />
<el-table-column label="用户类别" align="center" prop="userType" :show-overflow-tooltip="true" width="120">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_user_type" :value="scope.row.userType"/>
</template>
</el-table-column>
<el-table-column label="金额" align="center" prop="amount" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{ (scope.row.amount/100).toFixed(2) }}</span>
</template>
</el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="openResult=false" v-if="resultData.validUserIdList&&resultData.validUserIdList.length==0"> </el-button>
<el-button type="primary" @click="confirmBatchEdit" v-else> </el-button>
@ -586,6 +604,7 @@
]
},
batchIds:[],
batchList:[],
openResult:false,
resultData:{},
openResult2:false,
@ -734,7 +753,7 @@
this.resetForm("dialogParams");
this.getDialogList()
this.batchIds = []
this.batchList = []
this.batchForm = {
remark:"",
receiveEndDate:"",
@ -751,6 +770,7 @@
this.resetForm("dialogParams");
this.getDialogList()
this.batchIds = []
this.batchList = []
this.batchForm = {
clearType:1,
amount:null
@ -783,31 +803,39 @@
//
handleSelectionChange(selection){
this.batchIds = selection.map((item) => item.userId)
this.batchList = selection
},
//
confirmBatchCheck(){
if(this.batchIds.length>0){
this.$refs["batchForm"].validate(valid => {
if (valid) {
let param = {
// remark:this.batchForm.remark,
// receiveEndDate:this.batchForm.receiveEndDate,
// validateDay:this.batchForm.validateDay,
let param = {
amount:Number(this.batchForm.amount*100),
userIds:this.batchIds
}
checkAccRechargeBatchApi(param).then(response => {
// this.$modal.msgSuccess("");
checkAccRechargeBatchApi(param).then(response => {
this.resultData = response.data
this.batchList.forEach(item=>{
item.amount = Number(this.batchForm.amount*100)
})
if(this.resultData.errVOList.length==0){
this.resultData.successVoList = this.batchList
}else if(this.resultData.errVOList.length>0){
this.resultData.errVOList.forEach(item=>{
let hasIndex = this.batchList.findIndex(v=>v.userId==item.userId)
this.batchList.splice(hasIndex,1)
})
this.resultData.successVoList = this.batchList
}
this.openResult = true
this.openBatch = false;
// this.getList();
this.openBatch = false;
});
}
});
}else{
this.$modal.msgError("请先勾选账户!");
}
}
},
//
confirmBatchEdit(){

View File

@ -111,8 +111,8 @@
</template>
</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="director" prop="director" show-overflow-tooltip/>
<el-table-column label="区域描述" align="center" key="description" prop="description" show-overflow-tooltip/>
<el-table-column label="联系人" align="center" key="manager" prop="manager" 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">
@ -163,9 +163,9 @@
maxlength="30"
/>
</el-form-item>
<el-form-item label="区域描述" prop="areaDescribe">
<el-form-item label="区域描述" prop="description">
<el-input
v-model="form.areaDescribe"
v-model="form.description"
type="text" clearable
placeholder="请输入区域描述"
maxlength="30"
@ -188,9 +188,9 @@
}" clearable>
</el-cascader>
</el-form-item>
<el-form-item label="联系人" prop="director">
<el-form-item label="联系人" prop="manager">
<el-input
v-model="form.director"
v-model="form.manager"
type="text" clearable
placeholder="请输入负责人"
maxlength="30"
@ -411,11 +411,11 @@
handleUpdate(row) {
this.reset();
console.log(row)
this.$set(this.form,"areaDescribe",row.areaDescribe)
this.$set(this.form,"description",row.description)
this.$set(this.form,"areaId",row.areaId)
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,"manager",row.manager)
this.$set(this.form,"parentName",row.parentName)
this.$set(this.form,"parentId",row.parentId)

View File

@ -523,6 +523,48 @@ export default {
},
/** 新增按钮操作 */
handleAdd() {
this.mealtimeList = [
{
"mealtimeType": "1",
"mealtimeName": "早餐",
"orderTimeList":["05:00:00","10:00:00"],
"startTime": "05:00:00",
"endTime": "10:00:00",
"ifEnable":"1"
},
{
"mealtimeType": "2",
"mealtimeName": "午餐",
"orderTimeList":["10:00:01","14:00:00"],
"startTime": "10:00:01",
"endTime": "14:00:00",
"ifEnable":"1"
},
{
"mealtimeType": "3",
"mealtimeName": "下午茶",
"orderTimeList":["14:00:01","18:00:00"],
"startTime": "14:00:01",
"endTime": "18:00:00",
"ifEnable":"1"
},
{
"mealtimeType": "4",
"mealtimeName": "晚餐",
"orderTimeList":["18:00:01","21:00:00"],
"startTime": "18:00:01",
"endTime": "21:00:00",
"ifEnable":"1"
},
{
"mealtimeType": "5",
"mealtimeName": "夜宵",
"orderTimeList":["21:00:01","23:59:59"],
"startTime": "21:00:01",
"endTime": "23:59:59",
"ifEnable":"1"
}
],//
this.stallId=""
this.reset();
this.activeName="baseSetting"

View File

@ -214,7 +214,7 @@ export default {
computed: {
//1
uploadDisabled() {
return this.checkUrlList.length > 0
return this.checkUrlList.length > 1
},
},
methods: {
@ -225,6 +225,11 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams = {
pageNum: 1,
pageSize: 10,
imgName: undefined,
}
this.resetForm("queryForm");
this.handleQuery();
},
@ -342,22 +347,26 @@ export default {
reader.onload = (e) => {
const img = new Image();
img.onload = () => {
const { width, height } = img;
//
const MAX_WIDTH = 750;
const MAX_HEIGHT = 520;
console.log(width)
console.log(height)
if (width <= MAX_WIDTH && height <= MAX_HEIGHT) {
this.form[fileType] = file.raw
this.$refs['form'].validateField(fileType)
this.$message.success(`图片尺寸符合要求: ${width}x${height}`);
} else {
this.$message.error(`图片尺寸不能超过 ${MAX_WIDTH}x${MAX_HEIGHT}`);
//
this.form[fileType] = ''
this.$refs['form'].validateField(fileType)
}
const { width, height } = img;
//
const MAX_WIDTH = 750;
const MAX_HEIGHT = 520;
console.log(width)
console.log(height)
if (width <= MAX_WIDTH && height <= MAX_HEIGHT) {
this.form[fileType] = file.raw
this.$refs['form'].validateField(fileType)
this.$message.success(`图片尺寸符合要求: ${width}x${height}`);
} else {
this.$message.error(`图片尺寸不能超过 ${MAX_WIDTH}x${MAX_HEIGHT}`);
this.checkUrlNameList=[]
this.checkUrlList=[]
this.fileList=[]
//
this.form[fileType] = ''
this.$refs['form'].validateField(fileType)
}
};
img.src = e.target.result;
};

View File

@ -489,8 +489,8 @@
</el-col>
-->
<el-col :span="12">
<el-form-item label="菜品简介" prop="remark">
<el-input v-model="baseForm.remark" type="textarea" :rows="2" maxlength="50" placeholder="请输入内容" ></el-input>
<el-form-item label="菜品简介" prop="intro">
<el-input v-model="baseForm.intro" type="textarea" :rows="2" maxlength="50" placeholder="请输入内容" ></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
@ -900,7 +900,7 @@
//
headers: { Authorization: 'Bearer ' + getToken() },
//
url: process.env.VUE_APP_BASE_API + '/smart-canteen/menu_dishes/import/check',
url: process.env.VUE_APP_BASE_API + '/smart-canteen/cook_dishes/import/check',
},
dishesMaterialList:[],
materialOptions:[],

View File

@ -1225,7 +1225,7 @@
//
headers: { Authorization: 'Bearer ' + getToken() },
//
url: process.env.VUE_APP_BASE_API + '/smart-canteen/menu_dishes/import/check',
url: process.env.VUE_APP_BASE_API + '/smart-canteen/cook_dishes/import/check',
},
materialList:[],
materialOptions:[],

View File

@ -288,8 +288,9 @@ export default {
materialName: [{ required: true, message: '请输入原料名称', trigger: 'blur' }],
areaId: [{ required: true, message: '请选择所属区域', trigger: 'change' }],
materialTypeId: [{ required: true, message: '请选择原料类别', trigger: 'change' }],
salesMode: [{ required: true, message: '请选择计量类型', trigger: 'change' }],
// unitId: [{ required: true, message: '', trigger: 'change' }]
salesMode: [{ required: true, message: '请选择计量类型', trigger: 'change' }],
nutritionTypeId: [{ required: true, message: '请选择营养信息类别', trigger: 'change' }],
nutritionId: [{ required: true, message: '请选择营养信息', trigger: 'change' }],
},
nutritionFields: [
{ label: '可食部分', prop: 'edible', unit: 'g/100g' },

View File

@ -493,6 +493,7 @@ export default {
this.$modal.msgSuccess("删除成功");
this.getList();
this.getTreeData();
this.$refs.materialDialog.getTypeTreeData();
})
.catch(() => {});
},
@ -511,12 +512,14 @@ export default {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getTreeData();
this.$refs.materialDialog.getTypeTreeData();
});
} else {
addMaterialTypeApi(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getTreeData();
this.$refs.materialDialog.getTypeTreeData();
});
}
}

View File

@ -131,7 +131,7 @@
:props="{
emitPath: false,// falseid
checkStrictly: false,//
value:'typeId',label:'dishesTypeName'
value:'dishesTypeId',label:'dishesTypeName'
}" clearable @change="getDishesPage">
</el-cascader>
<!-- <el-select v-model="queryDish.typeId" style="width: 100%;" clearable @change="getDishesPage">

View File

@ -131,7 +131,7 @@
:props="{
emitPath: false,// falseid
checkStrictly: false,//
value:'typeId',label:'dishesTypeName'
value:'dishesTypeId',label:'dishesTypeName'
}" clearable @change="getDishesPage">
</el-cascader>
<!-- <el-select v-model="queryDish.typeId" style="width: 100%;" clearable @change="getDishesPage">

View File

@ -925,6 +925,7 @@ export default {
nutritionTypeListApi().then(response => {
this.typeTreeData = response.data;
this.cascaderOptions = this.cascaderOptionsMethod();
console.log(this.cascaderOptions)
}).catch(error => {
console.error("Failed to fetch food types:", error);
});
@ -962,9 +963,9 @@ export default {
this.handleQuery();
},
/* 树节点增加 */
appendTreeNode(data) {
console.log(data)
if(data&&data.level==1){
appendTreeNode(data) {
this.resetForm("typeForm");
if(data&&data.level==0){
this.typeForm={}
this.typeForm.parentId = data.id;
this.typeForm.parentName = data.label;
@ -972,7 +973,6 @@ export default {
this.typeForm={}
this.typeForm.parentId = 0;
}
this.resetForm("typeForm");
this.openType = true;
this.title = "新增";
},
@ -1024,6 +1024,7 @@ export default {
});
} else {
console.log('新增')
// console.log(this.typeForm)
nutritionTypeAddApi(this.typeForm).then(response => {
this.$modal.msgSuccess("新增成功");
this.openType = false;
@ -1154,7 +1155,7 @@ export default {
handleDelete(row) {
// const nutritionIds = row.nutritionId;
var data = {
ids:[row.id]
nutritionId:row.nutritionId
}
this.$modal.confirm('是否确认删除数据项?').then(function() {
return delNutrition(data);

View File

@ -129,12 +129,12 @@
</el-form-item>
</el-col> -->
<el-col :span="12">
<el-form-item label="商品简介" prop="productRemark">
<el-form-item label="商品简介" prop="description">
<el-input
type="textarea"
:rows="3"
placeholder="请输入商品简介"
v-model="form.productRemark">
v-model="form.description">
</el-input>
</el-form-item>
</el-col>
@ -207,7 +207,7 @@ export default {
size:'',//
taxRate:'',//
supplyCertificate: '',
productRemark:"",//
description:"",//
imgUrl:"",//
},
@ -340,7 +340,7 @@ export default {
}
this.$set(this.form,"qualityNum",row.qualityNum)
this.$set(this.form,"supplyCertificate","")
this.$set(this.form,"productRemark",row.productRemark)
this.$set(this.form,"description",row.description)
this.$set(this.form,"imgUrl",row.imgUrl)
//
if(row.imgUrl){
@ -362,7 +362,7 @@ export default {
this.$set(this.form,"salePrice",Number((this.form.salePrice/100).toFixed(2)))
this.$set(this.form,"unitPrice",Number((this.form.unitPrice/100).toFixed(2)))
this.loading=false
},2000)
},500)
this.$emit('submit', this.form);
}
@ -392,7 +392,7 @@ export default {
qualityType:"1",//
qualityNum:"",//
supplyCertificate: '',
productRemark:"",//
description:"",//
imgUrl:""
};
},

View File

@ -915,13 +915,13 @@ export default {
},
{ validator: validateNewPassword, trigger: 'blur' },
],
// roleIds: [
// {
// required: true,
// message: '',
// trigger: 'change',
// },
// ],
roleIds: [
{
required: true,
message: '请选择角色',
trigger: 'change',
},
]
},
openFace:false,
baseForm:{},