|
@@ -186,13 +186,16 @@
|
|
|
<div><span style="color: #606266">时间段</span>
|
|
|
<el-date-picker v-model="createDate" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" @change="billss()" value-format="yyyy-MM-dd" placeholder="选择日期" size="small" clearable style="width:280px"></el-date-picker>
|
|
|
</div>
|
|
|
+ <div style="line-height: 32px;margin: 0 20px;">
|
|
|
+ <el-checkbox v-model="isOverTendays" @change="checkboxChange">10天以上</el-checkbox>
|
|
|
+ </div>
|
|
|
<!-- 从钉钉同步按钮,只有钉钉的用户并且有查看全部权限的管理员才有同步按钮 -->
|
|
|
<div style="margin: 0 0 0 20px" v-if="userComLis.dingdingUserid != null && permissions.awayOfficeAll">
|
|
|
<el-button size="small" type="primary" @click="dingdingClick()" >从钉钉同步</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 出差列表 -->
|
|
|
- <el-table :data="tableList" style="width: 100%" height="90%">
|
|
|
+ <el-table :data="tableList" style="width: 100%" height="90%" :loading="tableListLoading">
|
|
|
<el-table-column prop="ownerName" label="出差人员" width="100" fixed="left" align="center"></el-table-column>
|
|
|
<el-table-column prop="reason" label="出差事由" width="150" header-align="center"></el-table-column>
|
|
|
<el-table-column label="出差详情" width="600" align="center">
|
|
@@ -222,7 +225,7 @@
|
|
|
<el-table-column prop="indate" label="申请时间" width="150" align="center" v-if="!isDingding"></el-table-column>
|
|
|
<el-table-column label="出差天数" width="120" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <div>{{scope.row.dayCount}}天</div>
|
|
|
+ <div><span :style="scope.row.dayCount >= 10 ? 'color:#e62412' : ''">{{scope.row.dayCount}}天</span></div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="startDate" label="出差开始时间" width="150"></el-table-column>
|
|
@@ -254,9 +257,10 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column v-if="isDingding" label="操作" width="90" fixed="right">
|
|
|
+ <el-table-column v-if="isDingding" label="操作" width="150" fixed="right">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button icon="iconfont firerock-iconguanlian" circle size="mini" @click="DingdingEditor(scope.row)"></el-button>
|
|
|
+ <el-button v-if="permissions.awayOfficeAll || user.manageDeptId" icon="el-icon-delete" circle size="mini" @click="deleteOfDingding(scope.row)"></el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -758,7 +762,10 @@ export default {
|
|
|
synchronizeLoading: false,
|
|
|
synchronizationDaying:false,
|
|
|
createDateList: [],
|
|
|
- ownerIdsId: ''
|
|
|
+ ownerIdsId: '',
|
|
|
+
|
|
|
+ isOverTendays: false,
|
|
|
+ tableListLoading: false
|
|
|
}
|
|
|
},
|
|
|
created(){
|
|
@@ -784,6 +791,36 @@ export default {
|
|
|
// console.log("session",this.wuduData);
|
|
|
},
|
|
|
methods: {
|
|
|
+ checkboxChange(){
|
|
|
+ this.billss()
|
|
|
+ },
|
|
|
+ deleteOfDingding(e) {
|
|
|
+ this.$confirm("确认要删除吗?", "提示", {}).then(() => {
|
|
|
+ this.http.post('/business-trip/delete', {id:e.id},
|
|
|
+ res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.billss();
|
|
|
+ this.$message({
|
|
|
+ message: '删除成功',
|
|
|
+ type: "success"
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
dingdingClick() {
|
|
|
this.synchronizationDaying = true
|
|
|
this.ownerIdsId = this.users[0].id
|
|
@@ -938,7 +975,7 @@ export default {
|
|
|
|
|
|
},
|
|
|
DingdingDelete(row){
|
|
|
- console.log('row',row);
|
|
|
+ console.log('row',this.relationItem);
|
|
|
this.$confirm('是否确认删除?','提示',{
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
@@ -1206,16 +1243,20 @@ export default {
|
|
|
ownerId: this.ownerIds,
|
|
|
way: this.type,
|
|
|
};
|
|
|
+ if(this.isOverTendays){
|
|
|
+ param.checkState = 1
|
|
|
+ }
|
|
|
+ this.tableListLoading = true
|
|
|
this.http.post('/business-trip/list', param,
|
|
|
res => {
|
|
|
if (res.code == "ok") {
|
|
|
this.tableList = res.data.records
|
|
|
this.total = res.data.total
|
|
|
- this.loading = false
|
|
|
+ this.tableListLoading = false
|
|
|
console.log('tablelist',this.tableList);
|
|
|
this.$forceUpdate()
|
|
|
} else {
|
|
|
- this.loading = false
|
|
|
+ this.tableListLoading = false
|
|
|
this.$message({
|
|
|
message: res.msg,
|
|
|
type: "error"
|
|
@@ -1223,7 +1264,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
error => {
|
|
|
- this.loading = false
|
|
|
+ this.tableListLoading = false
|
|
|
this.$message({
|
|
|
message: error,
|
|
|
type: "error"
|