|
@@ -222,26 +222,31 @@
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<!-- 填报日期 -->
|
|
<!-- 填报日期 -->
|
|
- <el-form-item :label="$t('fillinthedate')" >
|
|
|
|
- <el-date-picker
|
|
|
|
- v-model="date"
|
|
|
|
- type="daterange"
|
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
|
- size="small"
|
|
|
|
- :range-separator="$t('other.to')"
|
|
|
|
- :start-placeholder="$t('time.startDate')"
|
|
|
|
- :end-placeholder="$t('time.endDate')"
|
|
|
|
- style="width: 280px">
|
|
|
|
- </el-date-picker>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item>
|
|
|
|
- <el-button @click="getList" size="small">{{ $t('find') }}</el-button>
|
|
|
|
- </el-form-item>
|
|
|
|
|
|
+ <div style="display: inline-block;padding-left: 15px">
|
|
|
|
+ <el-form-item :label="$t('fillinthedate')" >
|
|
|
|
+ <el-date-picker
|
|
|
|
+ v-model="date"
|
|
|
|
+ type="daterange"
|
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
|
+ size="small"
|
|
|
|
+ :range-separator="$t('other.to')"
|
|
|
|
+ :start-placeholder="$t('time.startDate')"
|
|
|
|
+ :end-placeholder="$t('time.endDate')"
|
|
|
|
+ style="width: 280px">
|
|
|
|
+ </el-date-picker>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item>
|
|
|
|
+ <el-button @click="getList" size="small">{{ $t('find') }}</el-button>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item v-if="currentClick == '2-1'">
|
|
|
|
+ <el-button @click="exportDocument()" size="small">单据导出</el-button>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </div>
|
|
</el-form>
|
|
</el-form>
|
|
</div>
|
|
</div>
|
|
<el-divider ></el-divider>
|
|
<el-divider ></el-divider>
|
|
<!--列表-->
|
|
<!--列表-->
|
|
- <el-table ref="tab" :data="list" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;" :summary-method="getSummaries" show-summary>
|
|
|
|
|
|
+ <el-table ref="tab" :data="list" highlight-current-row v-loading="listLoading" :height="tableHeight - currentClickNum" style="width: 100%;" :summary-method="getSummaries" show-summary>
|
|
<el-table-column prop="code" :label="$t('ticketnumber')"></el-table-column>
|
|
<el-table-column prop="code" :label="$t('ticketnumber')"></el-table-column>
|
|
<el-table-column prop="totalAmount" :label="$t('amountof')+ '('+$t('yuan')+')'" align="center">
|
|
<el-table-column prop="totalAmount" :label="$t('amountof')+ '('+$t('yuan')+')'" align="center">
|
|
<template slot-scope="scope" >
|
|
<template slot-scope="scope" >
|
|
@@ -622,6 +627,8 @@ export default {
|
|
diz: 'http://worktime.ttkuaiban.com',
|
|
diz: 'http://worktime.ttkuaiban.com',
|
|
importDialog: false,
|
|
importDialog: false,
|
|
importingData: false,
|
|
importingData: false,
|
|
|
|
+ currentClick: '',
|
|
|
|
+ currentClickNum: 0,
|
|
|
|
|
|
// 费用类型自定义
|
|
// 费用类型自定义
|
|
customTypeDialog: false,
|
|
customTypeDialog: false,
|
|
@@ -934,6 +941,10 @@ export default {
|
|
this.displayTable = true;
|
|
this.displayTable = true;
|
|
this.getList();
|
|
this.getList();
|
|
}
|
|
}
|
|
|
|
+ // currentClick
|
|
|
|
+ // console.log(key, keyPath)
|
|
|
|
+ this.currentClick = key
|
|
|
|
+ key == '2-1' ? this.currentClickNum = 70 : this.currentClickNum = 0
|
|
},
|
|
},
|
|
bills(audit) { // 控制
|
|
bills(audit) { // 控制
|
|
this.isAuditList = audit;
|
|
this.isAuditList = audit;
|
|
@@ -1304,6 +1315,7 @@ export default {
|
|
this.$refs.staff.style.width = '95%'
|
|
this.$refs.staff.style.width = '95%'
|
|
this.$refs.xiaomian.style.width = '100%'
|
|
this.$refs.xiaomian.style.width = '100%'
|
|
this.$refs.headHe.style.paddingLeft = '20px'
|
|
this.$refs.headHe.style.paddingLeft = '20px'
|
|
|
|
+ this.currentClickNum = 0
|
|
} else {
|
|
} else {
|
|
this.$refs.sidebars.style.width = '200px'
|
|
this.$refs.sidebars.style.width = '200px'
|
|
this.$refs.sid.style.left = '200px'
|
|
this.$refs.sid.style.left = '200px'
|
|
@@ -1313,6 +1325,7 @@ export default {
|
|
this.$refs.staff.style.width = '81%'
|
|
this.$refs.staff.style.width = '81%'
|
|
this.$refs.xiaomian.style.width = '85%'
|
|
this.$refs.xiaomian.style.width = '85%'
|
|
this.$refs.headHe.style.paddingLeft = '220px'
|
|
this.$refs.headHe.style.paddingLeft = '220px'
|
|
|
|
+ this.currentClickNum = 70
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 费用金额失去焦点时触发
|
|
// 费用金额失去焦点时触发
|
|
@@ -1507,6 +1520,43 @@ export default {
|
|
} else if(obj.distinction == '3') {
|
|
} else if(obj.distinction == '3') {
|
|
this.ParticularsList.ownerId = obj.id
|
|
this.ParticularsList.ownerId = obj.id
|
|
}
|
|
}
|
|
|
|
+ },
|
|
|
|
+ // 单据导出
|
|
|
|
+ exportDocument() {
|
|
|
|
+ var stat = ''
|
|
|
|
+ var end = ''
|
|
|
|
+ if(this.date) {
|
|
|
|
+ stat = this.date[0]
|
|
|
|
+ end = this.date[1]
|
|
|
|
+ }
|
|
|
|
+ this.http.post('/expense-sheet/exportList', {
|
|
|
|
+ code: this.code,
|
|
|
|
+ startDate: stat,
|
|
|
|
+ endDate: end,
|
|
|
|
+ ownerId:this.ownerId,
|
|
|
|
+ type:this.type,
|
|
|
|
+ },
|
|
|
|
+ res => {
|
|
|
|
+ if (res.code == "ok") {
|
|
|
|
+ var filePath = res.data;
|
|
|
|
+ const a = document.createElement('a'); // 创建a标签
|
|
|
|
+ a.setAttribute('download', '费用报销单据列表');// download属性
|
|
|
|
+ a.setAttribute('href', filePath);// href链接
|
|
|
|
+ a.click(); //自执行点击事件
|
|
|
|
+ a.remove();
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: res.msg,
|
|
|
|
+ type: "error"
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ error => {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: error,
|
|
|
|
+ type: "error"
|
|
|
|
+ });
|
|
|
|
+ });
|
|
}
|
|
}
|
|
},
|
|
},
|
|
};
|
|
};
|