Commit 756f552c authored by 耿迪迪's avatar 耿迪迪

交易项目导出查询-驳回

parent eff7a09d
...@@ -11,9 +11,12 @@ import com.zehong.common.enums.BusinessType; ...@@ -11,9 +11,12 @@ import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.StringUtils; import com.zehong.common.utils.StringUtils;
import com.zehong.common.utils.poi.ExcelUtil; import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.system.domain.TTradeProject; import com.zehong.system.domain.TTradeProject;
import com.zehong.system.domain.vo.TTradeProjectExportVo;
import com.zehong.system.service.ITTradeProjectService; import com.zehong.system.service.ITTradeProjectService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
...@@ -24,8 +27,10 @@ import java.net.URL; ...@@ -24,8 +27,10 @@ import java.net.URL;
import java.net.URLConnection; import java.net.URLConnection;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
import java.util.zip.ZipEntry; import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream; import java.util.zip.ZipOutputStream;
...@@ -69,9 +74,15 @@ public class TTradeProjectController extends BaseController ...@@ -69,9 +74,15 @@ public class TTradeProjectController extends BaseController
@GetMapping("/export") @GetMapping("/export")
public AjaxResult export(TTradeProject tTradeProject) public AjaxResult export(TTradeProject tTradeProject)
{ {
List<TTradeProject> list = tTradeProjectService.selectTTradeProjectList(tTradeProject); startPage();
ExcelUtil<TTradeProject> util = new ExcelUtil<TTradeProject>(TTradeProject.class); List<TTradeProject> list = tTradeProjectService.selectTTradeProjectListByRoles(tTradeProject);
return util.exportExcel(list, "交易项目数据"); List<TTradeProjectExportVo> listVo = list.stream().map(item ->{
TTradeProjectExportVo vo = new TTradeProjectExportVo();
BeanUtils.copyProperties(item,vo);
return vo;
}).collect(Collectors.toList());
ExcelUtil<TTradeProjectExportVo> util = new ExcelUtil<>(TTradeProjectExportVo.class);
return util.exportExcel(listVo, "交易项目数据");
} }
/** /**
......
...@@ -118,6 +118,12 @@ public class TTradeProject extends BaseEntity ...@@ -118,6 +118,12 @@ public class TTradeProject extends BaseEntity
private String transactionDetailName; private String transactionDetailName;
private String relationTransactionProjectName;
private Date createBeginTime;
private Date createEndTime;
public String getDealRemark() { public String getDealRemark() {
return dealRemark; return dealRemark;
} }
...@@ -402,6 +408,30 @@ public class TTradeProject extends BaseEntity ...@@ -402,6 +408,30 @@ public class TTradeProject extends BaseEntity
this.transactionDetailName = transactionDetailName; this.transactionDetailName = transactionDetailName;
} }
public String getRelationTransactionProjectName() {
return relationTransactionProjectName;
}
public void setRelationTransactionProjectName(String relationTransactionProjectName) {
this.relationTransactionProjectName = relationTransactionProjectName;
}
public Date getCreateBeginTime() {
return createBeginTime;
}
public void setCreateBeginTime(Date createBeginTime) {
this.createBeginTime = createBeginTime;
}
public Date getCreateEndTime() {
return createEndTime;
}
public void setCreateEndTime(Date createEndTime) {
this.createEndTime = createEndTime;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
......
package com.zehong.system.domain.vo;
import com.zehong.common.annotation.Excel;
import java.math.BigDecimal;
import java.util.Date;
public class TTradeProjectExportVo {
@Excel(name = "交易项目")
private String relationTransactionProjectName;
@Excel(name = "交易细项名称")
private String transactionDetailName;
@Excel(name ="交易状态")
private String tradeStatus;
@Excel(name = "卖方")
private String applyDeptName;
@Excel(name = "申请人")
private String applyName;
/** 创建时间 */
@Excel(name = "申请时间",dateFormat="yyyy-MM-dd HH:mm:ss")
private Date createTime;
@Excel(name = "申报总价")
private BigDecimal tradeTotal;
@Excel(name = "买方")
private String tradeDeptName;
@Excel(name = "买方经办人")
private String tradeTransactorName;
@Excel(name = "评分")
private Integer tradeScore;
@Excel(name = "交易成交价")
private BigDecimal dealPrice;
@Excel(name = "尾款")
private BigDecimal pendingPayment;
public String getRelationTransactionProjectName() {
return relationTransactionProjectName;
}
public void setRelationTransactionProjectName(String relationTransactionProjectName) {
this.relationTransactionProjectName = relationTransactionProjectName;
}
public String getTransactionDetailName() {
return transactionDetailName;
}
public void setTransactionDetailName(String transactionDetailName) {
this.transactionDetailName = transactionDetailName;
}
public String getTradeStatus() {
return tradeStatus;
}
public void setTradeStatus(String tradeStatus) {
this.tradeStatus = getTradeStatusName(tradeStatus);
}
public String getApplyDeptName() {
return applyDeptName;
}
public void setApplyDeptName(String applyDeptName) {
this.applyDeptName = applyDeptName;
}
public String getApplyName() {
return applyName;
}
public void setApplyName(String applyName) {
this.applyName = applyName;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public BigDecimal getTradeTotal() {
return tradeTotal;
}
public void setTradeTotal(BigDecimal tradeTotal) {
this.tradeTotal = tradeTotal;
}
public String getTradeDeptName() {
return tradeDeptName;
}
public void setTradeDeptName(String tradeDeptName) {
this.tradeDeptName = tradeDeptName;
}
public String getTradeTransactorName() {
return tradeTransactorName;
}
public void setTradeTransactorName(String tradeTransactorName) {
this.tradeTransactorName = tradeTransactorName;
}
public Integer getTradeScore() {
return tradeScore;
}
public void setTradeScore(Integer tradeScore) {
this.tradeScore = tradeScore;
}
public BigDecimal getDealPrice() {
return dealPrice;
}
public void setDealPrice(BigDecimal dealPrice) {
this.dealPrice = dealPrice != null ? dealPrice.setScale(2,BigDecimal.ROUND_HALF_UP) : dealPrice;
}
public BigDecimal getPendingPayment() {
return pendingPayment;
}
public void setPendingPayment(BigDecimal pendingPayment) {
this.pendingPayment = pendingPayment != null ? pendingPayment.setScale(2,BigDecimal.ROUND_HALF_UP) : pendingPayment;
}
private String getTradeStatusName(String tradeStatus){
switch (tradeStatus){
case "0":
return "待买方经办人评价";
case "1":
return "待买方部门长确认";
case "2":
return "待卖方部门长确认";
case "3":
return "完成";
case "4":
return "驳回";
case "5":
return "待支付";
default:
return "";
}
}
}
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<component :is="currentTabComponent" :tradeData="tradeData" ref="currentCom" v-if="open"></component> <component :is="currentTabComponent" :tradeData="tradeData" ref="currentCom" v-if="open"></component>
<div slot="footer" class="dialog-footer" style="text-align: center" v-if="operatorName != 'tradeDetail'"> <div slot="footer" class="dialog-footer" style="text-align: center" v-if="operatorName != 'tradeDetail'">
<el-button style="width: 150px;border-color: #1890ff;color: #1890ff;" @click="resetSuggestion">重置意见</el-button> <el-button style="width: 150px;border-color: #1890ff;color: #1890ff;" @click="resetSuggestion">重置意见</el-button>
<el-button type="primary" style="width: 150px" v-if="operatorName == 'evaluate'" @click="reject">驳回</el-button>
<el-button type="primary" style="width: 150px" @click="submitSuggestion">提交</el-button> <el-button type="primary" style="width: 150px" @click="submitSuggestion">提交</el-button>
</div> </div>
</el-dialog> </el-dialog>
...@@ -107,7 +108,6 @@ ...@@ -107,7 +108,6 @@
} }
) )
.then(() => { .then(() => {
console.log("7778444-------------------")
settlePendingPayment({tradeId:this.tradeInfo.tradeId}).then(res =>{ settlePendingPayment({tradeId:this.tradeInfo.tradeId}).then(res =>{
if(res.code == 200){ if(res.code == 200){
this.$emit("getList"); this.$emit("getList");
...@@ -172,6 +172,19 @@ ...@@ -172,6 +172,19 @@
that.$message.error("提交失败!"); that.$message.error("提交失败!");
} }
}) })
},
//驳回
reject(){
updateProject({tradeId:this.tradeInfo.tradeId,tradeStatus:"4"}).then(res =>{
if(res.code == 200){
this.open = false;
this.$emit("getList");
this.$message.success("驳回成功!");
sendNotice({noticeTitle:"您有新交易项目被驳回",noticeType:"1",noticeContent:"您有新交易项目被驳回",userId:this.tradeInfo.applyId,relationType:"1",relationId:this.tradeInfo.tradeId})
}else{
this.$message.error("驳回失败!");
}
})
} }
} }
} }
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
align="center" align="center"
prop="transactionDetailName" prop="transactionDetailName"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
width="100px"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.transactionDetailName">{{scope.row.transactionDetailName}}</span> <span v-if="scope.row.transactionDetailName">{{scope.row.transactionDetailName}}</span>
......
...@@ -8,6 +8,17 @@ ...@@ -8,6 +8,17 @@
v-show="showSearch" v-show="showSearch"
label-width="100px" label-width="100px"
> >
<el-form-item label="交易项目" prop="relationTransactionProjectName">
<el-input
v-model="queryParams.relationTransactionProjectName"
placeholder="请输入交易项目"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="交易细项名称" prop="transactionDetailName"> <el-form-item label="交易细项名称" prop="transactionDetailName">
<!--<el-select <!--<el-select
v-model="queryParams.relationTransactionProjectId" v-model="queryParams.relationTransactionProjectId"
...@@ -67,15 +78,22 @@ ...@@ -67,15 +78,22 @@
/> />
</div> </div>
</el-form-item> </el-form-item>
<!--
<el-form-item label="发起时间" prop="createTime">
<el-form-item label="申请时间">
<el-date-picker <el-date-picker
v-model="queryParams.createTime" v-model="applyTime"
type="datetime" size="small"
placeholder="选择日期" type="datetimerange"
value-format="yyyy-MM-dd HH:mm:ss"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
@change="timeChange"
style="width: 340px"
> >
</el-date-picker> </el-date-picker>
</el-form-item>--> </el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button
...@@ -91,8 +109,8 @@ ...@@ -91,8 +109,8 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<!--<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <!--<el-col :span="1.5">
<el-button <el-button
type="primary" type="primary"
plain plain
...@@ -123,7 +141,7 @@ ...@@ -123,7 +141,7 @@
@click="handleDelete" @click="handleDelete"
v-hasPermi="['system:project:remove']" v-hasPermi="['system:project:remove']"
>删除</el-button> >删除</el-button>
</el-col> </el-col>-->
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="warning" type="warning"
...@@ -132,11 +150,11 @@ ...@@ -132,11 +150,11 @@
size="mini" size="mini"
:loading="exportLoading" :loading="exportLoading"
@click="handleExport" @click="handleExport"
v-hasPermi="['system:project:export']" v-hasPermi="['trade:project:export']"
>导出</el-button> >导出</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <!--<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
</el-row>--> </el-row>
<el-card class="box-card"> <el-card class="box-card">
<div class="outer-div"> <div class="outer-div">
...@@ -400,7 +418,10 @@ export default { ...@@ -400,7 +418,10 @@ export default {
tradeStatus: null, tradeStatus: null,
createTime: null, createTime: null,
queryApplyDeptId: null, queryApplyDeptId: null,
queryTradeDeptId: null queryTradeDeptId: null,
relationTransactionProjectName: null,
createBeginTime: null,
createEndTime: null
}, },
// 表单参数 // 表单参数
form: {}, form: {},
...@@ -438,7 +459,8 @@ export default { ...@@ -438,7 +459,8 @@ export default {
tab: "0", tab: "0",
transactionOptions: [], transactionOptions: [],
transactorList: [], transactorList: [],
count: 0 count: 0,
applyTime: []
}; };
}, },
created() { created() {
...@@ -515,6 +537,9 @@ export default { ...@@ -515,6 +537,9 @@ export default {
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.resetForm("queryForm"); this.resetForm("queryForm");
this.queryParams.createBeginTime = null;
this.queryParams.createEndTime = null;
this.applyTime = [];
this.handleQuery(); this.handleQuery();
}, },
// 多选框选中数据 // 多选框选中数据
...@@ -611,7 +636,8 @@ export default { ...@@ -611,7 +636,8 @@ export default {
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
const queryParams = this.queryParams; const queryParams = {...this.queryParams};
queryParams.pageSize = 1000;
this.$confirm("是否确认导出所有交易项目数据项?", "警告", { this.$confirm("是否确认导出所有交易项目数据项?", "警告", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
...@@ -773,6 +799,13 @@ export default { ...@@ -773,6 +799,13 @@ export default {
); );
} }
}, },
//时间切换
timeChange(value){
if(value){
this.queryParams.createBeginTime = value[0];
this.queryParams.createEndTime = value[1];
}
},
}, },
}; };
</script> </script>
......
...@@ -8,6 +8,17 @@ ...@@ -8,6 +8,17 @@
v-show="showSearch" v-show="showSearch"
label-width="100px" label-width="100px"
> >
<el-form-item label="交易项目" prop="relationTransactionProjectName">
<el-input
v-model="queryParams.relationTransactionProjectName"
placeholder="请输入交易项目"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="交易细项名称" prop="transactionDetailName"> <el-form-item label="交易细项名称" prop="transactionDetailName">
<el-input <el-input
...@@ -52,6 +63,21 @@ ...@@ -52,6 +63,21 @@
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="申请时间">
<el-date-picker
v-model="applyTime"
size="small"
type="datetimerange"
value-format="yyyy-MM-dd HH:mm:ss"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
@change="timeChange"
style="width: 340px"
>
</el-date-picker>
</el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button
type="primary" type="primary"
...@@ -169,13 +195,17 @@ ...@@ -169,13 +195,17 @@
tradeStatus: null, tradeStatus: null,
createTime: null, createTime: null,
queryApplyDeptId: null, queryApplyDeptId: null,
queryTradeDeptId: null queryTradeDeptId: null,
relationTransactionProjectName: null,
createBeginTime: null,
createEndTime: null
}, },
// 总条数 // 总条数
total: 0, total: 0,
deptOptions: [], deptOptions: [],
// 显示搜索条件 // 显示搜索条件
showSearch: true, showSearch: true,
applyTime: []
} }
}, },
created(){ created(){
...@@ -195,6 +225,9 @@ ...@@ -195,6 +225,9 @@
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.resetForm("queryForm"); this.resetForm("queryForm");
this.queryParams.createBeginTime = null;
this.queryParams.createEndTime = null;
this.applyTime = [];
this.handleQuery(); this.handleQuery();
}, },
/** 查询交易项目列表 */ /** 查询交易项目列表 */
...@@ -237,6 +270,13 @@ ...@@ -237,6 +270,13 @@
this.deptOptions = response.data; this.deptOptions = response.data;
}); });
}, },
//时间切换
timeChange(value){
if(value){
this.queryParams.createBeginTime = value[0];
this.queryParams.createEndTime = value[1];
}
},
} }
} }
</script> </script>
......
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