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

20221125

parent a0a55082
...@@ -130,11 +130,11 @@ ...@@ -130,11 +130,11 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
label="申报总金额" label="申报总金额(元)"
prop="applyTotalAmountSmall" prop="applyTotalAmountSmall"
> >
</el-table-column> </el-table-column>
<el-table-column label="核报总金额" align="center"> <el-table-column label="核报总金额(元)" align="center">
<template slot-scope="props"> <template slot-scope="props">
{{ props.row.verifyTotalAmountSmall || "还未核实金额" }} {{ props.row.verifyTotalAmountSmall || "还未核实金额" }}
</template> </template>
...@@ -320,10 +320,10 @@ ...@@ -320,10 +320,10 @@
<span>{{ paramlist.vehicle }}</span> <span>{{ paramlist.vehicle }}</span>
</el-form-item> </el-form-item>
<el-form-item label="伙食补贴"> <el-form-item label="伙食补贴(元)">
<span>{{ paramlist.foodAllowance }}</span> <span>{{ paramlist.foodAllowance }}</span>
</el-form-item> </el-form-item>
<el-form-item label="公杂补贴"> <el-form-item label="公杂补贴(元)">
<span>{{ paramlist.publicMiscellaneousSubsidy }}</span> <span>{{ paramlist.publicMiscellaneousSubsidy }}</span>
</el-form-item> </el-form-item>
<el-form-item label="随从人员"> <el-form-item label="随从人员">
...@@ -340,19 +340,19 @@ ...@@ -340,19 +340,19 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<div class="grid-content bg-purple-light"> <div class="grid-content bg-purple-light">
<el-form-item label="火车/汽车/轮船费"> <el-form-item label="火车/汽车/轮船费(元)">
<span>{{ paramlist.tripCost }}</span> <span>{{ paramlist.tripCost }}</span>
</el-form-item> </el-form-item>
<el-form-item label="机票费"> <el-form-item label="机票费(元)">
<span>{{ paramlist.planeTicket }}</span> <span>{{ paramlist.planeTicket }}</span>
</el-form-item> </el-form-item>
<el-form-item label="汽油费"> <el-form-item label="汽油费(元)">
<span>{{ paramlist.trafficCost }}</span> <span>{{ paramlist.trafficCost }}</span>
</el-form-item> </el-form-item>
<el-form-item label="住宿费"> <el-form-item label="住宿费(元)">
<span>{{ paramlist.lodgingCost }}</span> <span>{{ paramlist.lodgingCost }}</span>
</el-form-item> </el-form-item>
<el-form-item label="其他费用"> <el-form-item label="其他费用(元)">
<span>{{ paramlist.otherCost }}</span> <span>{{ paramlist.otherCost }}</span>
</el-form-item> </el-form-item>
<el-form-item label="备注"> <el-form-item label="备注">
...@@ -584,9 +584,11 @@ ...@@ -584,9 +584,11 @@
<script> <script>
import { money } from "@/utils/myValidate"; import { money } from "@/utils/myValidate";
import { getFileUrl } from "@/api/companyFile"; import { getFileUrl } from "@/api/companyFile";
import { queryBypagefinance } from "@/api/spendreimbursement"; import {
import { selectAll } from "@/api/spendreimbursement"; queryBypagefinance,
import { finApproval } from "@/api/spendreimbursement"; selectAll,
finApproval,
} from "@/api/spendreimbursement";
import { selectAllById, selectByIdF, deleteById } from "@/api/project"; import { selectAllById, selectByIdF, deleteById } from "@/api/project";
export default { export default {
created() { created() {
...@@ -692,8 +694,7 @@ export default { ...@@ -692,8 +694,7 @@ export default {
// 展示数据的方法 // 展示数据的方法
getpagelist(pager = 1) { getpagelist(pager = 1) {
this.queryitem.pageNum = pager; this.queryitem.pageNum = pager;
queryBypagefinance(this.queryitem) queryBypagefinance(this.queryitem).then(async (res) => {
.then((res) => {
if (res.success) { if (res.success) {
this.total = res.data.total; this.total = res.data.total;
this.tableData = res.data.list; this.tableData = res.data.list;
...@@ -711,11 +712,14 @@ export default { ...@@ -711,11 +712,14 @@ export default {
}); });
}); });
} else { } else {
//业务逻辑
this.$message.error(res.msg); this.$message.error(res.msg);
if (res.code == 4) {
//执行退出功能
await this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
} }
})
.catch((error) => {
this.$message.error("查询失败");
}); });
}, },
agreeandrefuse(data) { agreeandrefuse(data) {
...@@ -754,14 +758,12 @@ export default { ...@@ -754,14 +758,12 @@ export default {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}) }).then(() => {
.then(() => {
this.agreeOrapproval.financeId = this.$store.getters.urId; this.agreeOrapproval.financeId = this.$store.getters.urId;
this.agreeOrapproval.tripStatus = 3; this.agreeOrapproval.tripStatus = 3;
this.agreeOrapproval.tripId = this.financelistData.tripId; this.agreeOrapproval.tripId = this.financelistData.tripId;
this.agreeOrapproval.financeTime = this.time(); this.agreeOrapproval.financeTime = this.time();
finApproval(this.agreeOrapproval) finApproval(this.agreeOrapproval).then(async (res) => {
.then((res) => {
if (res.success) { if (res.success) {
this.$message({ this.$message({
type: "success", type: "success",
...@@ -770,18 +772,14 @@ export default { ...@@ -770,18 +772,14 @@ export default {
this.getpagelist(); this.getpagelist();
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);
if (res.code == 4) {
//执行退出功能
await this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
} }
})
.catch((error) => {
this.$message.error("操作失败");
}); });
this.dialogVisible = false; this.dialogVisible = false;
})
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
});
}); });
} }
}); });
...@@ -802,32 +800,26 @@ export default { ...@@ -802,32 +800,26 @@ export default {
return false; return false;
} }
}, },
}) }).then((value) => {
.then((value) => {
this.agreeOrapproval.financeId = this.$store.getters.urId; this.agreeOrapproval.financeId = this.$store.getters.urId;
this.agreeOrapproval.finaceRefute = value.value; this.agreeOrapproval.finaceRefute = value.value;
this.agreeOrapproval.tripStatus = 4; this.agreeOrapproval.tripStatus = 4;
this.agreeOrapproval.tripId = this.financelistData.tripId; this.agreeOrapproval.tripId = this.financelistData.tripId;
this.agreeOrapproval.financeTime = this.time(); this.agreeOrapproval.financeTime = this.time();
finApproval(this.agreeOrapproval) finApproval(this.agreeOrapproval).then(async (res) => {
.then((res) => {
if (res.success) { if (res.success) {
this.$message.success("操作成功"); this.$message.success("操作成功");
this.getpagelist(); this.getpagelist();
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);
if (res.code == 4) {
//执行退出功能
await this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
} }
})
.catch((error) => {
this.$message.error("操作失败");
}); });
this.dialogVisible = false; this.dialogVisible = false;
})
.catch(() => {
this.$message({
type: "info",
message: "取消操作",
});
}); });
} }
}); });
...@@ -864,12 +856,11 @@ export default { ...@@ -864,12 +856,11 @@ export default {
//查询发票图片 //查询发票图片
Selectinsertlsit() { Selectinsertlsit() {
selectAllById(this.getinvoiveId) selectAllById(this.getinvoiveId)
.then((res) => { .then(async (res) => {
if (res.success) { if (res.success) {
this.getinvoivelist = res.data; this.getinvoivelist = res.data;
this.getinvoivelist.forEach((e) => { this.getinvoivelist.forEach((e) => {
let fileNamepdf = e.filePath; let fileNamepdf = e.filePath;
console.log(e.filePath);
let fileType = fileNamepdf.substring( let fileType = fileNamepdf.substring(
fileNamepdf.lastIndexOf(".") fileNamepdf.lastIndexOf(".")
); );
...@@ -885,7 +876,12 @@ export default { ...@@ -885,7 +876,12 @@ export default {
}); });
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);
this.back(); //业务逻辑
if (res.code == 4) {
//执行退出功能
await this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
} }
}) })
.catch((error) => { .catch((error) => {
...@@ -1000,8 +996,7 @@ export default { ...@@ -1000,8 +996,7 @@ export default {
selectImage(row) { selectImage(row) {
this.queryDTO.tripId = row.tripId; this.queryDTO.tripId = row.tripId;
this.proutlist1.Id = row.tripId; this.proutlist1.Id = row.tripId;
selectByIdF(this.queryDTO) selectByIdF(this.queryDTO).then(async (res) => {
.then((res) => {
if (res.success) { if (res.success) {
this.queryDTOList = res.data; this.queryDTOList = res.data;
if (this.queryDTOList.length > 0) { if (this.queryDTOList.length > 0) {
...@@ -1015,10 +1010,13 @@ export default { ...@@ -1015,10 +1010,13 @@ export default {
} }
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);
//业务逻辑
if (res.code == 4) {
//执行退出功能
await this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
} }
})
.catch((error) => {
this.$message.error("获取附件文件失败");
}); });
}, },
//下载附件 //下载附件
...@@ -1035,17 +1033,19 @@ export default { ...@@ -1035,17 +1033,19 @@ export default {
//刷新附件 //刷新附件
Refresh() { Refresh() {
this.queryDTO.tripId = this.proutlist1.Id; this.queryDTO.tripId = this.proutlist1.Id;
selectByIdF(this.queryDTO) selectByIdF(this.queryDTO).then(async (res) => {
.then((res) => {
if (res.success) { if (res.success) {
this.queryDTOList = res.data; this.queryDTOList = res.data;
this.proutlist1.enclosureDescribe = ""; //初始化数据 this.proutlist1.enclosureDescribe = ""; //初始化数据
} else { } else {
//业务逻辑
this.$message.error(res.msg); this.$message.error(res.msg);
if (res.code == 4) {
//执行退出功能
await this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
} }
})
.catch((error) => {
this.$message.error("获取附件文件失败");
}); });
}, },
......
...@@ -129,12 +129,12 @@ ...@@ -129,12 +129,12 @@
<el-table-column label="报销项目" prop="projectName" align="center"> <el-table-column label="报销项目" prop="projectName" align="center">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="申报总金额" label="申报总金额(元)"
align="center" align="center"
prop="applyTotalAmountSmall" prop="applyTotalAmountSmall"
> >
</el-table-column> </el-table-column>
<el-table-column align="center" label="核报总金额"> <el-table-column align="center" label="核报总金额(元)">
<template slot-scope="props"> <template slot-scope="props">
{{ props.row.verifyTotalAmountSmall || "还未核实金额" }} {{ props.row.verifyTotalAmountSmall || "还未核实金额" }}
</template> </template>
...@@ -282,10 +282,10 @@ ...@@ -282,10 +282,10 @@
<span>{{ paramlist.vehicle }}</span> <span>{{ paramlist.vehicle }}</span>
</el-form-item> </el-form-item>
<el-form-item label="伙食补贴"> <el-form-item label="伙食补贴(元)">
<span>{{ paramlist.foodAllowance }}</span> <span>{{ paramlist.foodAllowance }}</span>
</el-form-item> </el-form-item>
<el-form-item label="公杂补贴"> <el-form-item label="公杂补贴(元)">
<span>{{ paramlist.publicMiscellaneousSubsidy }}</span> <span>{{ paramlist.publicMiscellaneousSubsidy }}</span>
</el-form-item> </el-form-item>
<el-form-item label="随从人员"> <el-form-item label="随从人员">
...@@ -302,19 +302,19 @@ ...@@ -302,19 +302,19 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<div class="grid-content bg-purple-light"> <div class="grid-content bg-purple-light">
<el-form-item label="火车/汽车/轮船费"> <el-form-item label="火车/汽车/轮船费(元)">
<span>{{ paramlist.tripCost }}</span> <span>{{ paramlist.tripCost }}</span>
</el-form-item> </el-form-item>
<el-form-item label="机票费"> <el-form-item label="机票费(元)">
<span>{{ paramlist.planeTicket }}</span> <span>{{ paramlist.planeTicket }}</span>
</el-form-item> </el-form-item>
<el-form-item label="汽油费"> <el-form-item label="汽油费(元)">
<span>{{ paramlist.trafficCost }}</span> <span>{{ paramlist.trafficCost }}</span>
</el-form-item> </el-form-item>
<el-form-item label="住宿费"> <el-form-item label="住宿费(元)">
<span>{{ paramlist.lodgingCost }}</span> <span>{{ paramlist.lodgingCost }}</span>
</el-form-item> </el-form-item>
<el-form-item label="其他费用"> <el-form-item label="其他费用(元)">
<span>{{ paramlist.otherCost }}</span> <span>{{ paramlist.otherCost }}</span>
</el-form-item> </el-form-item>
<el-form-item label="备注"> <el-form-item label="备注">
...@@ -469,10 +469,8 @@ ...@@ -469,10 +469,8 @@
</template> </template>
<script> <script>
import { queryByheadman } from "@/api/spendreimbursement"; import { queryByheadman, selectAll, Approval } from "@/api/spendreimbursement";
import { getFileUrl } from "@/api/companyFile"; import { getFileUrl } from "@/api/companyFile";
import { selectAll } from "@/api/spendreimbursement";
import { Approval } from "@/api/spendreimbursement";
import { selectAllById, selectByIdF } from "@/api/project"; import { selectAllById, selectByIdF } from "@/api/project";
export default { export default {
created() { created() {
...@@ -515,7 +513,7 @@ export default { ...@@ -515,7 +513,7 @@ export default {
companyId: null, companyId: null,
tripId: 0, tripId: 0,
}, },
srcList:[], srcList: [],
//附件///------- //附件///-------
//drawer1: false, //drawer1: false,
...@@ -559,30 +557,26 @@ export default { ...@@ -559,30 +557,26 @@ export default {
// 展示数据的方法 // 展示数据的方法
getpagelist(pager = 1) { getpagelist(pager = 1) {
this.queryitem.pageNum = pager; this.queryitem.pageNum = pager;
queryByheadman(this.queryitem) queryByheadman(this.queryitem).then((res) => {
.then((res) => {
if (res.success) { if (res.success) {
this.total = res.data.total; this.total = res.data.total;
this.tableData = res.data.list; this.tableData = res.data.list;
res.data.list.forEach((item) => { res.data.list.forEach((item) => {
selectAll({ tripId: item.tripId }) selectAll({ tripId: item.tripId }).then(async (resu) => {
.then((resu) => {
if (resu.success) { if (resu.success) {
item.entouragelist = resu.data; item.entouragelist = resu.data;
} else { } else {
this.$message.error(resu.msg); this.$message.error(res.msg);
//业务逻辑
if (res.code == 4) {
//执行退出功能
await this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
} }
})
.catch((error) => {
this.$message.error("失败");
}); });
}); });
} else {
this.$message.error(res.msg);
} }
})
.catch((error) => {
this.$message.error("查询失败");
}); });
}, },
// 搜索 // 搜索
...@@ -609,16 +603,13 @@ export default { ...@@ -609,16 +603,13 @@ export default {
this.$confirm("是否同意此报销单?, 是否继续?", "提示", { this.$confirm("是否同意此报销单?, 是否继续?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}) }).then(() => {
.then(() => {
this.agreeOrapproval.headmanId = data.userId; this.agreeOrapproval.headmanId = data.userId;
this.agreeOrapproval.tripStatus = 1; this.agreeOrapproval.tripStatus = 1;
this.agreeOrapproval.tripId = data.tripId; this.agreeOrapproval.tripId = data.tripId;
this.agreeOrapproval.headmanTime = this.time(); this.agreeOrapproval.headmanTime = this.time();
Approval(this.agreeOrapproval) Approval(this.agreeOrapproval).then(async (res) => {
.then((res) => {
if (res.success) { if (res.success) {
this.$message({ this.$message({
type: "success", type: "success",
...@@ -627,16 +618,13 @@ export default { ...@@ -627,16 +618,13 @@ export default {
this.getpagelist(); this.getpagelist();
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);
//业务逻辑
if (res.code == 4) {
//执行退出功能
await this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
} }
})
.catch((error) => {
this.$message.error("操作失败");
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消操作",
}); });
}); });
}, },
...@@ -654,30 +642,24 @@ export default { ...@@ -654,30 +642,24 @@ export default {
return false; return false;
} }
}, },
}) }).then((value) => {
.then((value) => {
this.agreeOrapproval.headmanId = data.userId; this.agreeOrapproval.headmanId = data.userId;
this.agreeOrapproval.headmanRefute = value.value; this.agreeOrapproval.headmanRefute = value.value;
this.agreeOrapproval.tripStatus = 2; this.agreeOrapproval.tripStatus = 2;
this.agreeOrapproval.tripId = data.tripId; this.agreeOrapproval.tripId = data.tripId;
this.agreeOrapproval.headmanTime = this.time(); this.agreeOrapproval.headmanTime = this.time();
Approval(this.agreeOrapproval) Approval(this.agreeOrapproval).then(async (res) => {
.then((res) => {
if (res.success) { if (res.success) {
this.$message.success("操作成功"); this.$message.success("操作成功");
this.getpagelist(); this.getpagelist();
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);
if (res.code == 4) {
//执行退出功能
await this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
} }
})
.catch((error) => {
this.$message.error("操作失败");
});
})
.catch(() => {
this.$message({
type: "info",
message: "取消操作",
}); });
}); });
}, },
...@@ -694,15 +676,12 @@ export default { ...@@ -694,15 +676,12 @@ export default {
}, },
//查询发票图片 //查询发票图片
Selectinsertlsit() { Selectinsertlsit() {
selectAllById(this.getinvoiveId) selectAllById(this.getinvoiveId).then(async (res) => {
.then((res) => {
if (res.success) { if (res.success) {
this.getinvoivelist = res.data; this.getinvoivelist = res.data;
this.getinvoivelist.forEach((e) => { this.getinvoivelist.forEach((e) => {
let fileNamepdf = e.filePath; let fileNamepdf = e.filePath;
let fileType = fileNamepdf.substring( let fileType = fileNamepdf.substring(fileNamepdf.lastIndexOf("."));
fileNamepdf.lastIndexOf(".")
);
getFileUrl(e.filePath).then((res) => { getFileUrl(e.filePath).then((res) => {
if (res.success) { if (res.success) {
let url = res.data; let url = res.data;
...@@ -715,12 +694,13 @@ export default { ...@@ -715,12 +694,13 @@ export default {
}); });
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);
this.back(); //业务逻辑
if (res.code == 4) {
//执行退出功能
await this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
} }
})
.catch((error) => {
this.$message.error("获取发票图片失败");
this.back();
}); });
}, },
//时间处理 yyyy-MM-dd hh:mm:ss //时间处理 yyyy-MM-dd hh:mm:ss
...@@ -753,8 +733,7 @@ export default { ...@@ -753,8 +733,7 @@ export default {
selectImage(row) { selectImage(row) {
this.queryDTO.tripId = row.tripId; this.queryDTO.tripId = row.tripId;
this.proutlist1.Id = row.tripId; this.proutlist1.Id = row.tripId;
selectByIdF(this.queryDTO) selectByIdF(this.queryDTO).then(async (res) => {
.then((res) => {
if (res.success) { if (res.success) {
this.queryDTOList = res.data; this.queryDTOList = res.data;
if (this.queryDTOList.length > 0) { if (this.queryDTOList.length > 0) {
...@@ -767,11 +746,14 @@ export default { ...@@ -767,11 +746,14 @@ export default {
this.getshow = 3; this.getshow = 3;
} }
} else { } else {
//业务逻辑
this.$message.error(res.msg); this.$message.error(res.msg);
if (res.code == 4) {
//执行退出功能
await this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
} }
})
.catch((error) => {
this.$message.error("获取附件文件失败");
}); });
}, },
//下载附件 //下载附件
...@@ -788,17 +770,19 @@ export default { ...@@ -788,17 +770,19 @@ export default {
//刷新附件 //刷新附件
Refresh() { Refresh() {
this.queryDTO.tripId = this.proutlist1.Id; this.queryDTO.tripId = this.proutlist1.Id;
selectByIdF(this.queryDTO) selectByIdF(this.queryDTO).then(async (res) => {
.then((res) => {
if (res.success) { if (res.success) {
this.queryDTOList = res.data; this.queryDTOList = res.data;
this.proutlist1.enclosureDescribe = ""; //初始化数据 this.proutlist1.enclosureDescribe = ""; //初始化数据
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);
//业务逻辑
if (res.code == 4) {
//执行退出功能
await this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
} }
})
.catch((error) => {
this.$message.error("获取附件文件失败");
}); });
}, },
//判断图片与pdf显示与隐藏 //判断图片与pdf显示与隐藏
......
...@@ -173,10 +173,8 @@ export default { ...@@ -173,10 +173,8 @@ export default {
//返回 //返回
back() { back() {
if (this.attrId == 0) { if (this.attrId == 0) {
this.$store.dispatch("tagsView/delView", this.$route);
this.$router.push("/assetslist"); this.$router.push("/assetslist");
} else { } else {
this.$store.dispatch("tagsView/delView", this.$route);
this.$router.push("/administrationlsit"); this.$router.push("/administrationlsit");
} }
}, },
......
...@@ -35,6 +35,42 @@ ...@@ -35,6 +35,42 @@
:cell-style="{'text-align':'center'}" :cell-style="{'text-align':'center'}"
:header-cell-style="{'text-align':'center'}" :header-cell-style="{'text-align':'center'}"
> >
<el-table-column type="expand">
<template slot-scope="props">
<el-descriptions
class="margin-top"
title="关于资产"
:column="1"
:size="medium"
style="width:40%; margin:20px 20px"
border
>
<el-descriptions-item label="资产名称:" :labelStyle="{'width':'120px'}">
<span>{{ props.row.fixedName }}</span>
</el-descriptions-item>
<el-descriptions-item label="资产详情:">
<span>{{ props.row.registerRemarks }}</span>
</el-descriptions-item>
<el-descriptions-item label="资产使用情况:">
<el-button
type="primary"
@click="selectFrom(props.row)"
size="mini"
icon="el-icon-search"
>查询使用</el-button>
</el-descriptions-item>
<el-descriptions-item label="资产丢失登记:">
<el-button
type="danger"
:disabled="props.row.fixedState=='2'?true:false"
size="mini"
icon="el-icon-edit"
@click="open(props.row)"
>丢失登记</el-button>
</el-descriptions-item>
</el-descriptions>
</template>
</el-table-column>
<el-table-column label="序号" width="50px" align="center"> <el-table-column label="序号" width="50px" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ {{
...@@ -59,33 +95,25 @@ ...@@ -59,33 +95,25 @@
>{{scope.row.fixedState == '0' ? '未使用' : scope.row.fixedState == '1' ? '已使用':'已丢失'}}</el-tag> >{{scope.row.fixedState == '0' ? '未使用' : scope.row.fixedState == '1' ? '已使用':'已丢失'}}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="资产使用情况" width="130px"> <!-- <el-table-column label="资产使用情况" width="130px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" @click="selectFrom(scope.row)" size="mini">查询资产使用</el-button>
</template>
</el-table-column>
<el-table-column prop="prop" label="操作" width="220px" align="center">
<template slot-scope="scope">
<el-row :gutter="20">
<el-col :span="4">
<el-button <el-button
type="danger" type="primary"
:disabled="scope.row.fixedState=='2'?true:false" @click="selectFrom(scope.row)"
size="mini" size="mini"
@click="open(scope.row)" icon="el-icon-search"
>丢失登记</el-button> >查询使用</el-button>
</el-col> </template>
<el-col :span="8" style="margin-left:5px"> </el-table-column>-->
<el-table-column prop="prop" label="操作" align="center">
<template slot-scope="scope">
<el-button <el-button
type="primary" type="primary"
size="mini" size="mini"
style="margin-left:40px"
icon="el-icon-edit" icon="el-icon-edit"
@click="goUpdate(scope.row)" @click="goUpdate(scope.row)"
:disabled="scope.row.fixedState=='2'?true:false" :disabled="scope.row.fixedState=='2'?true:false"
>修改资产信息</el-button> >修改资产信息</el-button>
</el-col>
</el-row>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
......
...@@ -387,7 +387,6 @@ export default { ...@@ -387,7 +387,6 @@ export default {
}, },
//返回 //返回
back() { back() {
this.$store.dispatch("tagsView/delView", this.$route);
this.$router.push("/administrationlsit"); this.$router.push("/administrationlsit");
}, },
//重置 //重置
......
...@@ -266,7 +266,6 @@ export default { ...@@ -266,7 +266,6 @@ export default {
}, },
// 返回 // 返回
back() { back() {
this.$store.dispatch("tagsView/delView", this.$route);
this.$router.push("/assetslist"); this.$router.push("/assetslist");
}, },
//重置 //重置
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
>{{scope.row.fixedState == '0' ? '未使用' : scope.row.fixedState == '1' ? '已使用':'已丢失'}}</el-tag> >{{scope.row.fixedState == '0' ? '未使用' : scope.row.fixedState == '1' ? '已使用':'已丢失'}}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="prop" label="操作"> <el-table-column prop="prop" label="操作" width="140px;">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="primary" type="primary"
...@@ -74,7 +74,6 @@ ...@@ -74,7 +74,6 @@
icon="el-icon-edit" icon="el-icon-edit"
@click="goUpdate(scope.row)" @click="goUpdate(scope.row)"
>修改资产信息</el-button> >修改资产信息</el-button>
<!-- <el-button type="danger" size="mini" @click="Updateget(scope.row)">修改管理者</el-button> -->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
......
...@@ -166,7 +166,7 @@ export default { ...@@ -166,7 +166,7 @@ export default {
this.company.companyCreateTime = this.timestampToTime() this.company.companyCreateTime = this.timestampToTime()
//提交 //提交
register(this.company).then((res)=>{ register(this.company).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("/companyList") this.$router.push("/companyList")
......
...@@ -265,7 +265,7 @@ export default { ...@@ -265,7 +265,7 @@ export default {
if (valid) { if (valid) {
staffpassword(this.passwordData) staffpassword(this.passwordData)
.then(res => { .then(res => {
if (res.status == "success") { if (res.success) {
this.$message({ this.$message({
showClose: true, showClose: true,
message: "修改密码成功", message: "修改密码成功",
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
<el-upload <el-upload
class="upload-demo" class="upload-demo"
drag drag
:headers="fileUploadHeader"
ref="Upload" ref="Upload"
:action="action" :action="action"
:auto-upload="false" :auto-upload="false"
...@@ -78,6 +79,9 @@ export default { ...@@ -78,6 +79,9 @@ export default {
fileRemarks: "", //文件备注 fileRemarks: "", //文件备注
userId: null, userId: null,
}, },
fileUploadHeader: {
"X-Token": null,
},
// 表单验证 // 表单验证
rules: { rules: {
companyFileName: [ companyFileName: [
...@@ -90,6 +94,7 @@ export default { ...@@ -90,6 +94,7 @@ export default {
this.companylist.companyId = this.$store.getters.companyId; this.companylist.companyId = this.$store.getters.companyId;
this.companylist.userId = this.$store.getters.info.userId; this.companylist.userId = this.$store.getters.info.userId;
this.action = process.env.VUE_APP_BASE_API + "/file/companyFile"; this.action = process.env.VUE_APP_BASE_API + "/file/companyFile";
this.fileUploadHeader["X-Token"] = this.$store.getters.token;
}, },
methods: { methods: {
submitForm() { submitForm() {
......
...@@ -76,14 +76,11 @@ ...@@ -76,14 +76,11 @@
> >
</el-pagination> </el-pagination>
</div> </div>
<!-- <div >
</div> -->
</div> </div>
</template> </template>
<script> <script>
import { queryBypage,getFileUrl } from "@/api/companyFile"; import { queryBypage, getFileUrl } from "@/api/companyFile";
export default { export default {
data() { data() {
return { return {
...@@ -116,10 +113,9 @@ export default { ...@@ -116,10 +113,9 @@ export default {
}, },
//下载 //下载
async download(row) { async download(row) {
console.log(row); console.log(row);
var a = document.createElement("a"); //创建一个<a></a>标 var a = document.createElement("a"); //创建一个<a></a>标
a.href=(await getFileUrl(row.companyFile)).data a.href = (await getFileUrl(row.companyFile)).data;
// //a.href = process.env.VUE_APP_BASE_API + row.companyFile; // 给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点. // //a.href = process.env.VUE_APP_BASE_API + row.companyFile; // 给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点.
a.target = "_blank"; a.target = "_blank";
a.style.display = "none"; // 障眼法藏起来a标签 a.style.display = "none"; // 障眼法藏起来a标签
...@@ -134,11 +130,23 @@ export default { ...@@ -134,11 +130,23 @@ export default {
}, },
//分页查询(查询全公司的) //分页查询(查询全公司的)
getCompanyFileList() { getCompanyFileList() {
// if (this.companyFileQurey.conmpanyFileName != null) {
// this.companyFileQurey.conmpanyFileName =
// this.companyFileQurey.conmpanyFileName
// .replace("%", "\\%")
// .replace("_", "\\_");
// }
queryBypage(this.companyFileQurey) queryBypage(this.companyFileQurey)
.then((res) => { .then((res) => {
if (res.success) { if (res.success) {
this.companyFIleList = res.data.list; this.companyFIleList = res.data.list;
this.total = res.data.total; this.total = res.data.total;
// if (this.companyFileQurey.conmpanyFileName != null) {
// this.companyFileQurey.conmpanyFileName =
// this.companyFileQurey.conmpanyFileName
// .replace("\\%", "%")
// .replace("\\_", "_");
// }
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);
} }
...@@ -157,22 +165,22 @@ export default { ...@@ -157,22 +165,22 @@ export default {
</script> </script>
<style scoped> <style scoped>
.el-col { .el-col {
border-radius: 4px; border-radius: 4px;
} }
.bg-purple-dark { .bg-purple-dark {
background: #99a9bf; background: #99a9bf;
} }
.bg-purple { .bg-purple {
background: #d3dce6; background: #d3dce6;
} }
.bg-purple-light { .bg-purple-light {
background: #e5e9f2; background: #e5e9f2;
} }
.grid-content { .grid-content {
border-radius: 4px; border-radius: 4px;
min-height: 36px; min-height: 36px;
} }
.container { .container {
padding: 10px; padding: 10px;
} }
......
...@@ -57,6 +57,44 @@ ...@@ -57,6 +57,44 @@
:cell-style="{ 'text-align': 'center' }" :cell-style="{ 'text-align': 'center' }"
:header-cell-style="{ 'text-align': 'center' }" :header-cell-style="{ 'text-align': 'center' }"
> >
<el-table-column type="expand">
<template slot-scope="props">
<el-descriptions
class="margin-top"
title="关于发票"
:column="1"
:size="medium"
style="width:60%; margin:20px 20px"
border
>
<el-descriptions-item label="发票代码:" :labelStyle="{'width':'120px'}">
<span>{{ props.row.code }}</span>
</el-descriptions-item>
<el-descriptions-item label="发票号码:">
<span>{{ props.row.number }}</span>
</el-descriptions-item>
<el-descriptions-item label="发票状态:">
<el-tag :type="props.row.status == '0' ? 'info' : 'warning'">
{{
props.row.status == 0 ? "未报销" : "已报销"
}}
</el-tag>
</el-descriptions-item>
<el-descriptions-item label="发票文件:">
<div v-if="formatProtocolType(props.row)">
<el-image
style="width: 100px; height: 60px"
:src="props.row.fileUrl"
:preview-src-list="srcList"
></el-image>
</div>
<div v-else>
<a class="a-style" @click="handlePreView(props.row)">点击查看文件</a>
</div>
</el-descriptions-item>
</el-descriptions>
</template>
</el-table-column>
<el-table-column label="序号" width="50" style> <el-table-column label="序号" width="50" style>
<template slot-scope="scope"> <template slot-scope="scope">
{{ {{
...@@ -67,9 +105,9 @@ ...@@ -67,9 +105,9 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="code" label="发票代码"></el-table-column> <el-table-column prop="code" label="发票代码"></el-table-column>
<el-table-column prop="number" label="发票号码" width="width"></el-table-column> <el-table-column prop="number" label="发票号码"></el-table-column>
<el-table-column prop="time" label="发票时间" :formatter="getFroms"></el-table-column> <el-table-column prop="time" label="发票时间" :formatter="getFroms"></el-table-column>
<el-table-column prop="category" label="发票类型"> <el-table-column prop="category" label="发票类型" width="90px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag :type="scope.row.category == '0' ? 'info' : 'primary'"> <el-tag :type="scope.row.category == '0' ? 'info' : 'primary'">
{{ {{
...@@ -78,7 +116,7 @@ ...@@ -78,7 +116,7 @@
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="type" label="发票类别"> <el-table-column prop="type" label="发票类别" width="90px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag <el-tag
:type=" :type="
...@@ -99,21 +137,7 @@ ...@@ -99,21 +137,7 @@
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="mone" label="发票金额"></el-table-column> <el-table-column prop="mone" label="发票金额" width="width"></el-table-column>
<el-table-column prop="prop" label="发票文件" width="120px">
<template slot-scope="scope">
<div v-if="formatProtocolType(scope.row)">
<el-image
style="width: 80px; height: 80px"
:src="scope.row.fileUrl"
:preview-src-list="srcList"
></el-image>
</div>
<div v-else>
<a class="a-style" @click="handlePreView(scope.row)">点击查看文件</a>
</div>
</template>
</el-table-column>
<el-table-column prop="status" label="发票状态" width="90px"> <el-table-column prop="status" label="发票状态" width="90px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag :type="scope.row.status == '0' ? 'info' : 'warning'"> <el-tag :type="scope.row.status == '0' ? 'info' : 'warning'">
...@@ -123,7 +147,7 @@ ...@@ -123,7 +147,7 @@
</el-tag> </el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="prop" label="操作"> <el-table-column prop="prop" label="操作" width="90px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-popover placement="top" width="160" v-model="scope.row.visible"> <el-popover placement="top" width="160" v-model="scope.row.visible">
<p>确定要删除当前发票吗</p> <p>确定要删除当前发票吗</p>
...@@ -148,8 +172,8 @@ ...@@ -148,8 +172,8 @@
<div class="foot_yi"> <div class="foot_yi">
<el-pagination <el-pagination
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
layout="total, prev, pager, next"
:total="total" :total="total"
layout="total, prev, pager, next"
:current-page.sync="invoiceQruey.pageNum" :current-page.sync="invoiceQruey.pageNum"
:page-size="invoiceQruey.pageSize" :page-size="invoiceQruey.pageSize"
></el-pagination> ></el-pagination>
......
...@@ -230,7 +230,7 @@ export default { ...@@ -230,7 +230,7 @@ export default {
//获取公司名称 //获取公司名称
getCompany(){ getCompany(){
selectById({companyId:this.$store.getters.companyId}).then((res)=>{ selectById({companyId:this.$store.getters.companyId}).then((res)=>{
if(res.status == "success"){ if(res.success){
this.company = res.data this.company = res.data
}else{ }else{
this.$message.error(res.data) this.$message.error(res.data)
......
...@@ -160,7 +160,7 @@ export default { ...@@ -160,7 +160,7 @@ export default {
//获取公司名称 //获取公司名称
getCompany(){ getCompany(){
selectById({companyId:this.$store.getters.companyId}).then((res)=>{ selectById({companyId:this.$store.getters.companyId}).then((res)=>{
if(res.status == "success"){ if(res.success){
this.company = res.data this.company = res.data
}else{ }else{
this.$message.error(res.data) this.$message.error(res.data)
......
...@@ -180,7 +180,7 @@ export default { ...@@ -180,7 +180,7 @@ export default {
submitMenu.meta.breadcrumb = this.convertToNumber(submitMenu.meta.breadcrumb) submitMenu.meta.breadcrumb = this.convertToNumber(submitMenu.meta.breadcrumb)
editMenu(submitMenu).then((res) => { editMenu(submitMenu).then((res) => {
if (res.status == "success") { if (res.success) {
this.getMenuData() this.getMenuData()
this.$message({ this.$message({
type: 'success', type: 'success',
...@@ -215,7 +215,7 @@ export default { ...@@ -215,7 +215,7 @@ export default {
submitMenu.meta.breadcrumb = this.convertToNumber(submitMenu.meta.breadcrumb) submitMenu.meta.breadcrumb = this.convertToNumber(submitMenu.meta.breadcrumb)
addMenu(submitMenu).then((res) => { addMenu(submitMenu).then((res) => {
if (res.status == "success") { if (res.success) {
this.$message({ this.$message({
type: 'success', type: 'success',
message: '添加成功!' message: '添加成功!'
......
...@@ -120,7 +120,7 @@ export default { ...@@ -120,7 +120,7 @@ export default {
//获取角色 //获取角色
getRoles() { getRoles() {
getRoles(this.roleQuery).then((res) => { getRoles(this.roleQuery).then((res) => {
if (res.status == "success") { if (res.success) {
this.rolesList = res.data.list this.rolesList = res.data.list
this.total = res.data.total this.total = res.data.total
} else { } else {
...@@ -133,7 +133,7 @@ export default { ...@@ -133,7 +133,7 @@ export default {
//获取路由 //获取路由
getRoutes() { getRoutes() {
getRoutes().then((res) => { getRoutes().then((res) => {
if (res.status == "success") { if (res.success) {
this.serviceRoutes = res.data this.serviceRoutes = res.data
this.routes = this.generateRoutes(res.data) this.routes = this.generateRoutes(res.data)
} }
...@@ -255,7 +255,7 @@ export default { ...@@ -255,7 +255,7 @@ export default {
} }
if (isEdit) { // 修改角色 if (isEdit) { // 修改角色
updateRole(this.role).then((res) => { updateRole(this.role).then((res) => {
if (res.status == "success") { if (res.success) {
this.$message.success("修改成功") this.$message.success("修改成功")
this.getRoles() this.getRoles()
} else { } else {
...@@ -268,7 +268,7 @@ export default { ...@@ -268,7 +268,7 @@ export default {
} else { } else {
//新增角色 //新增角色
addRole(this.role).then((res) => { addRole(this.role).then((res) => {
if (res.status == "success") { if (res.success) {
this.$message.success("添加成功") this.$message.success("添加成功")
this.getRoles() this.getRoles()
} else { } else {
......
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