Commit 15bdbaed authored by lizhichao's avatar lizhichao

优化

parent aeea6d6b
......@@ -61,6 +61,30 @@
<artifactId>precision-effect-generator</artifactId>
</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>
<build>
......
......@@ -36,7 +36,7 @@ public class TCashOperateController extends BaseController
/**
* 查询资金操作列表
*/
@PreAuthorize("@ss.hasPermi('system:operate:list')")
// @PreAuthorize("@ss.hasPermi('system:operate:list')")
@GetMapping("/list")
public TableDataInfo list(TCashOperate tCashOperate)
{
......
......@@ -108,6 +108,16 @@ public class TTradeProject extends BaseEntity
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<>();
......
......@@ -28,6 +28,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="isDel" column="is_del" />
<result property="remark" column="remark" />
<result property="applyName" column="apply_name"/>
<result property="tradeTransactorName" column="trade_transactor_name"/>
<result property="applyDeptName" column="apply_dept_name"/>
<result property="tradeDeptName" column="trade_dept_name"/>
<result property="tradeDeptManagerName" column="trade_dept_manager_name"/>
......@@ -57,10 +59,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update_time,
is_del,
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 = 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
t_trade_project
</sql>
......@@ -76,6 +79,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="tradeTransactor != null"> and trade_transactor = #{tradeTransactor}</if>
<if test="tradeDeptId != null"> and trade_dept_id = #{tradeDeptId}</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">
and (
(apply_dept_id = #{applyDeptId}
......
......@@ -7,6 +7,7 @@ const getters = {
token: state => state.user.token,
avatar: state => state.user.avatar,
name: state => state.user.name,
nickName: state => state.user.nickName,
deptName:state => state.user.deptName,
deptId:state => state.user.deptId,
userId:state => state.user.userId,
......
......@@ -5,12 +5,12 @@ const user = {
state: {
token: getToken(),
name: '',
nickName:'',
avatar: '',
roles: [],
permissions: [],
systemSetting:{},
deptName:'',
userId: '',
deptId: '',
userId: ''
},
......@@ -22,6 +22,9 @@ const user = {
SET_NAME: (state, name) => {
state.name = name
},
SET_NICKNAME: (state, nickName) => {
state.nickName = nickName
},
SET_USER_ID: (state, userId) =>{
state.userId = userId;
},
......@@ -80,6 +83,8 @@ const user = {
commit('SET_ROLES', ['ROLE_DEFAULT'])
}
commit('SET_NAME', user.userName)
commit('SET_NICKNAME', user.nickName)
commit('SET_USER_ID',user.userId)
commit('SET_AVATAR', avatar)
// 默认配置
......
<template>
<div>
<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-col :span="5">
<el-row>
......@@ -38,7 +38,7 @@
<el-col :span="10">
<el-row>
<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-col>
</el-row>
......
<template>
<div class="common">
<el-form label-width="100px">
<el-divider></el-divider>
<el-row>
<el-col :span="12">
<el-form-item label="项目名称">{{transactionProjectInfo.transactionProjectName}}</el-form-item>
......@@ -35,7 +34,12 @@
</el-form-item>
</el-col>
<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-row>
<el-divider></el-divider>
......@@ -45,13 +49,13 @@
<el-col :span="5">
<el-row>
<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-col>
<el-col :span="5">
<el-row>
<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-col>
<el-col :span="5">
......
<template>
<div>
<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-col :span="8" style="margin-top: 10px">
<el-checkbox v-model="checked">我已知晓</el-checkbox>
<el-col :span="8">
<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 :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>
<el-input :value="$store.state.user.name" style="width: 130px" disabled/>
</el-col>
......
......@@ -7,6 +7,7 @@
<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="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="dealPrice" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
......
......@@ -146,46 +146,68 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="交易项目" prop="relationTransactionProjectId">
<el-select v-model="form.relationTransactionProjectId" placeholder="请选择交易项目" style="width: 100%" @change="changeTransactionProject">
<el-option v-for="item in transactionOptions"
:key="item.transactionProjectId"
:label="item.transactionProjectName"
:value="item.transactionProjectId"/>
<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-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-form-item label="交易项目" prop="relationTransactionProjectId">
<el-select v-model="form.relationTransactionProjectId" placeholder="请选择交易项目" style="width: 100%" @change="changeTransactionProject">
<el-option v-for="item in transactionOptions"
:key="item.transactionProjectId"
:label="item.transactionProjectName"
:value="item.transactionProjectId"/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="单价" prop="tradePrice">
<el-input v-model="form.tradePrice" placeholder="请输入单价" :disabled="priceType == '1'" @blur="sumAmount"/>
<el-form-item v-if="priceType == '1'" label="单价" prop="tradePrice" >
<el-input v-model="form.tradePrice" placeholder="请输入单价" :disabled="true" @blur="sumAmount"/>
</el-form-item>
<el-form-item v-if="priceType == '2'" label="单价" prop="tradePrice" :rules="[
{ required: false, message:'单价不能为空', trigger: 'blur' }
]" >
<el-input v-model="form.tradePrice" placeholder="请输入单价" :disabled="true" @blur="sumAmount"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="数量" prop="tradeCount">
<el-input v-model="form.tradeCount" placeholder="请输入交易数量" @blur="sumAmount"/>
<el-form-item label="数量" v-if="priceType == '1'" prop="tradeCount">
<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-col>
<el-col :span="12">
<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-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-form-item label="附件" prop="attachmentUrl">
<FileUpload
listType="picture"
......@@ -244,6 +266,7 @@ export default {
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
......@@ -279,9 +302,10 @@ export default {
{ required: true, message: "总价不能为空", trigger: "blur" }
],
},
transactionProjects: [],
deptOptions: [],
priceType: "",
priceType: "1",
fileList: [],
transactionProjectStatus: [],
tab:"0",
......@@ -300,7 +324,7 @@ export default {
watch:{
"form.tradeDeptId":{
handler(newValue, oldValue){
this.changeDept();
// this.changeDept();
this.getTransactor();
},
deep:true
......@@ -437,6 +461,8 @@ export default {
getTransactionProjectList(query).then(res =>{
if(res.code == 200){
this.transactionProjects = res.data;
this.transactionOptions = this.transactionProjects.filter(item => item.deptId == this.$store.state.user.deptId);
}
})
},
......@@ -454,6 +480,7 @@ export default {
}else{
this.priceType = transactionProject.priceType;
this.form.tradePrice = "";
this.form.tradeCount = "";
}
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