默认报餐
This commit is contained in:
parent
a65761757b
commit
b8428b09fe
@ -13,7 +13,6 @@ import com.ruoyi.common.utils.StringUtils;
|
|||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
import com.ruoyi.system.fantang.domain.FtStaffInfoDao;
|
import com.ruoyi.system.fantang.domain.FtStaffInfoDao;
|
||||||
import com.ruoyi.system.fantang.service.IFtStaffInfoDaoService;
|
import com.ruoyi.system.fantang.service.IFtStaffInfoDaoService;
|
||||||
import com.ruoyi.system.service.ISysUserService;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
@ -36,8 +35,6 @@ public class FtStaffInfoDaoController extends BaseController {
|
|||||||
|
|
||||||
private final IFtStaffInfoDaoService iFtStaffInfoDaoService;
|
private final IFtStaffInfoDaoService iFtStaffInfoDaoService;
|
||||||
|
|
||||||
private final ISysUserService userService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询员工管理列表
|
* 查询员工管理列表
|
||||||
*/
|
*/
|
||||||
|
@ -323,6 +323,7 @@ export default {
|
|||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
console.log(this.form);
|
||||||
addStaffInfo(this.form).then(response => {
|
addStaffInfo(this.form).then(response => {
|
||||||
this.msgSuccess("新增成功");
|
this.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
|
@ -115,11 +115,8 @@
|
|||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="菜品列表" prop="foodList">-->
|
|
||||||
<!-- <el-input v-model="form.foodList" placeholder="请输入菜品列表" />-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<el-form-item label="菜品" prop="foodList">
|
<el-form-item label="菜品" prop="foodList">
|
||||||
<el-select v-model="queryParams.foodList" multiple placeholder="请选择菜品" clearable size="small">
|
<el-select v-model="form.foodList" multiple placeholder="请选择菜品" clearable size="small">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in foodListOptions"
|
v-for="item in foodListOptions"
|
||||||
:key="item.name"
|
:key="item.name"
|
||||||
@ -183,7 +180,14 @@ export default {
|
|||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {}
|
rules: {
|
||||||
|
type: [
|
||||||
|
{required: true, message: "报餐类型不能为空", trigger: "blur"}
|
||||||
|
],
|
||||||
|
foodList: [
|
||||||
|
{required: true, message: "菜品不能为空", trigger: "blur"}
|
||||||
|
],
|
||||||
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@ -202,7 +206,6 @@ export default {
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
listFood(this.queryParams).then(response => {
|
listFood(this.queryParams).then(response => {
|
||||||
console.log("depart", response);
|
|
||||||
this.foodListOptions = response.rows;
|
this.foodListOptions = response.rows;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -256,12 +259,14 @@ export default {
|
|||||||
const id = row.id || this.ids
|
const id = row.id || this.ids
|
||||||
getFoodDefault(id).then(response => {
|
getFoodDefault(id).then(response => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
|
this.form.foodList = response.data.foodList.split(',').map(Number);
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改默认报餐管理";
|
this.title = "修改默认报餐管理";
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
|
this.form.foodList = this.form.foodList.toString();
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
@ -271,6 +276,7 @@ export default {
|
|||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
console.log(this.form);
|
||||||
addFoodDefault(this.form).then(response => {
|
addFoodDefault(this.form).then(response => {
|
||||||
this.msgSuccess("新增成功");
|
this.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user