Commit a0e5855f authored by 王晓倩's avatar 王晓倩

Merge remote-tracking branch 'origin/master'

parents ec3638d9 456c3375
......@@ -107,7 +107,11 @@ public class TTradeProject extends BaseEntity
private String queryType;
private String tradeDeptManagerName;
private String dealRemark;
private String applyDeptManagerName;
public String getDealRemark() {
return dealRemark;
}
......@@ -350,6 +354,14 @@ public class TTradeProject extends BaseEntity
this.tradeDeptManagerName = tradeDeptManagerName;
}
public String getApplyDeptManagerName() {
return applyDeptManagerName;
}
public void setApplyDeptManagerName(String applyDeptManagerName) {
this.applyDeptManagerName = applyDeptManagerName;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
......
......@@ -34,6 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="applyDeptName" column="apply_dept_name"/>
<result property="tradeDeptName" column="trade_dept_name"/>
<result property="tradeDeptManagerName" column="trade_dept_manager_name"/>
<result property="applyDeptManagerName" column="apply_dept_manager_name"/>
</resultMap>
<sql id="selectTTradeProjectVo">
......@@ -65,7 +66,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
(SELECT nick_name FROM sys_user WHERE user_id = apply_id) AS apply_name,
(SELECT dept_name FROM sys_dept WHERE dept_id = apply_dept_id) AS apply_dept_name,
(SELECT dept_name FROM sys_dept WHERE dept_id = trade_dept_id) AS trade_dept_name,
(SELECT nick_name FROM sys_user WHERE user_id = trade_dept_manager_id) AS trade_dept_manager_name
(SELECT nick_name FROM sys_user WHERE user_id = trade_dept_manager_id) AS trade_dept_manager_name,
(SELECT nick_name FROM sys_user WHERE user_id = apply_dept_manager_id)AS apply_dept_manager_name
FROM
t_trade_project
</sql>
......
......@@ -79,7 +79,7 @@
return false;
},
submitSuggestion(){
return {tradeId:this.tradeData.tradeId,tradeStatus:this.tradeStatus,dealPrice:this.tradeData.dealPrice};
return {tradeId:this.tradeData.tradeId,tradeStatus:this.tradeStatus,dealPrice:this.tradeData.dealPrice,applyDeptManagerId:this.$store.state.user.userId};
}
}
}
......
......@@ -25,7 +25,7 @@
<span
style="padding-top: 10px;"
class="dbtn"
@click="checkFile(tradeData.attachmentUrl)"
@click="download(tradeData.attachmentUrl)"
v-if="tradeData.attachmentUrl != null && tradeData.attachmentUrl!=''"
>
<i class="el-icon el-icon-view"></i>查看/下载
......@@ -99,6 +99,46 @@
checkFile(url) {
window.open(url,'_blank');
},
//附件下载
download(url) {
// url = url.replace(/\\/g, "/");
const xhr = new XMLHttpRequest();
xhr.open("GET", url, true);
xhr.responseType = "blob";
//xhr.setRequestHeader('Authorization', 'Basic a2VybWl0Omtlcm1pdA==');
xhr.onload = function () {
if (xhr.readyState === 4 && xhr.status === 200) {
let blob = this.response;
console.log(blob);
// 转换一个blob链接
// 注: URL.createObjectURL() 静态方法会创建一个 DOMString(DOMString 是一个UTF-16字符串),
// 其中包含一个表示参数中给出的对象的URL。这个URL的生命周期和创建它的窗口中的document绑定
let downLoadUrl = window.URL.createObjectURL(
new Blob([blob], {
type: blob.type,
})
);
// 视频的type是video/mp4,图片是image/jpeg
// 01.创建a标签
let a = document.createElement("a");
// 02.给a标签的属性download设定名称
a.download = name;
// 03.设置下载的文件名
a.href = downLoadUrl;
// 04.对a标签做一个隐藏处理
a.style.display = "none";
// 05.向文档中添加a标签
document.body.appendChild(a);
// 06.启动点击事件
a.click();
// 07.下载完毕删除此标签
a.remove();
}
};
xhr.send();
},
}
}
</script>
......
......@@ -2,8 +2,8 @@
<div>
<el-button type="text" @click="open=true" size="mini">{{getOperatorName()}}</el-button>
<el-dialog :title="getOperatorName()" :visible.sync="open" width="800px" append-to-body :close-on-click-modal="false" destroy-on-close>
<component :is="currentTabComponent" :tradeData="tradeData" ref="currentCom"></component>
<div slot="footer" class="dialog-footer" style="text-align: center">
<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'">
<el-button style="width: 150px;border-color: #1890ff;color: #1890ff;" @click="resetSuggestion">重置意见</el-button>
<el-button type="primary" style="width: 150px" @click="submitSuggestion">提交</el-button>
</div>
......@@ -13,6 +13,7 @@
<script>
import { getProject, updateProject } from "@/api/transaction/tradeProject.js";
import tradeDetail from "./TradeDetail";
import evaluate from "./Evaluate";
import confirm from "./Confirm";
import approval from "./Approval";
......@@ -21,7 +22,8 @@
components:{
evaluate,
confirm,
approval
approval,
tradeDetail
},
props:{
operatorName: {
......@@ -45,6 +47,8 @@
methods:{
getOperatorName(){
switch(this.operatorName){
case "tradeDetail":
return "详情";
case "evaluate":
return "经办人评价";
case "confirm":
......
......@@ -15,13 +15,14 @@
:formatter="getTradeStatus"
:show-overflow-tooltip="true"
/>
<el-table-column label="申请人" align="center" prop="applyName" />
<el-table-column
label="卖方"
align="center"
prop="applyDeptName"
:show-overflow-tooltip="true"
/>
<el-table-column label="申请人" align="center" prop="applyName" />
<el-table-column label="申请时间" align="center" prop="createTime" width="150px"/>
<el-table-column label="申报总价" align="center" prop="tradeTotal" />
<el-table-column
label="买方"
......@@ -52,8 +53,13 @@
<!-- v-hasPermi="['system:project:edit']"-->
<!-- >修改</el-button-->
<!-- >-->
<OperatorButton
operatorName="tradeDetail"
:tradeInfo="scope.row"
@getList="getList"
/>
<el-button
v-if="scope.row.tradeStatus == '0' || scope.row.tradeStatus == '4'"
v-if="(scope.row.tradeStatus == '0' || scope.row.tradeStatus == '4') && scope.row.applyId == $store.state.user.userId"
size="mini"
type="text"
icon="el-icon-delete"
......
<template>
<div class="detail">
<CommonInfo :tradeData="tradeData"/>
<!-- 买方审核 -->
<div v-if="tradeData.tradeStatus > 0">
<div style="margin: 11px 30px;color: #1890ff;">买方审核</div>
<el-form label-width="100px">
<el-row>
<el-col :span="8">
<el-form-item label="议价" v-if="!tradeData.socre">{{tradeData.dealPrice}}</el-form-item>
<el-form-item label="评价" v-else>{{tradeData.tradeScore}}</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="成交价">{{tradeData.dealPrice}}</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="审核人">{{tradeData.tradeTransactorName}}</el-form-item>
</el-col>
</el-row>
<el-form-item label="说明">{{tradeData.dealRemark}}</el-form-item>
</el-form>
<el-divider></el-divider>
</div>
<!-- 买方部长确认 -->
<div v-if="tradeData.tradeStatus > 1">
<div style="margin: 11px 30px;color: #1890ff;">买方部门长审核</div>
<el-form label-width="100px">
<el-row>
<el-col :span="8">
<el-form-item label="买方经办人">{{tradeData.tradeTransactorName}}</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="评分">{{tradeData.tradeScore?tradeData.tradeScore:"-"}}</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="交易成交价">{{tradeData.dealPrice}}</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="审核人">{{tradeData.tradeDeptManagerName}}</el-form-item>
</el-col>
<el-col :span="8"></el-col>
</el-row>
</el-form>
<el-divider></el-divider>
</div>
<!-- 卖方部长审核 -->
<div v-if="tradeData.tradeStatus > 2">
<div style="margin: 11px 30px;color: #1890ff;">部门复核</div>
<el-form label-width="100px">
<el-row>
<el-col :span="8">
<el-form-item>
<el-radio v-model="this.tradeData.tradeStatus =='3'?radio ='1':radio='2'" label="1" disabled>通过</el-radio>
<el-radio v-model="radio" label="2" disabled>不通过</el-radio>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="审核人">{{tradeData.applyDeptManagerName}}</el-form-item>
</el-col>
<el-col :span="8"></el-col>
</el-row>
</el-form>
<el-divider></el-divider>
</div>
</div>
</template>
<script>
import CommonInfo from "./CommonInfo";
import Evaluate from "./Evaluate";
import Confirm from "./Confirm";
import Approval from "./Approval";
export default {
name: "trade-detail",
props:{
tradeData: {
type: Object
}
},
components:{
CommonInfo,
Evaluate,
Confirm,
Approval
}
}
</script>
<style scoped lang="scss">
.detail{
height: 460px;
overflow-y: auto;
&::-webkit-scrollbar {
/* 设置滚动条宽度 */
width: 4px;
/* 设置滚动条背景色 */
//background: black;
}
//滚动条轨道
&::-webkit-scrollbar-track {
background-color:transparent;
-webkit-border-radius: 2em;
-moz-border-radius: 2em;
border-radius:2em;
}
//滚动条滑块
&::-webkit-scrollbar-thumb {
background-color: rgb(147,147,153,0.5);
-webkit-border-radius: 2em;
-moz-border-radius: 2em;
border-radius:2em;
}
}
</style>
......@@ -236,8 +236,6 @@ export default {
};
},
created() {
console.log("userId===",this.$store.state.user.userId);
console.log("deptId===",this.$store.state.user.deptId);
if(this.$store.state.user.userId != 1){
this.queryParams.deptId = this.$store.state.user.deptId;
this.disabled = true;
......
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