Commit 15bdbaed authored by lizhichao's avatar lizhichao

优化

parent aeea6d6b
...@@ -61,6 +61,30 @@ ...@@ -61,6 +61,30 @@
<artifactId>precision-effect-generator</artifactId> <artifactId>precision-effect-generator</artifactId>
</dependency> </dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1.1</version>
</dependency>
</dependencies> </dependencies>
<build> <build>
......
...@@ -36,7 +36,7 @@ public class TCashOperateController extends BaseController ...@@ -36,7 +36,7 @@ public class TCashOperateController extends BaseController
/** /**
* 查询资金操作列表 * 查询资金操作列表
*/ */
@PreAuthorize("@ss.hasPermi('system:operate:list')") // @PreAuthorize("@ss.hasPermi('system:operate:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TCashOperate tCashOperate) public TableDataInfo list(TCashOperate tCashOperate)
{ {
......
...@@ -108,6 +108,16 @@ public class TTradeProject extends BaseEntity ...@@ -108,6 +108,16 @@ public class TTradeProject extends BaseEntity
private String tradeDeptManagerName; private String tradeDeptManagerName;
public String getTradeTransactorName() {
return tradeTransactorName;
}
public void setTradeTransactorName(String tradeTransactorName) {
this.tradeTransactorName = tradeTransactorName;
}
private String tradeTransactorName;
/**操作类型*/ /**操作类型*/
private List<String> operators = new ArrayList<>(); private List<String> operators = new ArrayList<>();
......
...@@ -28,6 +28,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -28,6 +28,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="isDel" column="is_del" /> <result property="isDel" column="is_del" />
<result property="remark" column="remark" /> <result property="remark" column="remark" />
<result property="applyName" column="apply_name"/> <result property="applyName" column="apply_name"/>
<result property="tradeTransactorName" column="trade_transactor_name"/>
<result property="applyDeptName" column="apply_dept_name"/> <result property="applyDeptName" column="apply_dept_name"/>
<result property="tradeDeptName" column="trade_dept_name"/> <result property="tradeDeptName" column="trade_dept_name"/>
<result property="tradeDeptManagerName" column="trade_dept_manager_name"/> <result property="tradeDeptManagerName" column="trade_dept_manager_name"/>
...@@ -57,10 +59,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -57,10 +59,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update_time, update_time,
is_del, is_del,
remark, remark,
(SELECT user_name FROM sys_user WHERE user_id = apply_id) AS apply_name, (SELECT nick_name FROM sys_user WHERE user_id = trade_transactor) AS trade_transactor_name,
(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 = apply_dept_id) AS apply_dept_name,
(SELECT dept_name FROM sys_dept WHERE dept_id = trade_dept_id) AS trade_dept_name, (SELECT dept_name FROM sys_dept WHERE dept_id = trade_dept_id) AS trade_dept_name,
(SELECT user_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
FROM FROM
t_trade_project t_trade_project
</sql> </sql>
...@@ -76,6 +79,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -76,6 +79,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="tradeTransactor != null"> and trade_transactor = #{tradeTransactor}</if> <if test="tradeTransactor != null"> and trade_transactor = #{tradeTransactor}</if>
<if test="tradeDeptId != null"> and trade_dept_id = #{tradeDeptId}</if> <if test="tradeDeptId != null"> and trade_dept_id = #{tradeDeptId}</if>
</if> </if>
<!-- add by lizhichao 0612 -->
<!-- 当同时拥有部门长及经办人角色时 -->
<if test="queryType == 'all' and applyDeptId != null and tradeTransactor == null">
and (
(apply_dept_id = #{applyDeptId}
<if test="applyId != null"> and apply_id = #{applyId}</if>)
or(trade_dept_id = #{tradeDeptId}
<if test="tradeTransactor != null"> and trade_transactor = #{tradeTransactor}</if>)
)
</if>
<if test="queryType == 'all' and applyDeptId != null and tradeTransactor != null"> <if test="queryType == 'all' and applyDeptId != null and tradeTransactor != null">
and ( and (
(apply_dept_id = #{applyDeptId} (apply_dept_id = #{applyDeptId}
......
...@@ -7,6 +7,7 @@ const getters = { ...@@ -7,6 +7,7 @@ const getters = {
token: state => state.user.token, token: state => state.user.token,
avatar: state => state.user.avatar, avatar: state => state.user.avatar,
name: state => state.user.name, name: state => state.user.name,
nickName: state => state.user.nickName,
deptName:state => state.user.deptName, deptName:state => state.user.deptName,
deptId:state => state.user.deptId, deptId:state => state.user.deptId,
userId:state => state.user.userId, userId:state => state.user.userId,
......
...@@ -5,12 +5,12 @@ const user = { ...@@ -5,12 +5,12 @@ const user = {
state: { state: {
token: getToken(), token: getToken(),
name: '', name: '',
nickName:'',
avatar: '', avatar: '',
roles: [], roles: [],
permissions: [], permissions: [],
systemSetting:{}, systemSetting:{},
deptName:'', deptName:'',
userId: '',
deptId: '', deptId: '',
userId: '' userId: ''
}, },
...@@ -22,6 +22,9 @@ const user = { ...@@ -22,6 +22,9 @@ const user = {
SET_NAME: (state, name) => { SET_NAME: (state, name) => {
state.name = name state.name = name
}, },
SET_NICKNAME: (state, nickName) => {
state.nickName = nickName
},
SET_USER_ID: (state, userId) =>{ SET_USER_ID: (state, userId) =>{
state.userId = userId; state.userId = userId;
}, },
...@@ -80,6 +83,8 @@ const user = { ...@@ -80,6 +83,8 @@ const user = {
commit('SET_ROLES', ['ROLE_DEFAULT']) commit('SET_ROLES', ['ROLE_DEFAULT'])
} }
commit('SET_NAME', user.userName) commit('SET_NAME', user.userName)
commit('SET_NICKNAME', user.nickName)
commit('SET_USER_ID',user.userId) commit('SET_USER_ID',user.userId)
commit('SET_AVATAR', avatar) commit('SET_AVATAR', avatar)
// 默认配置 // 默认配置
......
<template> <template>
<div> <div>
<CommonInfo :tradeData="tradeData"/> <CommonInfo :tradeData="tradeData"/>
<div style="margin: 11px 30px;color: #1890ff;">买方审核</div> <div style="margin: 11px 30px;color: #1890ff;">买方经办人审核</div>
<el-row style="margin-left:97px"> <el-row style="margin-left:97px">
<el-col :span="5"> <el-col :span="5">
<el-row> <el-row>
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<el-col :span="10"> <el-col :span="10">
<el-row> <el-row>
<el-col :span="5">审核人</el-col> <el-col :span="5">审核人</el-col>
<el-col :span="16"><el-input :value="$store.state.user.name" style="width: 90px" disabled/></el-col> <el-col :span="16"><el-input :value="$store.state.user.nickName" style="width: 90px" disabled/></el-col>
</el-row> </el-row>
</el-col> </el-col>
</el-row> </el-row>
......
<template> <template>
<div class="common"> <div class="common">
<el-form label-width="100px"> <el-form label-width="100px">
<el-divider></el-divider>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="项目名称">{{transactionProjectInfo.transactionProjectName}}</el-form-item> <el-form-item label="项目名称">{{transactionProjectInfo.transactionProjectName}}</el-form-item>
...@@ -35,7 +34,12 @@ ...@@ -35,7 +34,12 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="经办人">{{tradeData.applyName}}</el-form-item> <el-form-item label="卖方经办人">{{tradeData.applyName}}</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="备注">{{tradeData.remark}}</el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-divider></el-divider> <el-divider></el-divider>
...@@ -45,13 +49,13 @@ ...@@ -45,13 +49,13 @@
<el-col :span="5"> <el-col :span="5">
<el-row> <el-row>
<el-col :span="6">数量</el-col> <el-col :span="6">数量</el-col>
<el-col :span="18">{{tradeData.tradeCount}}</el-col> <el-col :span="18">{{tradeData.tradeCount===null?"-":tradeData.tradeCount}}</el-col>
</el-row> </el-row>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-row> <el-row>
<el-col :span="6">单价</el-col> <el-col :span="6">单价</el-col>
<el-col :span="18">{{tradeData.tradePrice}}</el-col> <el-col :span="18">{{tradeData.tradePrice===null?"-":tradeData.tradePrice}}</el-col>
</el-row> </el-row>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
......
<template> <template>
<div> <div>
<CommonInfo :tradeData="tradeData"/> <CommonInfo :tradeData="tradeData"/>
<div style="margin: 11px 30px;color: #1890ff;">部门审核</div> <div style="margin: 11px 30px;color: #1890ff;">部门审核</div>
<el-row style="margin-left:95px"> <el-row style="margin-left:95px">
<el-col :span="8" style="margin-top: 10px"> <el-col :span="8">
<el-checkbox v-model="checked">我已知晓</el-checkbox> <div >
<span style="color: #d0d0d0">买方经办人</span> {{tradeData.tradeTransactorName}}
</div>
</el-col>
<el-col :span="8">
<div >
<span style="color: #d0d0d0">评分</span> {{tradeData.tradeScore}}
</div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div >
<span style="color: #d0d0d0">交易成交价</span> {{tradeData.dealPrice}}
</div>
</el-col>
</el-row>
<el-row style="margin-left:95px">
<el-col :span="8" style="margin-top: 15px">
<el-checkbox v-model="checked">我已知晓</el-checkbox>
</el-col>
<el-col :span="8" style="margin-top: 10px">
<span style="margin: 0px 5px;">审批人</span> <span style="margin: 0px 5px;">审批人</span>
<el-input :value="$store.state.user.name" style="width: 130px" disabled/> <el-input :value="$store.state.user.name" style="width: 130px" disabled/>
</el-col> </el-col>
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
<el-table-column label="卖方" align="center" prop="applyDeptName" :show-overflow-tooltip="true"/> <el-table-column label="卖方" align="center" prop="applyDeptName" :show-overflow-tooltip="true"/>
<el-table-column label="申报总价" align="center" prop="tradeTotal" /> <el-table-column label="申报总价" align="center" prop="tradeTotal" />
<el-table-column label="买方" align="center" prop="tradeDeptName" :show-overflow-tooltip="true"/> <el-table-column label="买方" align="center" prop="tradeDeptName" :show-overflow-tooltip="true"/>
<el-table-column label="买方经办人" align="center" prop="tradeTransactorName" :show-overflow-tooltip="true"/>
<el-table-column label="交易评分" align="center" prop="tradeScore" /> <el-table-column label="交易评分" align="center" prop="tradeScore" />
<el-table-column label="交易成交价" align="center" prop="dealPrice" /> <el-table-column label="交易成交价" align="center" prop="dealPrice" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
......
...@@ -145,6 +145,19 @@ ...@@ -145,6 +145,19 @@
<treeselect v-model="form.tradeDeptId" :options="deptOptions" :show-count="true" placeholder="请选择部门"/> <treeselect v-model="form.tradeDeptId" :options="deptOptions" :show-count="true" placeholder="请选择部门"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item label="买方经办人" prop="tradeTransactor">
<el-select v-model="form.tradeTransactor" placeholder="请选择买方经办人" style="width: 100%">
<el-option v-for="item in transactorList"
:key="item.userId"
:label="item.nickName"
:value="item.userId"/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="交易项目" prop="relationTransactionProjectId"> <el-form-item label="交易项目" prop="relationTransactionProjectId">
<el-select v-model="form.relationTransactionProjectId" placeholder="请选择交易项目" style="width: 100%" @change="changeTransactionProject"> <el-select v-model="form.relationTransactionProjectId" placeholder="请选择交易项目" style="width: 100%" @change="changeTransactionProject">
...@@ -155,36 +168,45 @@ ...@@ -155,36 +168,45 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="买方经办人" prop="tradeTransactor"> <el-form-item v-if="priceType == '1'" label="单价" prop="tradePrice" >
<el-select v-model="form.tradeTransactor" placeholder="请选择买方经办人" style="width: 100%"> <el-input v-model="form.tradePrice" placeholder="请输入单价" :disabled="true" @blur="sumAmount"/>
<el-option v-for="item in transactorList"
:key="item.userId"
:label="item.nickName"
:value="item.userId"/>
</el-select>
</el-form-item> </el-form-item>
</el-col>
<el-col :span="12"> <el-form-item v-if="priceType == '2'" label="单价" prop="tradePrice" :rules="[
<el-form-item label="单价" prop="tradePrice"> { required: false, message:'单价不能为空', trigger: 'blur' }
<el-input v-model="form.tradePrice" placeholder="请输入单价" :disabled="priceType == '1'" @blur="sumAmount"/> ]" >
<el-input v-model="form.tradePrice" placeholder="请输入单价" :disabled="true" @blur="sumAmount"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="数量" prop="tradeCount"> <el-form-item label="数量" v-if="priceType == '1'" prop="tradeCount">
<el-input v-model="form.tradeCount" placeholder="请输入交易数量" @blur="sumAmount"/> <el-input v-model="form.tradeCount" placeholder="请输入交易数量" @blur="sumAmount" :disabled="priceType == '2'"/>
</el-form-item>
<el-form-item label="数量" v-if="priceType == '2'" prop="tradeCount" :rules="[
{ required: false, message:'数量不能为空', trigger: 'blur' }
]" >
<el-input v-model="form.tradeCount" placeholder="请输入交易数量" @blur="sumAmount" :disabled="priceType == '2'"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="总价" prop="tradeTotal"> <el-form-item label="总价" prop="tradeTotal">
<el-input v-model="form.tradeTotal" placeholder="请输入交易总价" /> <el-input v-model="form.tradeTotal" placeholder="请输入交易总价" :disabled="priceType == '1'"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="备注" prop="remark">
<el-input type="textarea" v-model="form.remark" placeholder="" />
</el-form-item>
</el-col>
</el-row> </el-row>
<el-form-item label="附件" prop="attachmentUrl"> <el-form-item label="附件" prop="attachmentUrl">
<FileUpload <FileUpload
...@@ -244,6 +266,7 @@ export default { ...@@ -244,6 +266,7 @@ export default {
title: "", title: "",
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
// 查询参数 // 查询参数
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
...@@ -279,9 +302,10 @@ export default { ...@@ -279,9 +302,10 @@ export default {
{ required: true, message: "总价不能为空", trigger: "blur" } { required: true, message: "总价不能为空", trigger: "blur" }
], ],
}, },
transactionProjects: [], transactionProjects: [],
deptOptions: [], deptOptions: [],
priceType: "", priceType: "1",
fileList: [], fileList: [],
transactionProjectStatus: [], transactionProjectStatus: [],
tab:"0", tab:"0",
...@@ -300,7 +324,7 @@ export default { ...@@ -300,7 +324,7 @@ export default {
watch:{ watch:{
"form.tradeDeptId":{ "form.tradeDeptId":{
handler(newValue, oldValue){ handler(newValue, oldValue){
this.changeDept(); // this.changeDept();
this.getTransactor(); this.getTransactor();
}, },
deep:true deep:true
...@@ -437,6 +461,8 @@ export default { ...@@ -437,6 +461,8 @@ export default {
getTransactionProjectList(query).then(res =>{ getTransactionProjectList(query).then(res =>{
if(res.code == 200){ if(res.code == 200){
this.transactionProjects = res.data; this.transactionProjects = res.data;
this.transactionOptions = this.transactionProjects.filter(item => item.deptId == this.$store.state.user.deptId);
} }
}) })
}, },
...@@ -454,6 +480,7 @@ export default { ...@@ -454,6 +480,7 @@ export default {
}else{ }else{
this.priceType = transactionProject.priceType; this.priceType = transactionProject.priceType;
this.form.tradePrice = ""; this.form.tradePrice = "";
this.form.tradeCount = "";
} }
this.sumAmount(); this.sumAmount();
}, },
......
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