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

202211201

parent 979e03ac
...@@ -3,7 +3,7 @@ ENV = 'development' ...@@ -3,7 +3,7 @@ ENV = 'development'
# base api 后端url # base api 后端url
#VUE_APP_BASE_API = 'http://192.168.10.107:7080' #VUE_APP_BASE_API = 'http://192.168.10.107:7080'
VUE_APP_BASE_API = 'http://192.168.10.109:11523' VUE_APP_BASE_API = 'http://192.168.0.109:11523'
#VUE_APP_BASE_API = 'http://www.aishuhong.com:11549/prod-api/' #VUE_APP_BASE_API = 'http://www.aishuhong.com:11549/prod-api/'
#VUE_APP_BASE_API = 'http://192.168.31.100:7081' #VUE_APP_BASE_API = 'http://192.168.31.100:7081'
...@@ -32,3 +32,11 @@ export function getFileUrl(fileName) { ...@@ -32,3 +32,11 @@ export function getFileUrl(fileName) {
method: 'post' method: 'post'
}) })
} }
//删除文件
export function delFile(data) {
return request({
url: '/companyFile/delete',
method: 'post',
data
})
}
...@@ -10,7 +10,6 @@ export const downloadPDFFile = function (url, fileName) { ...@@ -10,7 +10,6 @@ export const downloadPDFFile = function (url, fileName) {
url, url,
responseType: 'blob' responseType: 'blob'
}).then((res) => { }).then((res) => {
// console.log('headers', res.headers)
// handle(res.data, fileName) // handle(res.data, fileName)
if (!res.data) { if (!res.data) {
return return
......
// 身份证验证 // 身份证验证
export function chinaIdentityValid(rule, value, callback) { export function chinaIdentityValid(rule, value, callback) {
if (!value) { if (!value) {
console.log("身份证验证返回")
return callback(new Error('员工身份证号不能为空')) return callback(new Error('员工身份证号不能为空'))
} }
let city = { let city = {
...@@ -68,7 +67,6 @@ export function chinaIdentityValid(rule, value, callback) { ...@@ -68,7 +67,6 @@ export function chinaIdentityValid(rule, value, callback) {
} }
} }
} }
console.log("身份证验证返回")
callback() callback()
} }
//银行卡号检测 //银行卡号检测
...@@ -89,7 +87,6 @@ export function bankAccountValid(rule, value, callback) { ...@@ -89,7 +87,6 @@ export function bankAccountValid(rule, value, callback) {
// 电话号码验证 // 电话号码验证
export function checkPhone(rule, value, callback) { export function checkPhone(rule, value, callback) {
if (!value) { if (!value) {
// console.log(1)
return callback(new Error('手机号不能为空')); return callback(new Error('手机号不能为空'));
} else { } else {
const reg = /(^1\d{10}$)|(^[0-9]\d{7}$)/ const reg = /(^1\d{10}$)|(^[0-9]\d{7}$)/
......
import axios from 'axios' import axios from 'axios'
import { MessageBox, Message } from 'element-ui' import { MessageBox, Message } from 'element-ui'
import store from '@/store' import store from '@/store'
import router from '@/router'
import { getToken } from '@/utils/auth' import { getToken } from '@/utils/auth'
// create an axios instance // create an axios instance
const service = axios.create({ const service = axios.create({
baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
...@@ -11,6 +15,7 @@ const service = axios.create({ ...@@ -11,6 +15,7 @@ const service = axios.create({
crossDomain: true crossDomain: true
}) })
// request interceptor // request interceptor
service.interceptors.request.use( service.interceptors.request.use(
config => { config => {
...@@ -25,7 +30,6 @@ service.interceptors.request.use( ...@@ -25,7 +30,6 @@ service.interceptors.request.use(
}, },
error => { error => {
// do something with request error // do something with request error
console.log(error) // for debug
return Promise.reject(error) return Promise.reject(error)
} }
) )
...@@ -37,18 +41,24 @@ service.interceptors.response.use( ...@@ -37,18 +41,24 @@ service.interceptors.response.use(
const res = response.data const res = response.data
// if the custom code is not 20000, it is judged as an error. // if the custom code is not 20000, it is judged as an error.
if (res.code !== 20000) { if (res.code !== 20000) {
// Message({ if(res.code == 4){
// message: res.data || 'Error', store.dispatch("user/logout");
// type: 'error', window.location.href = "/";
// duration: 5 * 1000 Message({
// }) message: "登录失效,请重新登录",
type: 'error',
})
}
return res return res
} else { } else {
return res return res
} }
}, },
error => { error => {
console.log('err' + error) // for debug
Message({ Message({
message: error.message, message: error.message,
type: 'error', type: 'error',
......
...@@ -270,106 +270,108 @@ ...@@ -270,106 +270,108 @@
title="查看详情" title="查看详情"
:visible.sync="drawer" :visible.sync="drawer"
:direction="direction" :direction="direction"
size="40%" size="45%"
> >
<el-form label-width="180px"> <el-form>
<el-row> <el-descriptions
<el-col :span="12"> :column="6"
<div class="grid-content bg-purple"> border
<el-form-item label="审批状态"> title="基本信息"
<el-tag style="padding: 20px"
:type=" label-class-name="my-label"
paramlist.tripStatus == 0 >
? 'info' <el-descriptions-item label="出差理由" :span="6">
: paramlist.tripStatus == 1 || paramlist.tripStatus == 3 <span>{{ paramlist.tripReason }}</span>
? 'success' </el-descriptions-item>
: 'danger' <el-descriptions-item label="附件数量" :span="3">
" <span>{{ paramlist.enclosureNumber }}</span>
> </el-descriptions-item>
{{ <el-descriptions-item label="出发地点" :span="3">
paramlist.tripStatus == 0 <span>{{ paramlist.fromPlace }}</span>
? "待审批" </el-descriptions-item>
: paramlist.tripStatus == 1 <el-descriptions-item label="目的地点" :span="3">
? "小组长通过" <span>{{ paramlist.purposePlace }}</span>
: paramlist.tripStatus == 2 </el-descriptions-item>
? "小组长驳回" <el-descriptions-item label="天数" :span="3">
: paramlist.tripStatus == 3 <span>{{ paramlist.days }}</span>
? "财务通过" </el-descriptions-item>
: paramlist.tripStatus == 4 <el-descriptions-item label="交通工具" :span="3">
? "财务驳回" <span>{{ paramlist.vehicle }}</span>
: "不存在" </el-descriptions-item>
}} </el-descriptions>
</el-tag>
</el-form-item>
<el-form-item label="附件数量">
<span>{{ paramlist.enclosureNumber }}</span>
</el-form-item>
<el-form-item label="出差理由">
<span>{{ paramlist.tripReason }}</span>
</el-form-item>
<el-form-item label="出发地点">
<span>{{ paramlist.fromPlace }}</span>
</el-form-item>
<el-form-item label="目的地点">
<span>{{ paramlist.purposePlace }}</span>
</el-form-item>
<el-form-item label="经过地点">
<span>{{ paramlist.transitPlace }}</span>
</el-form-item>
<el-form-item label="交通工具">
<span>{{ paramlist.vehicle }}</span>
</el-form-item>
<el-form-item label="伙食补贴(元)"> <el-descriptions
<span>{{ paramlist.foodAllowance }}</span> :column="6"
</el-form-item> border
<el-form-item label="公杂补贴(元)"> title="费用详情"
<span>{{ paramlist.publicMiscellaneousSubsidy }}</span> style="padding: 20px"
</el-form-item> label-class-name="my-label"
<el-form-item label="随从人员"> >
<el-tag <el-descriptions-item label="伙食补贴" :span="3">
type="warning" <span>{{ paramlist.foodAllowance }}</span>
size="medium" </el-descriptions-item>
v-for="item in paramlist.entouragelist" <el-descriptions-item label="公杂补贴" :span="3">
:key="item.id" <span>{{ paramlist.publicMiscellaneousSubsidy }}</span>
style="margin: 0px 5px" </el-descriptions-item>
>{{ item.personnelName }}</el-tag <el-descriptions-item label="火车/汽车/轮船费(元)" :span="3">
> <span>{{ paramlist.tripCost }}</span>
</el-form-item> </el-descriptions-item>
</div> <el-descriptions-item label="机票费" :span="3">
</el-col> <span>{{ paramlist.planeTicket }}</span>
<el-col :span="12"> </el-descriptions-item>
<div class="grid-content bg-purple-light"> <el-descriptions-item label="汽油费" :span="3">
<el-form-item label="火车/汽车/轮船费(元)"> <span>{{ paramlist.trafficCost }}</span>
<span>{{ paramlist.tripCost }}</span> </el-descriptions-item>
</el-form-item> <el-descriptions-item label="住宿费" :span="3">
<el-form-item label="机票费(元)"> <span>{{ paramlist.lodgingCost }}</span>
<span>{{ paramlist.planeTicket }}</span> </el-descriptions-item>
</el-form-item> <el-descriptions-item label="其他费用" :span="3">
<el-form-item label="汽油费(元)"> <span>{{ paramlist.otherCost }}</span>
<span>{{ paramlist.trafficCost }}</span> </el-descriptions-item>
</el-form-item> <el-descriptions-item label="审批状态" :span="3">
<el-form-item label="住宿费(元)"> <el-tag
<span>{{ paramlist.lodgingCost }}</span> size="mini"
</el-form-item> :type="
<el-form-item label="其他费用(元)"> paramlist.tripStatus == 0
<span>{{ paramlist.otherCost }}</span> ? 'info'
</el-form-item> : paramlist.tripStatus == 1 || paramlist.tripStatus == 3
<el-form-item label="备注"> ? 'success'
<span>{{ paramlist.remarks }}</span> : 'danger'
</el-form-item> "
<el-form-item label="无票据说明"> >
<span>{{ paramlist.nobillExplain }}</span> {{
</el-form-item> paramlist.tripStatus == 0
<el-form-item label="是否领取补贴"> ? "待审批"
<span>{{ paramlist.receiveSubsidy == 0 ? "否" : "是" }}</span> : paramlist.tripStatus == 1
</el-form-item> ? "小组长通过"
<el-form-item label="天数"> : paramlist.tripStatus == 2
<span>{{ paramlist.days }}</span> ? "小组长驳回"
</el-form-item> : paramlist.tripStatus == 3
</div> ? "财务通过"
</el-col> : paramlist.tripStatus == 4
</el-row> ? "财务驳回"
: "不存在"
}}
</el-tag>
</el-descriptions-item>
<el-descriptions-item label="备注" :span="6">
<span>{{ paramlist.remarks }}</span>
</el-descriptions-item>
<el-descriptions-item label="无票据说明" :span="6">
<span>{{ paramlist.nobillExplain }}</span>
</el-descriptions-item>
<el-descriptions-item label="随行人员" :span="6">
<el-tag
type="warning"
size="mini"
v-for="item in paramlist.entouragelist"
:key="item.id"
style="margin: 0px 5px"
>{{ item.personnelName }}</el-tag
>
</el-descriptions-item>
</el-descriptions>
</el-form> </el-form>
</el-drawer> </el-drawer>
</div> </div>
...@@ -694,7 +696,7 @@ export default { ...@@ -694,7 +696,7 @@ export default {
// 展示数据的方法 // 展示数据的方法
getpagelist(pager = 1) { getpagelist(pager = 1) {
this.queryitem.pageNum = pager; this.queryitem.pageNum = pager;
queryBypagefinance(this.queryitem).then(async (res) => { queryBypagefinance(this.queryitem).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;
...@@ -714,11 +716,6 @@ export default { ...@@ -714,11 +716,6 @@ 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}`);
}
} }
}); });
}, },
...@@ -763,7 +760,7 @@ export default { ...@@ -763,7 +760,7 @@ export default {
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).then(async (res) => { finApproval(this.agreeOrapproval).then((res) => {
if (res.success) { if (res.success) {
this.$message({ this.$message({
type: "success", type: "success",
...@@ -772,11 +769,6 @@ export default { ...@@ -772,11 +769,6 @@ 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}`);
}
} }
}); });
this.dialogVisible = false; this.dialogVisible = false;
...@@ -806,17 +798,12 @@ export default { ...@@ -806,17 +798,12 @@ export default {
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).then(async (res) => { finApproval(this.agreeOrapproval).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}`);
}
} }
}); });
this.dialogVisible = false; this.dialogVisible = false;
...@@ -856,7 +843,7 @@ export default { ...@@ -856,7 +843,7 @@ 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) => {
...@@ -876,12 +863,6 @@ export default { ...@@ -876,12 +863,6 @@ 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) => { .catch((error) => {
...@@ -996,7 +977,7 @@ export default { ...@@ -996,7 +977,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).then(async (res) => { selectByIdF(this.queryDTO).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) {
...@@ -1010,12 +991,6 @@ export default { ...@@ -1010,12 +991,6 @@ 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}`);
}
} }
}); });
}, },
...@@ -1033,18 +1008,13 @@ export default { ...@@ -1033,18 +1008,13 @@ export default {
//刷新附件 //刷新附件
Refresh() { Refresh() {
this.queryDTO.tripId = this.proutlist1.Id; this.queryDTO.tripId = this.proutlist1.Id;
selectByIdF(this.queryDTO).then(async (res) => { selectByIdF(this.queryDTO).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}`);
}
} }
}); });
}, },
...@@ -1072,7 +1042,10 @@ export default { ...@@ -1072,7 +1042,10 @@ export default {
}; };
</script> </script>
<style scoped> <style>
.my-label{
width: 100px;
}
.container_top { .container_top {
padding: 15px; padding: 15px;
} }
......
...@@ -232,106 +232,108 @@ ...@@ -232,106 +232,108 @@
title="查看详情" title="查看详情"
:visible.sync="drawer" :visible.sync="drawer"
:direction="direction" :direction="direction"
size="40%" size="45%"
> >
<el-form label-width="180px"> <el-form>
<el-row> <el-descriptions
<el-col :span="12"> :column="6"
<div class="grid-content bg-purple"> border
<el-form-item label="审批状态"> title="基本信息"
<el-tag style="padding: 20px"
:type=" label-class-name="my-label"
paramlist.tripStatus == 0 >
? 'info' <el-descriptions-item label="出差理由" :span="6">
: paramlist.tripStatus == 1 || paramlist.tripStatus == 3 <span>{{ paramlist.tripReason }}</span>
? 'success' </el-descriptions-item>
: 'danger' <el-descriptions-item label="附件数量" :span="3">
" <span>{{ paramlist.enclosureNumber }}</span>
> </el-descriptions-item>
{{ <el-descriptions-item label="出发地点" :span="3">
paramlist.tripStatus == 0 <span>{{ paramlist.fromPlace }}</span>
? "待审批" </el-descriptions-item>
: paramlist.tripStatus == 1 <el-descriptions-item label="目的地点" :span="3">
? "小组长通过" <span>{{ paramlist.purposePlace }}</span>
: paramlist.tripStatus == 2 </el-descriptions-item>
? "小组长驳回" <el-descriptions-item label="天数" :span="3">
: paramlist.tripStatus == 3 <span>{{ paramlist.days }}</span>
? "财务通过" </el-descriptions-item>
: paramlist.tripStatus == 4 <el-descriptions-item label="交通工具" :span="3">
? "财务驳回" <span>{{ paramlist.vehicle }}</span>
: "不存在" </el-descriptions-item>
}} </el-descriptions>
</el-tag>
</el-form-item>
<el-form-item label="附件数量">
<span>{{ paramlist.enclosureNumber }}</span>
</el-form-item>
<el-form-item label="出差理由">
<span>{{ paramlist.tripReason }}</span>
</el-form-item>
<el-form-item label="出发地点">
<span>{{ paramlist.fromPlace }}</span>
</el-form-item>
<el-form-item label="目的地点">
<span>{{ paramlist.purposePlace }}</span>
</el-form-item>
<el-form-item label="经过地点">
<span>{{ paramlist.transitPlace }}</span>
</el-form-item>
<el-form-item label="交通工具">
<span>{{ paramlist.vehicle }}</span>
</el-form-item>
<el-form-item label="伙食补贴(元)"> <el-descriptions
<span>{{ paramlist.foodAllowance }}</span> :column="6"
</el-form-item> border
<el-form-item label="公杂补贴(元)"> title="费用详情"
<span>{{ paramlist.publicMiscellaneousSubsidy }}</span> style="padding: 20px"
</el-form-item> label-class-name="my-label"
<el-form-item label="随从人员"> >
<el-tag <el-descriptions-item label="伙食补贴" :span="3">
type="warning" <span>{{ paramlist.foodAllowance }}</span>
size="medium" </el-descriptions-item>
v-for="item in paramlist.entouragelist" <el-descriptions-item label="公杂补贴" :span="3">
:key="item.id" <span>{{ paramlist.publicMiscellaneousSubsidy }}</span>
style="margin: 0px 5px" </el-descriptions-item>
>{{ item.personnelName }}</el-tag <el-descriptions-item label="火车/汽车/轮船费(元)" :span="3">
> <span>{{ paramlist.tripCost }}</span>
</el-form-item> </el-descriptions-item>
</div> <el-descriptions-item label="机票费" :span="3">
</el-col> <span>{{ paramlist.planeTicket }}</span>
<el-col :span="12"> </el-descriptions-item>
<div class="grid-content bg-purple-light"> <el-descriptions-item label="汽油费" :span="3">
<el-form-item label="火车/汽车/轮船费(元)"> <span>{{ paramlist.trafficCost }}</span>
<span>{{ paramlist.tripCost }}</span> </el-descriptions-item>
</el-form-item> <el-descriptions-item label="住宿费" :span="3">
<el-form-item label="机票费(元)"> <span>{{ paramlist.lodgingCost }}</span>
<span>{{ paramlist.planeTicket }}</span> </el-descriptions-item>
</el-form-item> <el-descriptions-item label="其他费用" :span="3">
<el-form-item label="汽油费(元)"> <span>{{ paramlist.otherCost }}</span>
<span>{{ paramlist.trafficCost }}</span> </el-descriptions-item>
</el-form-item> <el-descriptions-item label="审批状态" :span="3">
<el-form-item label="住宿费(元)"> <el-tag
<span>{{ paramlist.lodgingCost }}</span> size="mini"
</el-form-item> :type="
<el-form-item label="其他费用(元)"> paramlist.tripStatus == 0
<span>{{ paramlist.otherCost }}</span> ? 'info'
</el-form-item> : paramlist.tripStatus == 1 || paramlist.tripStatus == 3
<el-form-item label="备注"> ? 'success'
<span>{{ paramlist.remarks }}</span> : 'danger'
</el-form-item> "
<el-form-item label="无票据说明"> >
<span>{{ paramlist.nobillExplain }}</span> {{
</el-form-item> paramlist.tripStatus == 0
<el-form-item label="是否领取补贴"> ? "待审批"
<span>{{ paramlist.receiveSubsidy == 0 ? "否" : "是" }}</span> : paramlist.tripStatus == 1
</el-form-item> ? "小组长通过"
<el-form-item label="天数"> : paramlist.tripStatus == 2
<span>{{ paramlist.days }}</span> ? "小组长驳回"
</el-form-item> : paramlist.tripStatus == 3
</div> ? "财务通过"
</el-col> : paramlist.tripStatus == 4
</el-row> ? "财务驳回"
: "不存在"
}}
</el-tag>
</el-descriptions-item>
<el-descriptions-item label="备注" :span="6">
<span>{{ paramlist.remarks }}</span>
</el-descriptions-item>
<el-descriptions-item label="无票据说明" :span="6">
<span>{{ paramlist.nobillExplain }}</span>
</el-descriptions-item>
<el-descriptions-item label="随行人员" :span="6">
<el-tag
type="warning"
size="mini"
v-for="item in paramlist.entouragelist"
:key="item.id"
style="margin: 0px 5px"
>{{ item.personnelName }}</el-tag
>
</el-descriptions-item>
</el-descriptions>
</el-form> </el-form>
</el-drawer> </el-drawer>
</div> </div>
...@@ -413,55 +415,6 @@ ...@@ -413,55 +415,6 @@
</div> </div>
</el-row> </el-row>
</el-card> </el-card>
<!-- 附件上传 -->
<!-- <el-card
class="box-card"
style="width: 90%; margin-left: 5%; margin-top: 20px"
v-show="getshow == 0"
>
<div style="width: 60%; margin-left: 30px">
<el-input
type="textarea"
:rows="2"
placeholder="请输入附件详情"
v-model="proutlist1.enclosureDescribe"
style="margin: 20px 0px"
></el-input>
<el-upload
class="upload-demo"
ref="upload1"
drag
:action="action1"
:file-list="fileList1"
:on-remove="delfile1"
:auto-upload="false"
:on-change="onChangepdf"
:on-success="Refresh"
:data="proutlist1"
multiple
style="margin: 20px 0px"
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">
将文件拖到此处,或
<em>点击上传附件</em>
</div>
<div class="el-upload__tip" slot="tip">
只能上传文件,且不超过500kb
</div>
</el-upload>
</div>
<div style="margin-left: 75%">
<el-button @click="remove()">取 消</el-button>
<el-button
type="primary"
@click="determine()"
style="margin-top: 20px"
>确 定</el-button
>
</div>
</el-card> -->
<div class="box-card" v-show="getshow == 3"></div> <div class="box-card" v-show="getshow == 3"></div>
</el-drawer> </el-drawer>
</div> </div>
...@@ -562,20 +515,16 @@ export default { ...@@ -562,20 +515,16 @@ export default {
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 }).then(async (resu) => { selectAll({ tripId: item.tripId }).then( (resu) => {
if (resu.success) { if (resu.success) {
item.entouragelist = resu.data; item.entouragelist = resu.data;
} else { } else {
this.$message.error(res.msg); this.$message.error(resu.msg);
//业务逻辑
if (res.code == 4) {
//执行退出功能
await this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
} }
}); });
}); });
}else{
this.$message.error(res.msg);
} }
}); });
}, },
...@@ -609,7 +558,7 @@ export default { ...@@ -609,7 +558,7 @@ export default {
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).then(async (res) => { Approval(this.agreeOrapproval).then( (res) => {
if (res.success) { if (res.success) {
this.$message({ this.$message({
type: "success", type: "success",
...@@ -618,12 +567,6 @@ export default { ...@@ -618,12 +567,6 @@ 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}`);
}
} }
}); });
}); });
...@@ -648,17 +591,12 @@ export default { ...@@ -648,17 +591,12 @@ export default {
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).then(async (res) => { Approval(this.agreeOrapproval).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}`);
}
} }
}); });
}); });
...@@ -676,7 +614,7 @@ export default { ...@@ -676,7 +614,7 @@ export default {
}, },
//查询发票图片 //查询发票图片
Selectinsertlsit() { Selectinsertlsit() {
selectAllById(this.getinvoiveId).then(async (res) => { selectAllById(this.getinvoiveId).then( (res) => {
if (res.success) { if (res.success) {
this.getinvoivelist = res.data; this.getinvoivelist = res.data;
this.getinvoivelist.forEach((e) => { this.getinvoivelist.forEach((e) => {
...@@ -694,12 +632,6 @@ export default { ...@@ -694,12 +632,6 @@ 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}`);
}
} }
}); });
}, },
...@@ -733,7 +665,7 @@ export default { ...@@ -733,7 +665,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).then(async (res) => { selectByIdF(this.queryDTO).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) {
...@@ -748,11 +680,6 @@ export default { ...@@ -748,11 +680,6 @@ 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}`);
}
} }
}); });
}, },
...@@ -770,18 +697,12 @@ export default { ...@@ -770,18 +697,12 @@ export default {
//刷新附件 //刷新附件
Refresh() { Refresh() {
this.queryDTO.tripId = this.proutlist1.Id; this.queryDTO.tripId = this.proutlist1.Id;
selectByIdF(this.queryDTO).then(async (res) => { selectByIdF(this.queryDTO).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}`);
}
} }
}); });
}, },
...@@ -808,7 +729,10 @@ export default { ...@@ -808,7 +729,10 @@ export default {
}; };
</script> </script>
<style scoped> <style>
.my-label{
width: 100px;
}
.container_top { .container_top {
padding: 15px; padding: 15px;
} }
......
...@@ -13,7 +13,12 @@ ...@@ -13,7 +13,12 @@
:column="3" :column="3"
border border
> >
<el-descriptions-item labelClassName="required" label="报销项目"> <el-descriptions-item
labelClassName="required"
label="报销项目"
:labelStyle="{ width: '110px', height: '60px' }"
:contentStyle="rowCenter"
>
<!-- projectId --> <!-- projectId -->
<el-form-item prop="projectId"> <el-form-item prop="projectId">
<el-select <el-select
...@@ -80,9 +85,7 @@ ...@@ -80,9 +85,7 @@
<el-descriptions-item labelClassName="required" label="交通工具"> <el-descriptions-item labelClassName="required" label="交通工具">
<!-- vehicle --> <!-- vehicle -->
<el-form-item prop="vehicle"> <el-form-item prop="vehicle">
<el-input <el-input v-model.trim="spendreimbursementform.vehicle"></el-input>
v-model.trim="spendreimbursementform.vehicle"
></el-input>
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item labelClassName="required" label="申请时间"> <el-descriptions-item labelClassName="required" label="申请时间">
...@@ -118,7 +121,6 @@ ...@@ -118,7 +121,6 @@
:disabled=" :disabled="
spendreimbursementform.receiveSubsidy == 1 ? false : true spendreimbursementform.receiveSubsidy == 1 ? false : true
" "
@change="addnum(spendreimbursementform)"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>
...@@ -130,7 +132,6 @@ ...@@ -130,7 +132,6 @@
:disabled=" :disabled="
spendreimbursementform.receiveSubsidy == 1 ? false : true spendreimbursementform.receiveSubsidy == 1 ? false : true
" "
@change="addnum(spendreimbursementform)"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>
...@@ -143,7 +144,6 @@ ...@@ -143,7 +144,6 @@
<el-form-item prop="tripCost"> <el-form-item prop="tripCost">
<el-input <el-input
v-model.trim="spendreimbursementform.tripCost" v-model.trim="spendreimbursementform.tripCost"
@change="addnum(spendreimbursementform)"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>
...@@ -152,7 +152,6 @@ ...@@ -152,7 +152,6 @@
<el-form-item prop="planeTicket"> <el-form-item prop="planeTicket">
<el-input <el-input
v-model.trim="spendreimbursementform.planeTicket" v-model.trim="spendreimbursementform.planeTicket"
@change="addnum(spendreimbursementform)"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>
...@@ -164,7 +163,6 @@ ...@@ -164,7 +163,6 @@
<el-form-item prop="trafficCost"> <el-form-item prop="trafficCost">
<el-input <el-input
v-model.trim="spendreimbursementform.trafficCost" v-model.trim="spendreimbursementform.trafficCost"
@change="addnum(spendreimbursementform)"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>
...@@ -173,7 +171,6 @@ ...@@ -173,7 +171,6 @@
<el-form-item prop="lodgingCost"> <el-form-item prop="lodgingCost">
<el-input <el-input
v-model.trim="spendreimbursementform.lodgingCost" v-model.trim="spendreimbursementform.lodgingCost"
@change="addnum(spendreimbursementform)"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>
...@@ -182,7 +179,6 @@ ...@@ -182,7 +179,6 @@
<el-form-item prop="insuranceCost"> <el-form-item prop="insuranceCost">
<el-input <el-input
v-model.trim="spendreimbursementform.insuranceCost" v-model.trim="spendreimbursementform.insuranceCost"
@change="addnum(spendreimbursementform)"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>
...@@ -191,7 +187,6 @@ ...@@ -191,7 +187,6 @@
<el-form-item prop="otherCost"> <el-form-item prop="otherCost">
<el-input <el-input
v-model.trim="spendreimbursementform.otherCost" v-model.trim="spendreimbursementform.otherCost"
@change="addnum(spendreimbursementform)"
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>
...@@ -217,7 +212,7 @@ ...@@ -217,7 +212,7 @@
label="申报总金额(大写)" label="申报总金额(大写)"
> >
<!-- applyTotalAmountLarge --> <!-- applyTotalAmountLarge -->
<el-form-item prop="applyTotalAmountLarge"> <el-form-item>
<el-input <el-input
disabled disabled
v-model.trim="spendreimbursementform.applyTotalAmountLarge" v-model.trim="spendreimbursementform.applyTotalAmountLarge"
...@@ -305,6 +300,8 @@ ...@@ -305,6 +300,8 @@
:headers="fileUploadHeader" :headers="fileUploadHeader"
:auto-upload="false" :auto-upload="false"
multiple multiple
:on-remove="fileError"
:on-success="fileSuccess"
> >
<i class="el-icon-upload"></i> <i class="el-icon-upload"></i>
<div class="el-upload__text"> <div class="el-upload__text">
...@@ -315,7 +312,7 @@ ...@@ -315,7 +312,7 @@
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-main> </el-main>
<el-footer> <el-footer style="margin: 5 px 2%">
<el-button type="primary" @click="submitForm()">提交</el-button> <el-button type="primary" @click="submitForm()">提交</el-button>
<el-button @click="resetForm()">重置</el-button> <el-button @click="resetForm()">重置</el-button>
<el-button @click="back()">返回</el-button> <el-button @click="back()">返回</el-button>
...@@ -327,9 +324,9 @@ ...@@ -327,9 +324,9 @@
import { import {
insert, insert,
selectTypeitem, selectTypeitem,
selectProjectitem,
selectProjectpeople, selectProjectpeople,
} from "@/api/spendreimbursement.js"; } from "@/api/spendreimbursement.js";
import { selectAll as projectSelectAll } from "@/api/project";
import { selectAllBystatus } from "@/api/project"; import { selectAllBystatus } from "@/api/project";
import { money } from "@/utils/myValidate"; import { money } from "@/utils/myValidate";
export default { export default {
...@@ -464,6 +461,9 @@ export default { ...@@ -464,6 +461,9 @@ export default {
startTime: [{ required: true, message: "此项不能为空!" }], startTime: [{ required: true, message: "此项不能为空!" }],
endTime: [{ required: true, message: "此项不能为空!" }], endTime: [{ required: true, message: "此项不能为空!" }],
}, },
rowCenter: {
"text-align": "center",
},
}; };
}, },
methods: { methods: {
...@@ -481,10 +481,29 @@ export default { ...@@ -481,10 +481,29 @@ export default {
list.forEach((val) => { list.forEach((val) => {
sum += val.money; sum += val.money;
}); });
this.spendreimbursementform.applyTotalAmountSmall = sum; if (this.spendreimbursementform.invoiceIdList.length < 1) {
this.spendreimbursementform.applyTotalAmountLarge = null;
this.spendreimbursementform.applyTotalAmountSmall = 0;
} else {
this.spendreimbursementform.applyTotalAmountSmall = sum;
}
this.convertCurrency(sum); this.convertCurrency(sum);
return sum; return sum;
}, },
//上传失败的回调
//上传失败的回调
fileError(){
this.$message.error("附件上传失败");
},
//上传成功
fileSuccess(res){
if(res.success){
this.$message.success(res.msg)
}else{
this.$message.error(res.msg);
}
},
//查询发票编号 //查询发票编号
Selectinsertlsit() { Selectinsertlsit() {
let param = { let param = {
...@@ -494,16 +513,12 @@ export default { ...@@ -494,16 +513,12 @@ export default {
userId: this.$store.getters.info.userId, userId: this.$store.getters.info.userId,
}; };
selectAllBystatus(param) selectAllBystatus(param)
.then(async (res) => { .then((res) => {
if (res.success) { if (res.success) {
this.getinvoivelist = res.data; this.getinvoivelist = res.data;
} else { } else {
this.$message.error(res.msg); this.$message.error(res.msg);
if (res.code == 4) { this.back();
//执行退出功能
await this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
} }
}) })
.catch((error) => { .catch((error) => {
...@@ -516,10 +531,12 @@ export default { ...@@ -516,10 +531,12 @@ export default {
this.$refs.ruleform.validate((valid) => { this.$refs.ruleform.validate((valid) => {
if (valid) { if (valid) {
// 除发票以外所有的金额 // 除发票以外所有的金额
let sum1 = this.addnum(this.spendreimbursementform); let sum1 = parseFloat(this.addnum(this.spendreimbursementform));
// console.log(sum1); console.log(sum1);
// 申报总金额 // 申报总金额
let sum2 = this.spendreimbursementform.applyTotalAmountSmall; let sum2 = parseFloat(
this.spendreimbursementform.applyTotalAmountSmall
);
if (sum1 == sum2) { if (sum1 == sum2) {
// 判断随行人员 是否为空 // 判断随行人员 是否为空
if (this.peopleListName == "") { if (this.peopleListName == "") {
...@@ -548,15 +565,10 @@ export default { ...@@ -548,15 +565,10 @@ export default {
this.back(); this.back();
} 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}`);
}
} }
}); });
} else { } else {
this.$message.warning("发票金额不同,无法提交"); this.$message.warning("申报总金额有误,无法提交");
} }
} }
}); });
...@@ -571,30 +583,19 @@ export default { ...@@ -571,30 +583,19 @@ export default {
this.collectType = res.data; this.collectType = 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}`);
}
} }
}); });
}, },
// 项目类型 // 项目类型
reimebursementprojectItem() { reimebursementprojectItem() {
const params = { const params = {
companyId: this.$store.getters.companyId, userId: this.$store.getters.info.userId
}; };
selectProjectitem(params).then((res) => { projectSelectAll(params).then((res) => {
if (res.success) { if (res.success) {
this.collectProject = res.data; this.collectProject = 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}`);
}
} }
}); });
}, },
...@@ -603,17 +604,11 @@ export default { ...@@ -603,17 +604,11 @@ export default {
const params = { const params = {
companyId: this.$store.getters.companyId, companyId: this.$store.getters.companyId,
}; };
selectProjectpeople(params).then(async (res) => { selectProjectpeople(params).then((res) => {
if (res.success) { if (res.success) {
this.collectProjectpeople = res.data; this.collectProjectpeople = res.data;
} 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}`);
}
} }
}); });
}, },
...@@ -690,6 +685,7 @@ export default { ...@@ -690,6 +685,7 @@ export default {
}, },
//重置 //重置
resetForm() { resetForm() {
this.timeSlot = "";
this.$refs.ruleform.resetFields(); this.$refs.ruleform.resetFields();
}, },
// 删除附件 // 删除附件
...@@ -821,10 +817,7 @@ export default { ...@@ -821,10 +817,7 @@ export default {
let a7 = parseFloat(obj.insuranceCost); let a7 = parseFloat(obj.insuranceCost);
let a8 = parseFloat(obj.otherCost); let a8 = parseFloat(obj.otherCost);
let sum = parseFloat(a1 + a2 + a3 + a4 + a5 + a6 + a7 + a8).toFixed(2); let sum = parseFloat(a1 + a2 + a3 + a4 + a5 + a6 + a7 + a8).toFixed(2);
// console.log(sum); return sum;
// 转换大小写
this.convertCurrency(sum);
return a1 + a2 + a3 + a4 + a5 + a6 + a7 + a8;
}, },
}, },
}; };
...@@ -861,4 +854,8 @@ export default { ...@@ -861,4 +854,8 @@ export default {
cursor: pointer; cursor: pointer;
} }
} }
.contract-description-form {
width: 95%;
margin: 20px 2%;
}
</style> </style>
\ No newline at end of file
...@@ -291,106 +291,108 @@ ...@@ -291,106 +291,108 @@
title="查看详情" title="查看详情"
:visible.sync="drawer" :visible.sync="drawer"
:direction="direction" :direction="direction"
size="40%" size="45%"
> >
<el-form label-width="180px"> <el-form>
<el-row> <el-descriptions
<el-col :span="12"> :column="6"
<div class="grid-content bg-purple"> border
<el-form-item label="审批状态"> title="基本信息"
<el-tag style="padding: 20px"
:type=" label-class-name="my-label"
paramlist.tripStatus == 0 >
? 'info' <el-descriptions-item label="出差理由" :span="6">
: paramlist.tripStatus == 1 || paramlist.tripStatus == 3 <span>{{ paramlist.tripReason }}</span>
? 'success' </el-descriptions-item>
: 'danger' <el-descriptions-item label="附件数量" :span="3">
" <span>{{ paramlist.enclosureNumber }}</span>
> </el-descriptions-item>
{{ <el-descriptions-item label="出发地点" :span="3">
paramlist.tripStatus == 0 <span>{{ paramlist.fromPlace }}</span>
? "待审批" </el-descriptions-item>
: paramlist.tripStatus == 1 <el-descriptions-item label="目的地点" :span="3">
? "小组长通过" <span>{{ paramlist.purposePlace }}</span>
: paramlist.tripStatus == 2 </el-descriptions-item>
? "小组长驳回" <el-descriptions-item label="天数" :span="3">
: paramlist.tripStatus == 3 <span>{{ paramlist.days }}</span>
? "财务通过" </el-descriptions-item>
: paramlist.tripStatus == 4 <el-descriptions-item label="交通工具" :span="3">
? "财务驳回" <span>{{ paramlist.vehicle }}</span>
: "不存在" </el-descriptions-item>
}} </el-descriptions>
</el-tag>
</el-form-item>
<el-form-item label="附件数量">
<span>{{ paramlist.enclosureNumber }}</span>
</el-form-item>
<el-form-item label="出差理由">
<span>{{ paramlist.tripReason }}</span>
</el-form-item>
<el-form-item label="出发地点">
<span>{{ paramlist.fromPlace }}</span>
</el-form-item>
<el-form-item label="目的地点">
<span>{{ paramlist.purposePlace }}</span>
</el-form-item>
<el-form-item label="经过地点">
<span>{{ paramlist.transitPlace }}</span>
</el-form-item>
<el-form-item label="交通工具">
<span>{{ paramlist.vehicle }}</span>
</el-form-item>
<el-form-item label="伙食补贴(元)"> <el-descriptions
<span>{{ paramlist.foodAllowance }}</span> :column="6"
</el-form-item> border
<el-form-item label="公杂补贴(元)"> title="费用详情"
<span>{{ paramlist.publicMiscellaneousSubsidy }}</span> style="padding: 20px"
</el-form-item> label-class-name="my-label"
<el-form-item label="随从人员"> >
<el-tag <el-descriptions-item label="伙食补贴" :span="3">
type="warning" <span>{{ paramlist.foodAllowance }}</span>
size="medium" </el-descriptions-item>
v-for="item in paramlist.entouragelist" <el-descriptions-item label="公杂补贴" :span="3">
:key="item.id" <span>{{ paramlist.publicMiscellaneousSubsidy }}</span>
style="margin: 0px 5px" </el-descriptions-item>
>{{ item.personnelName }}</el-tag <el-descriptions-item label="火车/汽车/轮船费(元)" :span="3">
> <span>{{ paramlist.tripCost }}</span>
</el-form-item> </el-descriptions-item>
</div> <el-descriptions-item label="机票费" :span="3">
</el-col> <span>{{ paramlist.planeTicket }}</span>
<el-col :span="12"> </el-descriptions-item>
<div class="grid-content bg-purple-light"> <el-descriptions-item label="汽油费" :span="3">
<el-form-item label="火车/汽车/轮船费(元)"> <span>{{ paramlist.trafficCost }}</span>
<span>{{ paramlist.tripCost }}</span> </el-descriptions-item>
</el-form-item> <el-descriptions-item label="住宿费" :span="3">
<el-form-item label="机票费(元)"> <span>{{ paramlist.lodgingCost }}</span>
<span>{{ paramlist.planeTicket }}</span> </el-descriptions-item>
</el-form-item> <el-descriptions-item label="其他费用" :span="3">
<el-form-item label="汽油费(元)"> <span>{{ paramlist.otherCost }}</span>
<span>{{ paramlist.trafficCost }}</span> </el-descriptions-item>
</el-form-item> <el-descriptions-item label="审批状态" :span="3">
<el-form-item label="住宿费(元)"> <el-tag
<span>{{ paramlist.lodgingCost }}</span> size="mini"
</el-form-item> :type="
<el-form-item label="其他费用(元)"> paramlist.tripStatus == 0
<span>{{ paramlist.otherCost }}</span> ? 'info'
</el-form-item> : paramlist.tripStatus == 1 || paramlist.tripStatus == 3
<el-form-item label="备注"> ? 'success'
<span>{{ paramlist.remarks }}</span> : 'danger'
</el-form-item> "
<el-form-item label="无票据说明"> >
<span>{{ paramlist.nobillExplain }}</span> {{
</el-form-item> paramlist.tripStatus == 0
<el-form-item label="是否领取补贴"> ? "待审批"
<span>{{ paramlist.receiveSubsidy == 0 ? "否" : "是" }}</span> : paramlist.tripStatus == 1
</el-form-item> ? "小组长通过"
<el-form-item label="天数"> : paramlist.tripStatus == 2
<span>{{ paramlist.days }}</span> ? "小组长驳回"
</el-form-item> : paramlist.tripStatus == 3
</div> ? "财务通过"
</el-col> : paramlist.tripStatus == 4
</el-row> ? "财务驳回"
: "不存在"
}}
</el-tag>
</el-descriptions-item>
<el-descriptions-item label="备注" :span="6">
<span>{{ paramlist.remarks }}</span>
</el-descriptions-item>
<el-descriptions-item label="无票据说明" :span="6">
<span>{{ paramlist.nobillExplain }}</span>
</el-descriptions-item>
<el-descriptions-item label="随行人员" :span="6">
<el-tag
type="warning"
size="mini"
v-for="item in paramlist.entouragelist"
:key="item.id"
style="margin: 0px 5px"
>{{ item.personnelName }}</el-tag
>
</el-descriptions-item>
</el-descriptions>
</el-form> </el-form>
</el-drawer> </el-drawer>
</div> </div>
...@@ -399,6 +401,7 @@ ...@@ -399,6 +401,7 @@
<el-pagination <el-pagination
layout="->, total, prev, pager, next" layout="->, total, prev, pager, next"
:total="total" :total="total"
:current-page.sync="queryitem.pageNum"
:page-size="queryitem.pageSize" :page-size="queryitem.pageSize"
@current-change="getpagelist" @current-change="getpagelist"
> >
...@@ -557,7 +560,7 @@ export default { ...@@ -557,7 +560,7 @@ export default {
projectName: null, projectName: null,
tripStatus: null, tripStatus: null,
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 5,
}, },
//抽屉 //抽屉
drawer: false, drawer: false,
...@@ -653,11 +656,6 @@ export default { ...@@ -653,11 +656,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}`);
}
} }
}); });
}, },
...@@ -685,12 +683,7 @@ export default { ...@@ -685,12 +683,7 @@ export default {
if (res.success) { if (res.success) {
this.collectProjectpeople = res.data; this.collectProjectpeople = res.data;
} else { } else {
this.$message.error("失败"); this.$message.error(res.msg);
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
} }
}); });
}, },
...@@ -727,21 +720,12 @@ export default { ...@@ -727,21 +720,12 @@ export default {
if (resu.success) { if (resu.success) {
e.entouragelist = resu.data; e.entouragelist = resu.data;
} else { } else {
this.$message.error(res.msg); this.$message.error(resu.msg);
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
} }
}); });
}); });
} else { } else {
if (res.code == 4) { this.$message.error(res.msg);
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
} }
}); });
}, },
...@@ -759,15 +743,11 @@ export default { ...@@ -759,15 +743,11 @@ export default {
this.invoicestatus = true; this.invoicestatus = true;
} else { } else {
this.invoicestatus = false; this.invoicestatus = false;
this.back();
} }
} 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}`);
}
} }
}); });
}, },
...@@ -779,11 +759,6 @@ export default { ...@@ -779,11 +759,6 @@ export default {
this.getpagelist(); this.getpagelist();
} 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}`);
}
} }
}); });
}, },
...@@ -803,11 +778,6 @@ export default { ...@@ -803,11 +778,6 @@ export default {
this.getpagelist(); this.getpagelist();
} 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}`);
}
} }
}); });
}); });
...@@ -841,11 +811,6 @@ export default { ...@@ -841,11 +811,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}`);
}
} }
}); });
}, },
...@@ -881,11 +846,6 @@ export default { ...@@ -881,11 +846,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}`);
}
} }
}); });
}, },
...@@ -904,7 +864,7 @@ export default { ...@@ -904,7 +864,7 @@ export default {
updatecard() { updatecard() {
this.getshow = 0; this.getshow = 0;
this.disabled = true; this.disabled = true;
this.delfile1(); this.clearFile();
}, },
//删除附件 //删除附件
deleteProject(row) { deleteProject(row) {
...@@ -918,17 +878,16 @@ export default { ...@@ -918,17 +878,16 @@ export default {
this.visible = false; this.visible = false;
} 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}`);
}
} }
}); });
}, },
//清除附件文件 //清除附件文件
delfile1(file) { delfile1(file) {
this.fileList1 = this.fileList1.filter((item) => item.uid !== file.uid); this.$message.error("上传附件失败");
},
//清除附件文件
clearFile(){
this.fileList1 = []
this.fileTypepdf = false; this.fileTypepdf = false;
this.proutlist1.enclosureDescribe = ""; this.proutlist1.enclosureDescribe = "";
}, },
...@@ -939,46 +898,40 @@ export default { ...@@ -939,46 +898,40 @@ export default {
this.$refs.upload1.submit(); this.$refs.upload1.submit();
this.getshow = 1; //隐藏与显示 this.getshow = 1; //隐藏与显示
this.disabled = false; this.disabled = false;
this.$message({
showClose: true,
message: "上传附件成功",
type: "success",
});
this.Refresh();
} else { } else {
this.$message.error("请添加附件,在进行提交"); this.$message.error("请添加附件,在进行提交");
} }
}, },
//刷新附件 //刷新附件
Refresh() { Refresh(res) {
const params = { this.$message.success("上传附件成功");
tripId: this.proutlist1.Id, if (res.success) {
companyId: this.$store.getters.companyId, const params = {
}; tripId: this.proutlist1.Id,
selectByIdF(params).then((res) => { companyId: this.$store.getters.companyId,
if (res.success) { };
this.queryDTOList = res.data; selectByIdF(params).then((res) => {
this.proutlist1.enclosureDescribe = ""; //初始化数据 if (res.success) {
} else { this.queryDTOList = res.data;
this.$message.error(res.msg); this.proutlist1.enclosureDescribe = ""; //初始化数据
if (res.code == 4) { } else {
//执行退出功能 this.$message.error(res.msg);
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
} }
} });
}); }else{
this.$message.error(res.msg);
}
}, },
//附件取消 //附件取消
remove() { remove() {
if (this.queryDTOList.length > 0) { if (this.queryDTOList.length > 0) {
this.getshow = 1; this.getshow = 1;
this.disabled = false; this.disabled = false;
this.delfile1(); this.clearFile();
} else { } else {
this.getshow = 3; this.getshow = 3;
this.disabled = false; this.disabled = false;
this.delfile1(); this.clearFile();
} }
}, },
//附件文件校验 //附件文件校验
...@@ -1011,7 +964,10 @@ export default { ...@@ -1011,7 +964,10 @@ export default {
}; };
</script> </script>
<style scoped> <style>
.my-label {
width: 100px;
}
.total_content { .total_content {
padding: 0px 15px; padding: 0px 15px;
} }
......
...@@ -442,9 +442,6 @@ export default { ...@@ -442,9 +442,6 @@ export default {
tripId: this.$route.query.tripid, tripId: this.$route.query.tripid,
}).then((res) => { }).then((res) => {
if (res.success) { if (res.success) {
// console.log(res.data);
//获取数据(把data里的数据放在数组里面)
//this.spendreimbursementform = res.data;
this.spendreimbursementform = { this.spendreimbursementform = {
...res.data, ...res.data,
invoiceIdList: [], //发票信息 invoiceIdList: [], //发票信息
...@@ -461,12 +458,7 @@ export default { ...@@ -461,12 +458,7 @@ export default {
let d = array.join(""); let d = array.join("");
this.peopleListName = d; this.peopleListName = d;
} else { } else {
this.$message.error(res.msg); this.$message.error(resu.msg);
if (res.code == 4) {
//执行退出功能
this.$store.dispatch("user/logout");
this.$router.push(`/login?redirect=${this.$route.fullPath}`);
}
} }
}); });
if (res.data.receiveSubsidy == 1) { if (res.data.receiveSubsidy == 1) {
...@@ -478,12 +470,6 @@ export default { ...@@ -478,12 +470,6 @@ export default {
this.timeSlot.push(res.data.endTime); this.timeSlot.push(res.data.endTime);
} 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}`);
}
} }
}); });
}, },
...@@ -495,22 +481,13 @@ export default { ...@@ -495,22 +481,13 @@ export default {
}; };
selectAllById(param).then((res) => { selectAllById(param).then((res) => {
if (res.success) { if (res.success) {
//this.spendreimbursementform.invoiceIdList = [];
res.data.forEach((e) => { res.data.forEach((e) => {
this.selectgetinvoivelist.push(e); this.selectgetinvoivelist.push(e);
this.spendreimbursementform.invoiceIdList.push(e.invoiceId); this.spendreimbursementform.invoiceIdList.push(e.invoiceId);
}); });
console.log(this.spendreimbursementform.invoiceIdList);
console.log(this.selectgetinvoivelist);
} 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}`);
}
} }
}); });
}, },
...@@ -528,11 +505,6 @@ export default { ...@@ -528,11 +505,6 @@ export default {
this.Selectlsitinvoice(); this.Selectlsitinvoice();
} 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}`);
}
} }
}); });
}, },
...@@ -541,11 +513,11 @@ export default { ...@@ -541,11 +513,11 @@ export default {
this.$refs.ruleform.validate((valid) => { this.$refs.ruleform.validate((valid) => {
if (valid) { if (valid) {
// 除发票以外所有的金额 // 除发票以外所有的金额
let sum1 = this.addnum(this.spendreimbursementform); let sum1 = parseFloat(this.addnum(this.spendreimbursementform));
// console.log(sum1);
// 申报总金额 // 申报总金额
let sum2 = this.spendreimbursementform.applyTotalAmountSmall; let sum2 = parseFloat(
// console.log(sum2); this.spendreimbursementform.applyTotalAmountSmall
);
// 判断金额是否相等 // 判断金额是否相等
if (sum1 == sum2) { if (sum1 == sum2) {
// 判断随行人员 是否为空 // 判断随行人员 是否为空
...@@ -554,47 +526,22 @@ export default { ...@@ -554,47 +526,22 @@ export default {
this.spendreimbursementform.tripRersonnel[0] = this.spendreimbursementform.tripRersonnel[0] =
this.$store.getters.name; this.$store.getters.name;
} else { } else {
// 如果不为空 就把文本框里面的内容 提交上去
this.spendreimbursementform.tripRersonnel = []; this.spendreimbursementform.tripRersonnel = [];
let k = this.peopleListName.split(""); let k = this.peopleListName.split("");
this.spendreimbursementform.tripRersonnel = k; this.spendreimbursementform.tripRersonnel = k;
// let m = this.$store.getters.name;
// k.forEach((e) => {
// this.spendreimbursementform.tripRersonnel.push(m, e);
// });
} }
// 修改的方法
update(this.spendreimbursementform).then((res) => { update(this.spendreimbursementform).then((res) => {
if (res.success) { if (res.success) {
// let addpeopleList = [];
// let a = this.colleagepeopleList.split(",");
// a.forEach((e) => {
// if (e != null && e != "") {
// addpeopleList.push({
// personnelName: e,
// tripId: res.data,
// });
// }
// });
// // 第二个方法 添加随从人员
// insertId(addpeopleList).then((result) => {
// if (result.success) {
// } else {
// this.$message.error(result.msg);
// }
// });
this.$message.success("修改成功!"); this.$message.success("修改成功!");
this.$router.push("/spendreimbursementList"); this.$router.push("/spendreimbursementList");
} 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}`);
}
} }
}); });
} else { } else {
this.$message.warning("发票金额不同,无法提交"); this.$message.warning("申报总金额有误,无法提交");
} }
} }
}); });
...@@ -609,12 +556,6 @@ export default { ...@@ -609,12 +556,6 @@ export default {
this.collectType = res.data; this.collectType = 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}`);
}
} }
}); });
}, },
...@@ -628,12 +569,6 @@ export default { ...@@ -628,12 +569,6 @@ export default {
this.collectProject = res.data; this.collectProject = 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}`);
}
} }
}); });
}, },
...@@ -724,6 +659,7 @@ export default { ...@@ -724,6 +659,7 @@ export default {
}, },
//重置 //重置
resetForm() { resetForm() {
this.timeSlot = [];
this.$refs.ruleform.resetFields(); this.$refs.ruleform.resetFields();
}, },
// 大小写 // 大小写
...@@ -837,10 +773,9 @@ export default { ...@@ -837,10 +773,9 @@ export default {
let a7 = parseFloat(obj.insuranceCost); let a7 = parseFloat(obj.insuranceCost);
let a8 = parseFloat(obj.otherCost); let a8 = parseFloat(obj.otherCost);
let sum = parseFloat(a1 + a2 + a3 + a4 + a5 + a6 + a7 + a8).toFixed(2); let sum = parseFloat(a1 + a2 + a3 + a4 + a5 + a6 + a7 + a8).toFixed(2);
// console.log(sum);
// 转换大小写 // 转换大小写
this.convertCurrency(sum); this.convertCurrency(sum);
return a1 + a2 + a3 + a4 + a5 + a6 + a7 + a8; return sum;
}, },
}, },
}; };
......
...@@ -210,7 +210,6 @@ export default { ...@@ -210,7 +210,6 @@ export default {
//负责人添加 //负责人添加
grtselect() { grtselect() {
if (this.options.length > 0) { if (this.options.length > 0) {
console.log(this.user.userId);
this.FixedAssetsAddDTO.fixedController = this.user.userId; this.FixedAssetsAddDTO.fixedController = this.user.userId;
} else { } else {
this.$message.error("没有负责人哦亲"); this.$message.error("没有负责人哦亲");
......
...@@ -95,16 +95,6 @@ ...@@ -95,16 +95,6 @@
>{{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">
<template slot-scope="scope">
<el-button
type="primary"
@click="selectFrom(scope.row)"
size="mini"
icon="el-icon-search"
>查询使用</el-button>
</template>
</el-table-column>-->
<el-table-column prop="prop" label="操作" align="center"> <el-table-column prop="prop" label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
...@@ -295,11 +285,11 @@ export default { ...@@ -295,11 +285,11 @@ export default {
message: "丢失备注是成功" message: "丢失备注是成功"
}); });
} else { } else {
this.$message.error("丢失备注失败"); this.$message.error(res.msg);
} }
}) })
.catch(e => { .catch(e => {
this.$message.error(e.msg); this.$message.error("丢失备注失败");
}); });
}) })
.catch(() => { .catch(() => {
......
...@@ -238,7 +238,6 @@ export default { ...@@ -238,7 +238,6 @@ export default {
}, },
//查询资产使用情况 //查询资产使用情况
getList() { getList() {
console.log(this.FixedUseQueryDTO);
queryByPageByFixedId(this.FixedUseQueryDTO) queryByPageByFixedId(this.FixedUseQueryDTO)
.then(res => { .then(res => {
if (res.success) { if (res.success) {
...@@ -247,7 +246,7 @@ export default { ...@@ -247,7 +246,7 @@ export default {
} }
}) })
.catch(e => { .catch(e => {
this.$message.error(e.msg); this.$message.error("查询使用情况失败");
}); });
}, },
//借用 //借用
...@@ -351,7 +350,7 @@ export default { ...@@ -351,7 +350,7 @@ export default {
} }
}) })
.catch(e => { .catch(e => {
this.$message.error(e.msg); this.$message.error("添加借用失败");
}); });
} }
}); });
...@@ -361,7 +360,6 @@ export default { ...@@ -361,7 +360,6 @@ export default {
this.timestampToTime(); this.timestampToTime();
this.addDTOs.fixedId = this.FixedUseQueryDTO.fixedId; this.addDTOs.fixedId = this.FixedUseQueryDTO.fixedId;
this.addDTOs.userId = this.user.userId; this.addDTOs.userId = this.user.userId;
console.log(this.addDTOs);
this.$refs.ruleForm.validate(valid => { this.$refs.ruleForm.validate(valid => {
if (valid) { if (valid) {
returnRegistration(this.addDTOs) returnRegistration(this.addDTOs)
...@@ -380,7 +378,7 @@ export default { ...@@ -380,7 +378,7 @@ export default {
} }
}) })
.catch(e => { .catch(e => {
this.$message.error(e.msg); this.$message.error("归还失败");
}); });
} }
}); });
......
...@@ -169,7 +169,6 @@ export default { ...@@ -169,7 +169,6 @@ export default {
this.FixedAssetsAddDTO.fixedController = this.user.userId; this.FixedAssetsAddDTO.fixedController = this.user.userId;
this.falesId = true; this.falesId = true;
this.name = "修改负责人"; this.name = "修改负责人";
console.log(this.FixedAssetsAddDTO.fixedController);
} else { } else {
this.$message.error("没有负责人哦亲"); this.$message.error("没有负责人哦亲");
} }
...@@ -234,7 +233,6 @@ export default { ...@@ -234,7 +233,6 @@ export default {
//提交 //提交
submitForm() { submitForm() {
this.timestampToTime(); this.timestampToTime();
console.log(this.FixedAssetsAddDTO);
this.$refs.ruleForm.validate(valid => { this.$refs.ruleForm.validate(valid => {
if (valid) { if (valid) {
if (this.FixedAssetsAddDTO.fixedController!=null) { if (this.FixedAssetsAddDTO.fixedController!=null) {
......
...@@ -73,6 +73,7 @@ ...@@ -73,6 +73,7 @@
size="mini" size="mini"
icon="el-icon-edit" icon="el-icon-edit"
@click="goUpdate(scope.row)" @click="goUpdate(scope.row)"
:disabled="scope.row.fixedState=='2'?true:false"
>修改资产信息</el-button> >修改资产信息</el-button>
</template> </template>
</el-table-column> </el-table-column>
...@@ -132,7 +133,7 @@ export default { ...@@ -132,7 +133,7 @@ export default {
methods: { methods: {
//分页 //分页
handleCurrentChange(val) { handleCurrentChange(val) {
console.log(val);
this.queryDTO.pageNum = val; this.queryDTO.pageNum = val;
this.selectAssets(); this.selectAssets();
}, },
......
...@@ -135,7 +135,7 @@ export default { ...@@ -135,7 +135,7 @@ export default {
} }
}) })
.catch(e => { .catch(e => {
this.$$message.error(e.msg); this.$$message.error("查询失败");
}); });
} }
} }
......
...@@ -171,7 +171,7 @@ export default { ...@@ -171,7 +171,7 @@ export default {
this.$store.dispatch('tagsView/delView', this.$route) this.$store.dispatch('tagsView/delView', this.$route)
this.$router.push("/companyList") this.$router.push("/companyList")
}else{ }else{
this.$message.error(res.data) this.$message.error(res.msg)
} }
}).catch((error)=>{ }).catch((error)=>{
this.$message.error("添加失败") this.$message.error("添加失败")
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
</div> </div>
<!-- 管理员抽屉 --> <!-- 管理员抽屉 -->
<div> <div>
<el-drawer title="我是标题" :visible.sync="drawer" :before-close="handleClose" size="40%"> <el-drawer title="修改管理员密码" :visible.sync="drawer" :before-close="handleClose" size="40%">
<div class="container"> <div class="container">
<el-tabs v-model="activeName" @tab-click="handleClick"> <el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="个人信息" name="first"> <el-tab-pane label="个人信息" name="first">
...@@ -154,7 +154,7 @@ export default { ...@@ -154,7 +154,7 @@ export default {
total: 0, total: 0,
companyList: [], companyList: [],
drawer: false, drawer: false,
userlist: [], userlist: {},
passwordData: { passwordData: {
staffPassword: null, staffPassword: null,
...@@ -191,11 +191,11 @@ export default { ...@@ -191,11 +191,11 @@ export default {
this.total = res.data.total; this.total = res.data.total;
this.companyList = res.data.list; this.companyList = res.data.list;
} else { } else {
this.$message.error(res.data); this.$message.error(res.msg);
} }
}) })
.catch(error => { .catch(error => {
console.log(error); this.$message.error("查询公司失败")
}); });
}, },
//换页 //换页
...@@ -227,17 +227,15 @@ export default { ...@@ -227,17 +227,15 @@ export default {
selectByAdminget(row) { selectByAdminget(row) {
this.passReset(); this.passReset();
this.drawer = true; this.drawer = true;
console.log(row);
selectByAdministrators({ companyId: row.companyId }) selectByAdministrators({ companyId: row.companyId })
.then(res => { .then(res => {
if (res.code == 20000) { if (res.success) {
this.userlist = res.data; this.userlist = res.data;
this.passwordData.userId = res.data.userId; this.passwordData.userId = res.data.userId;
console.log(this.passwordData.userId);
} }
}) })
.catch(e => { .catch(e => {
this.$message.error(e.msg); this.$message.error("查询管理员失败");
}); });
}, },
//关闭抽屉 //关闭抽屉
...@@ -247,7 +245,6 @@ export default { ...@@ -247,7 +245,6 @@ export default {
}, },
//切换 //切换
handleClick(tab, event) { handleClick(tab, event) {
console.log(tab, event);
this.userupdata = true; this.userupdata = true;
this.passReset(); this.passReset();
...@@ -275,7 +272,7 @@ export default { ...@@ -275,7 +272,7 @@ export default {
} }
}) })
.catch(e => { .catch(e => {
this.$message.error(e.msg); this.$message.error("修改密码失败");
}); });
} }
}); });
......
...@@ -113,15 +113,25 @@ export default { ...@@ -113,15 +113,25 @@ export default {
}, },
//下载 //下载
async download(row) { async download(row) {
console.log(row); getFileUrl(row.companyFile)
var a = document.createElement("a"); //创建一个<a></a>标 .then((res) => {
a.href = (await getFileUrl(row.companyFile)).data; if (res.success) {
// //a.href = process.env.VUE_APP_BASE_API + row.companyFile; // 给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点. let url = res.data;
a.target = "_blank"; console.log(url);
a.style.display = "none"; // 障眼法藏起来a标签 var a = document.createElement("a"); //创建一个<a></a>标
document.body.appendChild(a); // 将a标签追加到文档对象中 a.href = url; // 给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点.
a.click(); // 模拟点击了a标签,会触发a标签的href的读取,浏览器就会自动下载了 a.target = "_blank";
a.remove(); // 一次性的,用完就删除a标签 a.style.display = "none"; // 障眼法藏起来a标签
document.body.appendChild(a); // 将a标签追加到文档对象中
a.click(); // 模拟点击了a标签,会触发a标签的href的读取,浏览器就会自动下载了
a.remove(); // 一次性的,用完就删除a标签
} else {
this.$message.error("下载失败");
}
})
.catch((e) => {
this.$message.error("下载失败");
});
}, },
//查询 //查询
querycompanyFile() { querycompanyFile() {
...@@ -130,23 +140,11 @@ export default { ...@@ -130,23 +140,11 @@ 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);
} }
......
...@@ -49,11 +49,14 @@ ...@@ -49,11 +49,14 @@
</el-table-column> </el-table-column>
<el-table-column prop="submitTime" label="上传时间" align="center"> <el-table-column prop="submitTime" label="上传时间" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="prop" label="操作" width="130px" align="center"> <el-table-column prop="prop" label="操作" width="170px" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="success" size="mini" @click="download(scope.row)" <el-button type="success" size="mini" @click="download(scope.row)"
>点击下载</el-button >点击下载</el-button
> >
<el-button type="danger" size="mini" @click="del(scope.row)"
>删除</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -74,7 +77,7 @@ ...@@ -74,7 +77,7 @@
</template> </template>
<script> <script>
import { queryBypageByuserId ,getFileUrl } from "@/api/companyFile"; import { queryBypageByuserId ,getFileUrl,delFile } from "@/api/companyFile";
export default { export default {
data() { data() {
return { return {
...@@ -128,8 +131,6 @@ export default { ...@@ -128,8 +131,6 @@ export default {
}, },
//下载 //下载
async download(row) { async download(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属性值加上地址,注意,这里是绝对路径,不用加 点.
...@@ -139,6 +140,22 @@ export default { ...@@ -139,6 +140,22 @@ export default {
a.click(); // 模拟点击了a标签,会触发a标签的href的读取,浏览器就会自动下载了 a.click(); // 模拟点击了a标签,会触发a标签的href的读取,浏览器就会自动下载了
a.remove(); // 一次性的,用完就删除a标签 a.remove(); // 一次性的,用完就删除a标签
}, },
//删除
del(row){
delFile(row).then(res=>{
if(res.success){
this.$message.success("删除成功")
if(this.selFileList.length == 1 && this.selFileQurey.pageNum != 1){
this.selFileQurey.pageNum--
}
this.getselFileList()
}else{
this.$message.error(res.msg)
}
}).catch(error=>{
this.$message.error("删除失败")
})
},
//换页 //换页
handleCurrentChange(val) { handleCurrentChange(val) {
this.selFileQurey.pageNum = val; this.selFileQurey.pageNum = val;
......
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