Commit 01e9384f authored by 柳 佳乐's avatar 柳 佳乐
Browse files

202211201

parent 979e03ac
...@@ -149,7 +149,7 @@ export default { ...@@ -149,7 +149,7 @@ export default {
//重置数据 //重置数据
resetForm(){ resetForm(){
this.$refs.form.resetFields() this.getProject()
}, },
//提交数据 //提交数据
submitForm(){ submitForm(){
......
...@@ -699,11 +699,7 @@ export default { ...@@ -699,11 +699,7 @@ export default {
this.reimbursementDetails.list = res.data; this.reimbursementDetails.list = res.data;
this.$message.success(res.msg); this.$message.success(res.msg);
}else{ }else{
if (res.code == 4) { this.$message.error(res.msg)
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
} }
}) })
.catch((error) => { .catch((error) => {
...@@ -722,13 +718,8 @@ export default { ...@@ -722,13 +718,8 @@ export default {
if (res.success) { if (res.success) {
//获取数据 //获取数据
this.financeList.list = res.data; this.financeList.list = res.data;
// this.$message.success(res.msg);
}else{ }else{
if (res.code == 4) { this.$message.success(res.msg);
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
} }
}) })
.catch((error) => { .catch((error) => {
...@@ -754,11 +745,6 @@ export default { ...@@ -754,11 +745,6 @@ export default {
this.total = res.data.total; this.total = res.data.total;
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
} }
}) })
.catch((error) => { .catch((error) => {
...@@ -817,11 +803,6 @@ export default { ...@@ -817,11 +803,6 @@ export default {
this.getReimbursement(); this.getReimbursement();
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
} }
}) })
.catch((error) => { .catch((error) => {
...@@ -868,11 +849,6 @@ export default { ...@@ -868,11 +849,6 @@ export default {
this.getReimbursement(); this.getReimbursement();
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
} }
}) })
.catch((error) => { .catch((error) => {
...@@ -944,11 +920,7 @@ export default { ...@@ -944,11 +920,7 @@ export default {
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);
this.back(); this.back();
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
} }
}) })
.catch((error) => { .catch((error) => {
...@@ -1075,11 +1047,7 @@ export default { ...@@ -1075,11 +1047,7 @@ export default {
} }
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
} }
}) })
.catch((error) => { .catch((error) => {
...@@ -1115,13 +1083,9 @@ export default { ...@@ -1115,13 +1083,9 @@ export default {
type: "success", type: "success",
}); });
this.visible = false; this.visible = false;
console.log(res.msg);
}else{ }else{
if (res.code == 4) { this.$message.error(res.msg)
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
} }
}) })
.catch((errror) => { .catch((errror) => {
...@@ -1151,11 +1115,7 @@ export default { ...@@ -1151,11 +1115,7 @@ export default {
this.Refresh(); this.Refresh();
} else { } else {
this.$message.error("请添加附件,在进行提交"); this.$message.error("请添加附件,在进行提交");
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
} }
}, },
//刷新附件 //刷新附件
...@@ -1170,11 +1130,7 @@ export default { ...@@ -1170,11 +1130,7 @@ export default {
this.proutlist1.enclosureDescribe = ""; //初始化数据 this.proutlist1.enclosureDescribe = ""; //初始化数据
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
} }
}) })
.catch((error) => { .catch((error) => {
...@@ -1212,11 +1168,7 @@ export default { ...@@ -1212,11 +1168,7 @@ export default {
if (res.success) { if (res.success) {
this.getinvoive(data); this.getinvoive(data);
}else{ }else{
if (res.code == 4) { this.$message.error(res.msg)
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
} }
}); });
}, },
......
...@@ -588,11 +588,7 @@ export default { ...@@ -588,11 +588,7 @@ export default {
this.reimbursementDetails.list = res.data; this.reimbursementDetails.list = res.data;
this.$message.success(res.msg); this.$message.success(res.msg);
}else{ }else{
if (res.code == 4) { this.$message.error(res.msg)
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
} }
}) })
.catch((error) => { .catch((error) => {
...@@ -608,11 +604,6 @@ export default { ...@@ -608,11 +604,6 @@ export default {
this.total = res.data.total; this.total = res.data.total;
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
} }
}) })
.catch((error) => { .catch((error) => {
...@@ -645,11 +636,6 @@ export default { ...@@ -645,11 +636,6 @@ export default {
this.getReimbursement(); this.getReimbursement();
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
} }
}) })
.catch((error) => { .catch((error) => {
...@@ -693,11 +679,6 @@ export default { ...@@ -693,11 +679,6 @@ export default {
this.getReimbursement(); this.getReimbursement();
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
} }
}) })
.catch((error) => { .catch((error) => {
...@@ -768,11 +749,6 @@ export default { ...@@ -768,11 +749,6 @@ export default {
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);
this.back(); this.back();
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
} }
}) })
.catch((error) => { .catch((error) => {
...@@ -800,11 +776,6 @@ export default { ...@@ -800,11 +776,6 @@ export default {
} }
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
} }
}) })
.catch((error) => { .catch((error) => {
...@@ -841,17 +812,13 @@ export default { ...@@ -841,17 +812,13 @@ export default {
type: "success", type: "success",
}); });
this.visible = false; this.visible = false;
console.log(res.msg);
}else{ }else{
if (res.code == 4) { this.$message.error(res.msg);
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
} }
}) })
.catch((errror) => { .catch((errror) => {
this.$message.error(res.msg); this.$message.error("删除失败");
}); });
}, },
//清除附件文件 //清除附件文件
...@@ -877,11 +844,7 @@ export default { ...@@ -877,11 +844,7 @@ export default {
this.Refresh(); this.Refresh();
} else { } else {
this.$message.error("请添加附件,在进行提交"); this.$message.error("请添加附件,在进行提交");
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
} }
}, },
//刷新附件 //刷新附件
...@@ -896,11 +859,6 @@ export default { ...@@ -896,11 +859,6 @@ export default {
this.proutlist1.enclosureDescribe = ""; //初始化数据 this.proutlist1.enclosureDescribe = ""; //初始化数据
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
} }
}) })
.catch((error) => { .catch((error) => {
...@@ -938,11 +896,7 @@ export default { ...@@ -938,11 +896,7 @@ export default {
if (res.success) { if (res.success) {
this.getinvoive(data); this.getinvoive(data);
}else{ }else{
if (res.code == 4) { this.$message.error(res.msg)
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
} }
}); });
}, },
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="container" :gutter="20"> <div class="container" :gutter="20">
<div class="box"> <div class="box">
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :xl="12" :lg="12" :md="12" :sm="24" :xs="24"> <el-col :xl="12" :lg="10" :md="10" :sm="24" :xs="24">
<el-form <el-form
ref="form" ref="form"
:model="from" :model="from"
...@@ -92,6 +92,8 @@ ...@@ -92,6 +92,8 @@
:action="action1" :action="action1"
:auto-upload="false" :auto-upload="false"
:data="enclosurelist" :data="enclosurelist"
:on-remove="fileError"
:on-success="fileSuccess"
multiple multiple
> >
<i class="el-icon-upload"></i> <i class="el-icon-upload"></i>
...@@ -123,7 +125,7 @@ ...@@ -123,7 +125,7 @@
</el-form> </el-form>
</el-col> </el-col>
<!-- 右边 --> <!-- 右边 -->
<el-col :xl="12" :lg="12" :md="12" :sm="24" :xs="24"> <el-col :xl="12" :lg="14" :md="14" :sm="24" :xs="24">
<div v-show="subbut"> <div v-show="subbut">
<el-empty description="暂无报销项,因此无法报销"></el-empty> <el-empty description="暂无报销项,因此无法报销"></el-empty>
</div> </div>
...@@ -148,7 +150,7 @@ ...@@ -148,7 +150,7 @@
required: true, required: true,
}" }"
> >
<el-input v-model="item.money" <el-input v-model="item.money" style="width:130px"
><i ><i
slot="suffix" slot="suffix"
style="font-style: normal; margin-right: 10px" style="font-style: normal; margin-right: 10px"
...@@ -156,8 +158,8 @@ ...@@ -156,8 +158,8 @@
></el-input ></el-input
> >
</el-form-item> </el-form-item>
<el-form-item label="备注"> <el-form-item label="说明">
<el-input v-model="item.remarks"></el-input> <el-input v-model="item.remarks" type="textarea" :rows="2" style="width:120%"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -192,7 +194,6 @@ export default { ...@@ -192,7 +194,6 @@ export default {
paymentMethod: null, //支付方式 paymentMethod: null, //支付方式
reimbursementState: 0, //状态 reimbursementState: 0, //状态
projectId: null, //项目id projectId: null, //项目id
fromList: [],
remarks: "", //备注 remarks: "", //备注
enclosureDescribe: "", //附件描述 enclosureDescribe: "", //附件描述
invoiceIdList: [], //发票号码 invoiceIdList: [], //发票号码
...@@ -353,11 +354,6 @@ export default { ...@@ -353,11 +354,6 @@ export default {
this.projectList = res.data; this.projectList = res.data;
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
} }
}) })
.catch((error) => { .catch((error) => {
...@@ -399,6 +395,17 @@ export default { ...@@ -399,6 +395,17 @@ export default {
this.$message.error("获取报销项失败"); this.$message.error("获取报销项失败");
}); });
}, },
//上传失败的回调
fileError(){
this.$message.error("附件上传失败");
},
fileSuccess(res){
if(res.success){
this.$message.success(res.msg)
}else{
this.$message.error(res.msg);
}
},
//定义金额校验 //定义金额校验
moneyrow(rule, value, callback) { moneyrow(rule, value, callback) {
let RegExp = let RegExp =
...@@ -471,7 +478,7 @@ export default { ...@@ -471,7 +478,7 @@ export default {
} }
}); });
}); });
if (this.from.fromList.length == 0) { if (this.from.invoiceIdList.length == 0) {
this.from.applyTotalAmountLarge = null; this.from.applyTotalAmountLarge = null;
} }
this.convertCurrency(this.from.applyTotalAmountSmall); this.convertCurrency(this.from.applyTotalAmountSmall);
...@@ -519,10 +526,6 @@ export default { ...@@ -519,10 +526,6 @@ export default {
//超出最大处理数字 //超出最大处理数字
return ""; return "";
} }
if (money == 0) {
chineseStr = cnNums[0] + cnIntLast + cnInteger;
return chineseStr;
}
//转换为字符串 //转换为字符串
money = money.toString(); money = money.toString();
if (money.indexOf(".") == -1) { if (money.indexOf(".") == -1) {
......
This diff is collapsed.
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
></el-input ></el-input
> >
</el-form-item> </el-form-item>
<el-form-item label="备注"> <el-form-item label="说明">
<el-input v-model="item.remarks"></el-input> <el-input v-model="item.remarks"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -263,11 +263,6 @@ export default { ...@@ -263,11 +263,6 @@ export default {
this.projectList = res.data; this.projectList = res.data;
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
} }
}) })
.catch((error) => { .catch((error) => {
...@@ -281,12 +276,7 @@ export default { ...@@ -281,12 +276,7 @@ export default {
if (res.status == "success") { if (res.status == "success") {
this.company = res.data; this.company = res.data;
} else { } else {
this.$message.error(res.data); this.$message.error(res.msg);
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
} }
}) })
.catch((error) => { .catch((error) => {
......
...@@ -118,7 +118,7 @@ export default { ...@@ -118,7 +118,7 @@ export default {
if (res.success) { if (res.success) {
this.rolesList = res.data this.rolesList = res.data
} else { } else {
this.$message.error(res.data) this.$message.error(res.msg)
} }
}).catch((error) => { }).catch((error) => {
this.$message.error("查询角色失败") this.$message.error("查询角色失败")
...@@ -140,7 +140,7 @@ export default { ...@@ -140,7 +140,7 @@ export default {
this.$store.dispatch('tagsView/delView', this.$route) this.$store.dispatch('tagsView/delView', this.$route)
this.$router.push("/staffList") this.$router.push("/staffList")
} else { } else {
this.$message.error(res.data) this.$message.error(res.msg)
} }
}).catch((error) => { }).catch((error) => {
this.$message.error("添加失败") this.$message.error("添加失败")
......
...@@ -159,7 +159,7 @@ export default { ...@@ -159,7 +159,7 @@ export default {
if (res.success) { if (res.success) {
this.rolesList = res.data; this.rolesList = res.data;
} else { } else {
this.$message.error(res.data); this.$message.error(res.msg);
} }
}) })
.catch(error => { .catch(error => {
...@@ -175,7 +175,7 @@ export default { ...@@ -175,7 +175,7 @@ export default {
this.staffList = res.data.list; this.staffList = res.data.list;
this.total = res.data.total; this.total = res.data.total;
} else { } else {
this.$message.error(res.data); this.$message.error(res.msg);
} }
}) })
.catch(error => { .catch(error => {
...@@ -241,7 +241,7 @@ export default { ...@@ -241,7 +241,7 @@ export default {
if (res.success) { if (res.success) {
this.getSatff(); this.getSatff();
} else { } else {
this.$message.error(res.data); this.$message.error(res.msg);
} }
}); });
this.dialogVisible = false; this.dialogVisible = false;
......
This diff is collapsed.
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
typeList:[ typeList:[
{ {
key:Date.now(), key:Date.now(),
typeCategory:'1', typeCategory:'0',
typeName:'', typeName:'',
companyId:this.$store.getters.companyId, companyId:this.$store.getters.companyId,
} }
...@@ -114,7 +114,6 @@ ...@@ -114,7 +114,6 @@
} }
}) })
.catch(error => { .catch(error => {
console.log(error);
this.$message.error("添加失败"); this.$message.error("添加失败");
}); });
} else { } else {
...@@ -144,7 +143,7 @@ ...@@ -144,7 +143,7 @@
{ {
key:Date.now(), key:Date.now(),
typeName:'', typeName:'',
typeCategory:'1', typeCategory:'0',
companyId:this.$store.getters.companyId, companyId:this.$store.getters.companyId,
} }
); );
......
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