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

202211201

parent 979e03ac
......@@ -149,7 +149,7 @@ export default {
//重置数据
resetForm(){
this.$refs.form.resetFields()
this.getProject()
},
//提交数据
submitForm(){
......
......@@ -699,11 +699,7 @@ export default {
this.reimbursementDetails.list = res.data;
this.$message.success(res.msg);
}else{
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
this.$message.error(res.msg)
}
})
.catch((error) => {
......@@ -722,13 +718,8 @@ export default {
if (res.success) {
//获取数据
this.financeList.list = res.data;
// this.$message.success(res.msg);
}else{
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
this.$message.success(res.msg);
}
})
.catch((error) => {
......@@ -754,11 +745,6 @@ export default {
this.total = res.data.total;
} else {
this.$message.error(res.msg);
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
}
})
.catch((error) => {
......@@ -817,11 +803,6 @@ export default {
this.getReimbursement();
} else {
this.$message.error(res.msg);
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
}
})
.catch((error) => {
......@@ -868,11 +849,6 @@ export default {
this.getReimbursement();
} else {
this.$message.error(res.msg);
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
}
})
.catch((error) => {
......@@ -944,11 +920,7 @@ export default {
} else {
this.$message.error(res.msg);
this.back();
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
}
})
.catch((error) => {
......@@ -1075,11 +1047,7 @@ export default {
}
} else {
this.$message.error(res.msg);
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
}
})
.catch((error) => {
......@@ -1115,13 +1083,9 @@ export default {
type: "success",
});
this.visible = false;
console.log(res.msg);
}else{
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
this.$message.error(res.msg)
}
})
.catch((errror) => {
......@@ -1151,11 +1115,7 @@ export default {
this.Refresh();
} else {
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 {
this.proutlist1.enclosureDescribe = ""; //初始化数据
} else {
this.$message.error(res.msg);
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
}
})
.catch((error) => {
......@@ -1212,11 +1168,7 @@ export default {
if (res.success) {
this.getinvoive(data);
}else{
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
this.$message.error(res.msg)
}
});
},
......
......@@ -588,11 +588,7 @@ export default {
this.reimbursementDetails.list = res.data;
this.$message.success(res.msg);
}else{
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
this.$message.error(res.msg)
}
})
.catch((error) => {
......@@ -608,11 +604,6 @@ export default {
this.total = res.data.total;
} else {
this.$message.error(res.msg);
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
}
})
.catch((error) => {
......@@ -645,11 +636,6 @@ export default {
this.getReimbursement();
} else {
this.$message.error(res.msg);
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
}
})
.catch((error) => {
......@@ -693,11 +679,6 @@ export default {
this.getReimbursement();
} else {
this.$message.error(res.msg);
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
}
})
.catch((error) => {
......@@ -768,11 +749,6 @@ export default {
} else {
this.$message.error(res.msg);
this.back();
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
}
})
.catch((error) => {
......@@ -800,11 +776,6 @@ export default {
}
} else {
this.$message.error(res.msg);
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
}
})
.catch((error) => {
......@@ -841,17 +812,13 @@ export default {
type: "success",
});
this.visible = false;
console.log(res.msg);
}else{
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
this.$message.error(res.msg);
}
})
.catch((errror) => {
this.$message.error(res.msg);
this.$message.error("删除失败");
});
},
//清除附件文件
......@@ -877,11 +844,7 @@ export default {
this.Refresh();
} else {
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 {
this.proutlist1.enclosureDescribe = ""; //初始化数据
} else {
this.$message.error(res.msg);
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
}
})
.catch((error) => {
......@@ -938,11 +896,7 @@ export default {
if (res.success) {
this.getinvoive(data);
}else{
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
this.$message.error(res.msg)
}
});
},
......
......@@ -2,7 +2,7 @@
<div class="container" :gutter="20">
<div class="box">
<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
ref="form"
:model="from"
......@@ -92,6 +92,8 @@
:action="action1"
:auto-upload="false"
:data="enclosurelist"
:on-remove="fileError"
:on-success="fileSuccess"
multiple
>
<i class="el-icon-upload"></i>
......@@ -123,7 +125,7 @@
</el-form>
</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">
<el-empty description="暂无报销项,因此无法报销"></el-empty>
</div>
......@@ -148,7 +150,7 @@
required: true,
}"
>
<el-input v-model="item.money"
<el-input v-model="item.money" style="width:130px"
><i
slot="suffix"
style="font-style: normal; margin-right: 10px"
......@@ -156,8 +158,8 @@
></el-input
>
</el-form-item>
<el-form-item label="备注">
<el-input v-model="item.remarks"></el-input>
<el-form-item label="说明">
<el-input v-model="item.remarks" type="textarea" :rows="2" style="width:120%"></el-input>
</el-form-item>
</el-col>
</el-row>
......@@ -192,7 +194,6 @@ export default {
paymentMethod: null, //支付方式
reimbursementState: 0, //状态
projectId: null, //项目id
fromList: [],
remarks: "", //备注
enclosureDescribe: "", //附件描述
invoiceIdList: [], //发票号码
......@@ -353,11 +354,6 @@ export default {
this.projectList = res.data;
} else {
this.$message.error(res.msg);
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
}
})
.catch((error) => {
......@@ -399,6 +395,17 @@ export default {
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) {
let RegExp =
......@@ -471,7 +478,7 @@ export default {
}
});
});
if (this.from.fromList.length == 0) {
if (this.from.invoiceIdList.length == 0) {
this.from.applyTotalAmountLarge = null;
}
this.convertCurrency(this.from.applyTotalAmountSmall);
......@@ -519,10 +526,6 @@ export default {
//超出最大处理数字
return "";
}
if (money == 0) {
chineseStr = cnNums[0] + cnIntLast + cnInteger;
return chineseStr;
}
//转换为字符串
money = money.toString();
if (money.indexOf(".") == -1) {
......
This diff is collapsed.
......@@ -479,11 +479,7 @@
<script>
import { queryBypage, reimbursementId, resubmit } from "@/api/reimbursement";
import {
selectAllById,
selectByIdF,
deleteById,
} from "@/api/project";
import { selectAllById, selectByIdF, deleteById } from "@/api/project";
import { getFileUrl } from "@/api/companyFile";
import { selectByReimbursementId } from "@/api/reimbursementDetails";
export default {
......@@ -493,7 +489,7 @@ export default {
reimbursementQurey: {
userId: null,
pageNum: 1,
pageSize: 10,
pageSize: 5,
},
//手动下拉框赋值(搜索)
options: [
......@@ -588,7 +584,6 @@ export default {
},
//搜索
query() {
this.reimbursementQurey.pageNum = 1;
this.getReimbursement();
},
......@@ -600,16 +595,11 @@ export default {
this.reimbursementList = res.data.list;
this.total = res.data.total;
} else {
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
this.$message.error(res.msg);
}
})
.catch((error) => {
this.$message.error("回去数据失败");
this.$message.error("获取数据失败");
});
},
//时间处理
......@@ -682,13 +672,15 @@ export default {
.then(() => {
reimbursementId(data.reimbursementId).then((res) => {
if (res.success) {
if (
this.reimbursementQurey.pageNum != 1 &&
this.reimbursementList.length == 1
) {
this.reimbursementQurey.pageNum--;
}
this.getReimbursement();
} else {
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
this.$message.error(res.msg);
}
});
})
......@@ -717,11 +709,6 @@ export default {
this.$message.success("重新提交成功,等待审批");
this.getReimbursement();
} else {
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
this.$message.error(res.msg);
}
})
......@@ -740,11 +727,7 @@ export default {
if (res.success) {
this.reimbursementDetails.list = res.data;
} else {
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
this.$message.error(res.msg);
}
})
.catch((error) => {
......@@ -755,7 +738,10 @@ export default {
addenclosure() {
this.getshow = 0;
this.disabled = true;
this.delfile1();
// this.$nextTick(()=>{
// this.$refs.upload1.clearFile()
// })
this.clearFile();
},
//附件的显示
getenclosure(row) {
......@@ -784,11 +770,6 @@ export default {
this.getshow = 3;
}
} else {
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
this.$message.error(res.msg);
}
})
......@@ -796,31 +777,36 @@ export default {
this.$message.error("获取附件文件失败");
});
},
//清除附件文件
//附件上传失败回调
delfile1(file) {
this.fileList1 = this.fileList1.filter((item) => item.uid !== file.uid);
this.$message.error("上传附件失败");
},
//文件清除
clearFile(){
this.fileList1 = []
this.fileTypepdf = false;
this.enclosurelist.enclosureDescribe = "";
},
//附件的刷新
Refresh() {
Refresh(res) {
this.queryDTO.reimbursementId = this.enclosurelist.Id;
if (res.success) {
selectByIdF(this.queryDTO)
.then((res) => {
if (res.success) {
this.queryDTOList = res.data;
this.enclosurelist.enclosureDescribe = ""; //初始化数据
} else {
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
this.$message.error(res.msg);
}
})
.catch((error) => {
this.$message.error("获取附件文件失败");
this.$message.error(error.msg);
});
} else {
this.$message.error(res.msg);
}
},
//删除附件
delenclosure(row) {
......@@ -843,13 +829,8 @@ export default {
type: "success",
});
this.visible = false;
// console.log(res.msg);
} else {
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
this.$message.error(res.msg);
}
})
.catch((error) => {
......@@ -861,11 +842,11 @@ export default {
if (this.queryDTOList.length > 0) {
this.getshow = 1;
this.disabled = false;
this.delfile1();
this.clearFile();
} else {
this.getshow = 3;
this.disabled = false;
this.delfile1();
this.clearFile();
}
},
//确定添加附件
......@@ -882,7 +863,6 @@ export default {
message: "上传附件成功",
type: "success",
});
this.Refresh();
} else {
this.$message.error("请添加附件,在进行提交");
}
......@@ -926,7 +906,6 @@ export default {
applyTotalAmountSmall: data.applyTotalAmountSmall, //小写金额
summary: data.summary, //摘要
paymentMethod: data.paymentMethod, //支付方式
},
});
},
......
......@@ -119,7 +119,7 @@
></el-input
>
</el-form-item>
<el-form-item label="备注">
<el-form-item label="说明">
<el-input v-model="item.remarks"></el-input>
</el-form-item>
</el-col>
......@@ -263,11 +263,6 @@ export default {
this.projectList = res.data;
} else {
this.$message.error(res.msg);
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
}
})
.catch((error) => {
......@@ -281,12 +276,7 @@ export default {
if (res.status == "success") {
this.company = res.data;
} else {
this.$message.error(res.data);
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
this.$message.error(res.msg);
}
})
.catch((error) => {
......
......@@ -118,7 +118,7 @@ export default {
if (res.success) {
this.rolesList = res.data
} else {
this.$message.error(res.data)
this.$message.error(res.msg)
}
}).catch((error) => {
this.$message.error("查询角色失败")
......@@ -140,7 +140,7 @@ export default {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.push("/staffList")
} else {
this.$message.error(res.data)
this.$message.error(res.msg)
}
}).catch((error) => {
this.$message.error("添加失败")
......
......@@ -159,7 +159,7 @@ export default {
if (res.success) {
this.rolesList = res.data;
} else {
this.$message.error(res.data);
this.$message.error(res.msg);
}
})
.catch(error => {
......@@ -175,7 +175,7 @@ export default {
this.staffList = res.data.list;
this.total = res.data.total;
} else {
this.$message.error(res.data);
this.$message.error(res.msg);
}
})
.catch(error => {
......@@ -241,7 +241,7 @@ export default {
if (res.success) {
this.getSatff();
} else {
this.$message.error(res.data);
this.$message.error(res.msg);
}
});
this.dialogVisible = false;
......
This diff is collapsed.
......@@ -68,7 +68,7 @@
typeList:[
{
key:Date.now(),
typeCategory:'1',
typeCategory:'0',
typeName:'',
companyId:this.$store.getters.companyId,
}
......@@ -114,7 +114,6 @@
}
})
.catch(error => {
console.log(error);
this.$message.error("添加失败");
});
} else {
......@@ -144,7 +143,7 @@
{
key:Date.now(),
typeName:'',
typeCategory:'1',
typeCategory:'0',
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