Commit 979e03ac authored by 柳 佳乐's avatar 柳 佳乐
Browse files

20221125

parent a0a55082
...@@ -161,7 +161,7 @@ export default { ...@@ -161,7 +161,7 @@ export default {
//获取个人信息 //获取个人信息
getUser(){ getUser(){
getOneself(this.userData).then((res)=>{ getOneself(this.userData).then((res)=>{
if(res.status == "success"){ if(res.success){
this.userData = res.data this.userData = res.data
this.backupsData = Object.assign({}, res.data) this.backupsData = Object.assign({}, res.data)
}else{ }else{
...@@ -176,7 +176,7 @@ export default { ...@@ -176,7 +176,7 @@ export default {
this.$refs.userform.validate((valida)=>{ this.$refs.userform.validate((valida)=>{
if(valida){ if(valida){
update(this.userData).then((res)=>{ update(this.userData).then((res)=>{
if(res.status == "success"){ if(res.success){
this.$message.success("修改成功") this.$message.success("修改成功")
this.getUser() this.getUser()
this.userupdata = true this.userupdata = true
...@@ -206,7 +206,7 @@ export default { ...@@ -206,7 +206,7 @@ export default {
newPassword:this.passwordData.newPassword newPassword:this.passwordData.newPassword
} }
passwordReset(param).then((res)=>{ passwordReset(param).then((res)=>{
if(res.status == "success"){ if(res.success){
this.$message.success("修改成功") this.$message.success("修改成功")
this.$store.dispatch('user/logout').then(res=>{ this.$store.dispatch('user/logout').then(res=>{
this.$router.push('/login') this.$router.push('/login')
......
...@@ -32,14 +32,27 @@ ...@@ -32,14 +32,27 @@
> >
<el-table-column type="expand"> <el-table-column type="expand">
<template slot-scope="props"> <template slot-scope="props">
<el-form label-position="left" class="demo-table-expand"> <el-descriptions
<el-form-item label="合作方:"> class="margin-top"
<span>{{ props.row.projectPartyb }}</span> title="关于项目"
</el-form-item> :column="1"
<el-form-item label="项目详情:"> style="width:60%; margin:20px 20px"
border
>
<el-descriptions-item label="合作方:" :labelStyle="{'width':'120px'}">{{ props.row.projectPartyb }}</el-descriptions-item>
<el-descriptions-item label="项目详情:">
<span>{{ props.row.projectInformation }}</span> <span>{{ props.row.projectInformation }}</span>
</el-form-item> </el-descriptions-item>
</el-form> <el-descriptions-item label="更改项目负责人:">
<el-button
style="margin:5px"
size="mini"
icon="el-icon-coin"
type="primary"
@click="member(props.row)"
>成员管理</el-button>
</el-descriptions-item>
</el-descriptions>
</template> </template>
</el-table-column> </el-table-column>
...@@ -100,22 +113,14 @@ ...@@ -100,22 +113,14 @@
align="center" align="center"
:formatter="timestampToTime" :formatter="timestampToTime"
/> />
<el-table-column prop="projectAmount" label="操作" align="center"> <el-table-column prop="projectAmount" label="操作" align="center" width="125px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
style="margin:5px"
size="mini" size="mini"
icon="el-icon-edit" icon="el-icon-edit"
type="info" type="info"
@click="updataProject(scope.row)" @click="updataProject(scope.row)"
>修改信息</el-button> >修改信息</el-button>
<el-button
style="margin:5px"
size="mini"
icon="el-icon-coin"
type="primary"
@click="member(scope.row)"
>成员管理</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
</el-form-item> </el-form-item>
<el-form-item label="发票编号" prop="incomebaoxioa"> <el-form-item label="发票编号" prop="incomebaoxioa">
<el-select <el-select
@change="getchange()"
v-model="invoiceListAdd" v-model="invoiceListAdd"
multiple multiple
filterable filterable
...@@ -131,10 +132,11 @@ import { ...@@ -131,10 +132,11 @@ import {
} from "@/api/project"; } from "@/api/project";
import { selectAll } from "@/api/type"; import { selectAll } from "@/api/type";
import { insert } from "@/api/expend"; import { insert } from "@/api/expend";
import { money } from "@/utils/myValidate"; import { expendAdd as rules } from "../rules";
export default { export default {
data() { data() {
return { return {
rules: rules,
action2: null, action2: null,
fileList1: [], fileList1: [],
expendFrom: { expendFrom: {
...@@ -154,38 +156,12 @@ export default { ...@@ -154,38 +156,12 @@ export default {
companyId: 0, companyId: 0,
typeList: [], typeList: [],
projectData: {}, projectData: {},
//表单验证内容
rules: {
expendMoney: [
{
required: true,
validator: money,
trigger: "change"
}
],
expendTime: [
{ required: true, message: "请选择支出时间", trigger: "change" }
],
expendType: [
{ required: true, message: "请输入支出类别", trigger: "change" }
],
expendObject: [
{ required: true, message: "请输入支出对象", trigger: "change" }
],
expendBody: [
{ required: true, message: "请输入支出用途", trigger: "change" }
],
number: [
{ required: true, message: "请输入发票号码", trigger: "change" }
],
code: [{ required: true, message: "请输入发票代码", trigger: "change" }]
},
//发票状态 //发票状态
status: 0, status: 0,
//发票编号数组 //发票编号数组
getinvoivelist: [], getinvoivelist: [],
//收集发票编号 //收集发票编号
invoiceListAdd: {}, invoiceListAdd: [],
//查询发票编号的数组 //查询发票编号的数组
getinvoiveId: { getinvoiveId: {
userId: null, userId: null,
...@@ -229,7 +205,6 @@ export default { ...@@ -229,7 +205,6 @@ export default {
this.action2 = process.env.VUE_APP_BASE_API + "/file/updataEnclosures"; this.action2 = process.env.VUE_APP_BASE_API + "/file/updataEnclosures";
this.proutlist1.userId = this.$store.getters.urId; this.proutlist1.userId = this.$store.getters.urId;
this.proutlist1.companyId = this.$store.getters.companyId; this.proutlist1.companyId = this.$store.getters.companyId;
this.backlistid = this.$route.query.backlistid; this.backlistid = this.$route.query.backlistid;
this.getTypeList(); this.getTypeList();
this.getProject(); this.getProject();
...@@ -401,6 +376,24 @@ export default { ...@@ -401,6 +376,24 @@ export default {
this.proutlist1.enclosureDescribe = null; this.proutlist1.enclosureDescribe = null;
this.fileList1 = this.fileList1.filter(item => item.uid !== file.uid); this.fileList1 = this.fileList1.filter(item => item.uid !== file.uid);
this.dialogFormVisible = false; this.dialogFormVisible = false;
},
//添加发票金额
getchange() {
let sum = 0;
let list = [];
this.invoiceListAdd.forEach(g => {
this.getinvoivelist.forEach(item => {
if (item.invoiceId == g) {
list.push({
mone: item.mone
});
}
});
});
list.forEach(item => {
sum += item.mone;
});
this.expendFrom.expendMoney = sum;
} }
} }
}; };
......
This diff is collapsed.
<template> <template>
<div class="container"> <div class="container">
<el-row> <el-row>
<el-col :xl="8" :lg="8" :md="8" :sm="12" :xs="24"> <el-col :xl="8" :lg="8" :md="8" :sm="12" :xs="24" style="margin:20px 30px;">
<el-form <el-form ref="form" :model="expendFrom" label-width="120px" :rules="rules">
ref="form"
:model="expendFrom"
label-width="120px"
:rules="rules"
>
<el-form-item label="项目名称" prop="projectName"> <el-form-item label="项目名称" prop="projectName">
<el-input v-model="expendFrom.projectName" disabled></el-input> <el-input v-model="expendFrom.projectName" disabled></el-input>
</el-form-item> </el-form-item>
...@@ -19,8 +14,7 @@ ...@@ -19,8 +14,7 @@
:key="item.typeId" :key="item.typeId"
:label="item.typeName" :label="item.typeName"
:value="item.typeId" :value="item.typeId"
> ></el-option>
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -34,8 +28,7 @@ ...@@ -34,8 +28,7 @@
type="datetime" type="datetime"
placeholder="选择日期时间" placeholder="选择日期时间"
@change="timestampToTime()" @change="timestampToTime()"
> ></el-date-picker>
</el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="支出对象" prop="expendObject"> <el-form-item label="支出对象" prop="expendObject">
...@@ -58,30 +51,85 @@ ...@@ -58,30 +51,85 @@
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button type="success" icon="el-icon-upload2" @click="submitForm()">提交</el-button>
type="success" <el-button type="danger" icon="el-icon-delete-solid" @click="deleteExpend()">删除</el-button>
icon="el-icon-upload2"
@click="submitForm()"
>提交</el-button
>
<el-button
type="danger"
icon="el-icon-delete-solid"
@click="deleteExpend()"
>删除</el-button
>
<el-button @click="back()">返回</el-button> <el-button @click="back()">返回</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-col> </el-col>
<el-col :xl="8" :lg="10" :md="12" :sm="12" :xs="24" style="margin:10px 130px;">
<div>
<h3>发票编辑</h3>
<div>
<div class="selectList" style="margin:20px 0px">
<el-select
v-model="getListincom"
multiple
filterable
default-first-option
style="width:220px;"
placeholder="请选择要添加的发票编号"
@change="getchange()"
>
<el-option
v-for="item in invoiceListAdd"
:key="item.invoiceId"
:label="item.number"
:value="item.invoiceId"
></el-option>
</el-select>
<el-button type="primary" @click="Buttonback2()" style="margin:0px 5px">添加发票</el-button>
</div>
</div>
<div>
<el-table
:data="getinvoivelist"
border
style="width: 100%"
:cell-style="{'text-align':'center'}"
:header-cell-style="{'text-align':'center', background:'#eef1f6',color:'#606266'}"
class="gettable"
>
<el-table-column prop="code" label="发票代码"></el-table-column>
<el-table-column prop="number" label="发票号码"></el-table-column>
<el-table-column prop="mone" label="金额"></el-table-column>
<el-table-column prop="prop" label="操作">
<template slot-scope="scope">
<el-popover placement="top" width="60" v-model="scope.row.visible">
<p>确定要删除该发票吗</p>
<div style="text-align: right; margin:0">
<el-button size="mini" type="text" @click="scope.row.visible = false">取消</el-button>
<el-button type="primary" size="mini" @click="DeleteFrom(scope.row)">确定</el-button>
</div>
<el-button
type="danger"
icon="el-icon-delete"
size="mini"
slot="reference"
class="edit"
>删除</el-button>
</el-popover>
</template>
</el-table-column>
</el-table>
</div>
</div>
</el-col>
</el-row> </el-row>
</div> </div>
</template> </template>
<script> <script>
import { selectAll } from "@/api/type"; import { selectAll } from "@/api/type";
import { update,selectById,del} from "@/api/expend"; import { update, selectById, del } from "@/api/expend";
import { money } from "@/utils/myValidate"; import { money } from "@/utils/myValidate";
import { mapGetters } from "vuex";
import {
selectAllById,
selectAllBystatus,
updatesubmit,
deletBystatus
} from "@/api/project";
export default { export default {
data() { data() {
return { return {
...@@ -95,16 +143,16 @@ export default { ...@@ -95,16 +143,16 @@ export default {
expendType: null, expendType: null,
projectId: null, projectId: null,
userId: null, userId: null,
projectName: null, projectName: null
}, },
typeList: [], typeList: [],
projectData: {}, projectData: {},
rules: { rules: {
projectName: [ projectName: [
{ required: true, message: "请选择项目", trigger: "change" }, { required: true, message: "请选择项目", trigger: "change" }
], ],
expendType: [ expendType: [
{ required: true, message: "请选择支出类型", trigger: "change" }, { required: true, message: "请选择支出类型", trigger: "change" }
], ],
expendMoney: [ expendMoney: [
{ {
...@@ -113,71 +161,81 @@ export default { ...@@ -113,71 +161,81 @@ export default {
} }
], ],
expendTime: [ expendTime: [
{ required: true, message: "请选择支出时间", trigger: "change" }, { required: true, message: "请选择支出时间", trigger: "change" }
], ]
}, },
getListincom: [], //收集选择的数组
invoiceListAdd: [], //查询发票的集合
getinvoivelist: [],
backlistid: null //返回标记
}; };
}, },
computed: { computed: {
...mapGetters(["companyId", "urId"]),
expendId() { expendId() {
return this.$route.query.id; return this.$route.query.id;
}, }
}, },
created() { created() {
this.backlistid = this.$route.query.backlistid;
this.expendFrom.userId = this.$store.getters.urId; this.expendFrom.userId = this.$store.getters.urId;
this.getTypeList(); this.getTypeList();
this.getexpend(); this.getexpend();
this.selectGet();
this.Selectinsertlsit();
}, },
methods: { methods: {
//获取支出类型 //获取支出类型
getTypeList() { getTypeList() {
let param = { let param = {
companyId: this.$store.getters.companyId, companyId: this.$store.getters.companyId,
typeCategory: 1, typeCategory: 1
}; };
selectAll(param) selectAll(param)
.then((res) => { .then(res => {
if (res.success) { if (res.success) {
this.typeList = res.data; this.typeList = res.data;
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);
this.back() this.back();
} }
}) })
.catch((error) => { .catch(error => {
this.$message.error("获取类型失败"); this.$message.error("获取类型失败");
this.back() this.back();
}); });
}, },
//获取支出信息 //获取支出信息
getexpend(){ getexpend() {
selectById({expendId:this.expendId}).then((res)=>{ selectById({ expendId: this.expendId })
if(res.success){ .then(res => {
if (res.success) {
this.expendFrom = res.data; this.expendFrom = res.data;
this.expendFrom.userId = this.$store.getters.urId this.expendFrom.userId = this.$store.getters.urId;
}else{ } else {
this.$message.error(res.msg); this.$message.error(res.msg);
this.back() this.back();
} }
}).catch((error)=>{
this.$message.error("获取信息失败")
this.back()
}) })
.catch(error => {
this.$message.error("获取信息失败");
this.back();
});
}, },
//提交 //提交
submitForm() { submitForm() {
this.$refs.form.validate((valid) => { this.$refs.form.validate(valid => {
if (valid) { if (valid) {
update(this.expendFrom) update(this.expendFrom)
.then((res) => { .then(res => {
if (res.success) { if (res.success) {
this.$message.success(res.msg); this.$message.success(res.msg);
this.back() this.back();
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);
} }
}) })
.catch((error) => { .catch(error => {
this.$message.error("新建失败"); this.$message.error("新建失败");
}); });
} }
...@@ -190,7 +248,8 @@ export default { ...@@ -190,7 +248,8 @@ export default {
path: "/expendList", path: "/expendList",
query: { query: {
id: this.$route.query.projectId, id: this.$route.query.projectId,
}, backlistid: this.$route.query.backlistid
}
}); });
}, },
//时间处理 yyyy-MM-dd hh:mm:ss //时间处理 yyyy-MM-dd hh:mm:ss
...@@ -213,15 +272,15 @@ export default { ...@@ -213,15 +272,15 @@ export default {
this.expendFrom.expendTime = Y + M + D + h + m + s; this.expendFrom.expendTime = Y + M + D + h + m + s;
}, },
//删除 //删除
deleteExpend(){ deleteExpend() {
this.$confirm("确定要删除此收入记录吗", "提示", { this.$confirm("确定要删除此收入记录吗", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning"
}) })
.then(() => { .then(() => {
del(this.expendFrom) del(this.expendFrom)
.then((res) => { .then(res => {
if (res.success) { if (res.success) {
this.$message.success("删除成功"); this.$message.success("删除成功");
this.back(); this.back();
...@@ -229,18 +288,136 @@ export default { ...@@ -229,18 +288,136 @@ export default {
this.$message.error(res.msg); this.$message.error(res.msg);
} }
}) })
.catch((error) => { .catch(error => {
this.$message.error("删除失败"); this.$message.error("删除失败");
}); });
}) })
.catch(() => { .catch(() => {
this.$message({ this.$message({
type: "info", type: "info",
message: "已取消删除", message: "已取消删除"
});
});
},
//添加发票
Buttonback2() {
if (this.getListincom.length > 0) {
let list = [];
//提交发票与收入关系 status默认为1 表示发票已报销
this.getListincom.forEach(item => {
list.push({
invoiceId: item,
expendId: this.expendId,
status: 1
});
}); });
updatesubmit(list).then(res => {
if (res.success) {
this.$message.success(res.msg);
this.dialogFormVisible = false;
this.$message({
showClose: true,
message: "添加发票成功",
type: "success"
}); });
this.Selectinsertlsit();
this.getListincom = [];
} else {
this.$message.error(res.msg);
}
});
} else {
this.$message({
showClose: true,
message: "没有添加发票",
type: "warning"
});
}
},
//查询未报销发票
selectGet() {
const params = {
userId: this.urId,
companyId: this.companyId,
type: 1
};
selectAllBystatus(params)
.then(res => {
if (res.success) {
this.invoiceListAdd = res.data;
} else {
this.$message.error(res.msg);
}
})
.catch(error => {
this.$message.error("获取发票编号失败");
});
},
//查询发票图片
Selectinsertlsit() {
const params = {
companyId: this.companyId,
expendId: this.expendId
};
selectAllById(params)
.then(res => {
if (res.success) {
this.getinvoivelist = res.data;
} else {
this.$message.error(res.msg);
}
})
.catch(error => {
console.log(error);
this.$message.error("获取发票图片失败");
});
},
//删除发票
DeleteFrom(row) {
let get = this.expendFrom.expendMoney;
get -= row.mone;
console.log(get);
this.expendFrom.expendMoney = get;
//收集被删除发票的数据
let BillList = {
invoiceId: row.invoiceId,
expendId: row.expendId
};
deletBystatus(BillList)
.then(res => {
if (res.success) {
this.visible = false;
this.$message({
message: "删除成功",
type: "success"
});
this.Selectinsertlsit();
this.selectGet();
} }
})
.catch(errror => {
this.$message.error(res.msg);
});
}, },
//添加发票金额
getchange() {
let sum = 0;
let list = [];
this.getListincom.forEach(g => {
this.invoiceListAdd.forEach(item => {
if (item.invoiceId == g) {
list.push({
mone: item.mone
});
}
});
});
list.forEach(item => {
sum += item.mone;
});
this.expendFrom.expendMoney = sum;
}
}
}; };
</script> </script>
...@@ -248,4 +425,7 @@ export default { ...@@ -248,4 +425,7 @@ export default {
.container { .container {
padding: 10px; padding: 10px;
} }
.edit {
font-size: 11px;
}
</style> </style>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -94,7 +94,7 @@ export default { ...@@ -94,7 +94,7 @@ export default {
//查询员工,得到初始员工值 //查询员工,得到初始员工值
secletAllStaff({ companyId: this.$store.getters.companyId }) secletAllStaff({ companyId: this.$store.getters.companyId })
.then(res => { .then(res => {
if (res.status == "success") { if (res.success) {
this.staffList = res.data; this.staffList = res.data;
//数据整理,排除项目负责人 //数据整理,排除项目负责人
selectAllByProjectId({ projectId: this.projectId }) selectAllByProjectId({ projectId: this.projectId })
......
...@@ -26,14 +26,19 @@ ...@@ -26,14 +26,19 @@
> >
<el-table-column type="expand"> <el-table-column type="expand">
<template slot-scope="props"> <template slot-scope="props">
<el-form label-position="left" class="demo-table-expand"> <el-descriptions
<el-form-item label="合作方:"> class="margin-top"
<span>{{ props.row.projectPartyb }}</span> title="关于项目"
</el-form-item> :column="1"
<el-form-item label="项目详情:"> :size="medium"
style="width:40%; margin:20px 20px"
border
>
<el-descriptions-item label="合作方:">{{ props.row.projectPartyb }}</el-descriptions-item>
<el-descriptions-item label="项目详情:">
<span>{{ props.row.projectInformation }}</span> <span>{{ props.row.projectInformation }}</span>
</el-form-item> </el-descriptions-item>
</el-form> </el-descriptions>
</template> </template>
</el-table-column> </el-table-column>
......
...@@ -176,7 +176,7 @@ export default { ...@@ -176,7 +176,7 @@ export default {
getRoleList() { getRoleList() {
selectAllByCompanyId({ companyId: this.$store.getters.companyId }) selectAllByCompanyId({ companyId: this.$store.getters.companyId })
.then(res => { .then(res => {
if (res.status == "success") { if (res.success) {
this.rolesList = res.data; this.rolesList = res.data;
} else { } else {
this.$message.error(res.data); this.$message.error(res.data);
......
...@@ -27,14 +27,30 @@ ...@@ -27,14 +27,30 @@
> >
<el-table-column type="expand"> <el-table-column type="expand">
<template slot-scope="props"> <template slot-scope="props">
<el-form label-position="left" class="demo-table-expand"> <el-descriptions
<el-form-item label="合作方:"> class="margin-top"
<span>{{ props.row.projectPartyb }}</span> title="关于项目"
</el-form-item> :column="1"
<el-form-item label="项目详情:"> style="width:60%; margin:20px 20px"
border
>
<el-descriptions-item
label="合作方:"
:labelStyle="{'width':'120px'}"
>{{ props.row.projectPartyb }}</el-descriptions-item>
<el-descriptions-item label="项目详情:">
<span>{{ props.row.projectInformation }}</span> <span>{{ props.row.projectInformation }}</span>
</el-form-item> </el-descriptions-item>
</el-form> <el-descriptions-item label="更改项目负责人:">
<el-button
style="margin:5px"
size="mini"
icon="el-icon-coin"
type="primary"
@click="member(props.row)"
>负责人管理</el-button>
</el-descriptions-item>
</el-descriptions>
</template> </template>
</el-table-column> </el-table-column>
...@@ -104,13 +120,6 @@ ...@@ -104,13 +120,6 @@
type="info" type="info"
@click="updataProject(scope.row)" @click="updataProject(scope.row)"
>修改信息</el-button> >修改信息</el-button>
<el-button
style="margin:5px"
size="mini"
icon="el-icon-coin"
type="primary"
@click="member(scope.row)"
>负责人管理</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -268,4 +277,8 @@ export default { ...@@ -268,4 +277,8 @@ export default {
font-weight: 600; font-weight: 600;
font-size: 15px; font-size: 15px;
} }
.my-label {
width: 100px;
background: #fde2e2;
}
</style> </style>
\ No newline at end of file
import { money } from "@/utils/myValidate";
//表单验证内容
export const expendAdd = {
expendMoney: [
{
required: true,
validator: money,
trigger: "change"
}
],
expendTime: [
{ required: true, message: "请选择支出时间", trigger: "change" }
],
expendType: [
{ required: true, message: "请输入支出类别", trigger: "change" }
],
expendObject: [
{ required: true, message: "请输入支出对象", trigger: "change" }
],
expendBody: [
{ required: true, message: "请输入支出用途", trigger: "change" }
],
number: [
{ required: true, message: "请输入发票号码", trigger: "change" }
],
code: [{ required: true, message: "请输入发票代码", trigger: "change" }]
}
export const incomeAdd = {
projectName: [
{ required: true, message: "请选择项目", trigger: "change" }
],
incomeType: [
{ required: true, message: "请选择收入类型", trigger: "change" }
],
incomeObject: [
{ required: true, message: "没有输入对方户名", trigger: "change" }
],
incomeBody: [
{ required: true, message: "没有输入对收入内容", trigger: "change" }
],
incomeMoney: [
{
required: true,
validator: money,
trigger: "change"
}
],
incomeTime: [
{ required: true, message: "请选择收到时间", trigger: "change" }
]
}
\ No newline at end of file
This diff is collapsed.
...@@ -115,7 +115,7 @@ export default { ...@@ -115,7 +115,7 @@ export default {
methods: { methods: {
getRoles() { getRoles() {
selectAllByCompanyId({ companyId: this.$store.getters.companyId }).then((res) => { selectAllByCompanyId({ companyId: this.$store.getters.companyId }).then((res) => {
if (res.status == "success") { if (res.success) {
this.rolesList = res.data this.rolesList = res.data
} else { } else {
this.$message.error(res.data) this.$message.error(res.data)
...@@ -135,7 +135,7 @@ export default { ...@@ -135,7 +135,7 @@ export default {
if (valida) { if (valida) {
//提交 //提交
insertStaff(this.staffData).then((res) => { insertStaff(this.staffData).then((res) => {
if (res.status == "success") { if (res.success) {
this.$message.success("添加成功") this.$message.success("添加成功")
this.$store.dispatch('tagsView/delView', this.$route) this.$store.dispatch('tagsView/delView', this.$route)
this.$router.push("/staffList") this.$router.push("/staffList")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment