测试问题修改
This commit is contained in:
parent
09f37553cb
commit
3cfc4a4585
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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(){
|
||||
|
|
|
|||
|
|
@ -225,6 +225,11 @@ export default {
|
|||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
imgName: undefined,
|
||||
}
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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:[],
|
||||
|
|
|
|||
|
|
@ -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:[],
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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:{},
|
||||
|
|
|
|||
Loading…
Reference in New Issue