Commit 6dee7800 authored by 耿迪迪's avatar 耿迪迪

账户操作金额

parent 31596fd7
......@@ -48,6 +48,10 @@ public class TCashOperate extends BaseEntity
private String operateDeptName;
private String beginOperatorTime;
private String endOperatorTime;
public String getDocumentType() {
return documentType;
}
......@@ -130,6 +134,22 @@ public class TCashOperate extends BaseEntity
this.operateDeptName = operateDeptName;
}
public String getBeginOperatorTime() {
return beginOperatorTime;
}
public void setBeginOperatorTime(String beginOperatorTime) {
this.beginOperatorTime = beginOperatorTime;
}
public String getEndOperatorTime() {
return endOperatorTime;
}
public void setEndOperatorTime(String endOperatorTime) {
this.endOperatorTime = endOperatorTime;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
......
package com.zehong.system.service.impl.tradeSettlement;
import com.zehong.common.core.exception.BusinessException;
import com.zehong.system.domain.TAccount;
import com.zehong.system.domain.TCashOperate;
import com.zehong.system.domain.TTradeProject;
......@@ -7,6 +8,8 @@ import com.zehong.system.mapper.TAccountMapper;
import com.zehong.system.mapper.TCashOperateMapper;
import com.zehong.system.mapper.TTradeProjectMapper;
import io.jsonwebtoken.lang.Collections;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.math.BigDecimal;
......@@ -20,6 +23,8 @@ import java.util.List;
@Component
public class SettlementTrade {
private static final Logger log = LoggerFactory.getLogger(SettlementTrade.class);
private TTradeProject tradeProject;
@Resource
......@@ -98,7 +103,10 @@ public class SettlementTrade {
TAccount tAccount = new TAccount();
tAccount.setDeptId(deptId);
List<TAccount> accounts = tAccountMapper.selectTAccountList(tAccount);
assert !Collections.isEmpty(accounts) : "部门资金账户不能为空,部门id:" + tradeProject.getApplyDeptId();
if(Collections.isEmpty(accounts)){
log.error("交易部门资金账户不能为空,部门id:" + tradeProject.getApplyDeptId());
throw new BusinessException("交易部门资金账户不能为空!");
}
return accounts.get(0);
}
......
......@@ -32,6 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="operateAmount != null "> and operate_amount = #{operateAmount}</if>
<if test="relationDoc != null and relationDoc != ''"> and relation_doc = #{relationDoc}</if>
<if test="operateTime != null "> and operate_time = #{operateTime}</if>
<if test="beginOperatorTime != null and endOperatorTime != null"> and operate_time BETWEEN #{beginOperatorTime} AND #{endOperatorTime}</if>
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
</where>
ORDER BY operate_time DESC
......
<template>
<div style="display: inline-block;margin: 0px 5px">
<el-button type="text" @click="openForDialog" size="mini">详情</el-button>
<el-dialog title="详情" :visible.sync="open" width="800px" append-to-body :close-on-click-modal="false" destroy-on-close>
<el-form label-width="100px" ref="form" :model="form">
<el-row style="height: 15px">
<el-col :span="7">
<el-form-item label="费用名称">{{form.feeName}}</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="使用人">{{form.userIdName}}</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="经办人">{{form.handledByUserIdName}}</el-form-item>
</el-col>
</el-row>
<el-divider></el-divider>
<el-row style="height: 15px">
<el-col :span="7">
<el-form-item label="借支部门">{{form.deptName}}</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="申请时间">{{form.registrationDate}}</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="审批时间" v-if="form.approvalTime!=null">{{form.approvalTime}}</el-form-item>
<el-form-item label="审批时间" v-else>-</el-form-item>
</el-col>
</el-row>
<el-divider></el-divider>
<el-row style="height: 15px">
<el-col :span="7">
<el-form-item label="小写合计" v-if="form.totalFigures!=null">{{form.totalFigures}}</el-form-item>
<el-form-item label="小写合计" v-else>-</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item label="用途说明" v-if="form.applicationDescription!=null">{{form.applicationDescription}}</el-form-item>
<el-form-item label="用途说明" v-else>-</el-form-item>
</el-col>
</el-row>
<el-divider></el-divider>
<el-row>
<el-col :span="24">
<el-form-item label="备注" v-if="form.remark!=null">{{form.remark}}</el-form-item>
<el-form-item label="备注" v-else>-</el-form-item>
</el-col>
</el-row>
<el-divider></el-divider>
<el-row>
<el-col :span="24">
<el-form-item label="审批人" v-if="form.approvedUserIdName!=null">{{form.approvedUserIdName}}</el-form-item>
<el-form-item label="审批人" v-else>-</el-form-item>
</el-col>
</el-row>
<el-divider></el-divider>
<el-row>
<el-col :span="24">
<el-form-item v-if="form.attachmentUrl !=null" label="附件" prop="attachmentUrl">
<div style="height: 60px;width: 100px;margin-top: 5px">
<img @click="godown(form.attachmentUrl)" v-if="ispictrue(form.attachmentUrl)" style="width: 100%;height: 100%" src="@/assets/images/wenjian.png"/>
<img @click="godown(form.attachmentUrl)" v-if="!ispictrue(form.attachmentUrl)" style="width: 100%;height: 100%" src="@/assets/images/wenjian.png"/>
</div>
</el-form-item>
</el-col>
</el-row>
<el-divider v-if="form.attachmentUrl !=null"></el-divider>
</el-form>
</el-dialog>
</div>
</template>
<script>
import { getFor } from "@/api/system/for";
export default {
name: "operator-button",
props:{
forId: {
type: Number
}
},
created(){
},
data(){
return{
open: false,
form: {}
}
},
methods:{
openForDialog(){
getFor(this.forId).then(response => {
if(response.data){
this.form = response.data;
this.open = true;
}
});
},
godown(src){
window.open(src);
},
ispictrue(src){
var pattern = /(\.jpg|\.jpeg|\.png|\.gif)$/i;
//console.log()
return pattern.test(src);
},
}
}
</script>
<style scoped>
</style>
......@@ -188,12 +188,11 @@
<el-dialog
title="账户详情"
:visible.sync="operateOpen"
width="800px"
width="1050px"
append-to-body
>
<el-form :model="queryAccountDetailParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="98px">
<el-form :model="queryAccountDetailParams" ref="queryAccountDetailForm" :inline="true" v-show="showSearch" label-width="98px">
<el-form-item label="操作类型" prop="transactionProjectName">
<el-select v-model="queryAccountDetailParams.operateType" placeholder="请选择操作类型" clearable>
<el-option label="交易收入" value="1"/>
<el-option label="交易支出" value="2" />
......@@ -206,6 +205,17 @@
<el-option label="还款进账-收入" value="8" />
</el-select>
</el-form-item>
<el-form-item label="操作时间" prop="registerTime">
<el-date-picker clearable size="small"
v-model="operatorTime"
type="datetimerange"
value-format="yyyy-MM-dd HH:mm:ss"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
@change="timeChange">
</el-date-picker>
</el-form-item>
<!-- <el-form-item label="部门" prop="deptId">-->
<!-- <div style="width: 200px">-->
......@@ -213,8 +223,10 @@
<!-- </div>-->
<!-- </el-form-item>-->
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="getOperateList">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetDetailQuery">重置</el-button>
</el-form-item>
</el-form>
......@@ -252,6 +264,32 @@
<span v-if="scope.row.documentType == '4'">借贷申请</span>
</template>
</el-table-column>
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<TradeDetail
v-if ="scope.row.documentType == '1'"
operatorName="tradeDetail"
:tradeInfo="{tradeId:scope.row.relationDoc}"
/>
<ForDetailButton
v-if ="scope.row.documentType == '2'"
:forId="Number(scope.row.relationDoc)"
/>
<PurchaseDetail
v-if ="scope.row.documentType == '3'"
operatorName="purchaseDetail"
:purchaseInfo="{purchaseId:scope.row.relationDoc}"
/>
<DebitDetail
v-if ="scope.row.documentType == '4'"
operatorName="debitDetail"
:debitInfo="{debitId:scope.row.relationDoc}"/>
</template>
</el-table-column>
</el-table>
<pagination
v-show="operateListTotal > 0"
......@@ -278,13 +316,20 @@ import { treeselect } from "@/api/system/dept";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import { listOperate } from "@/api/account/operate";
import MoneyTable from "./component/MoneyTable";
import TradeDetail from "@/views/trade/components/OperatorButton";
import PurchaseDetail from "@/views/purchase/components/OperatorButton";
import DebitDetail from "@/views/debit/components/OperatorButton";
import ForDetailButton from "./component/ForDetailButton";
export default {
name: "Account",
components: {
Treeselect,
MoneyTable,
TradeDetail,
ForDetailButton,
PurchaseDetail,
DebitDetail
},
data() {
return {
......@@ -340,11 +385,10 @@ export default {
operateOpen: false,
cashOperateList: [],
operateListTotal: 0,
operatorTime: []
};
},
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;
......@@ -527,6 +571,21 @@ export default {
}
});
},
//时间切换
timeChange(value){
if(value){
this.queryAccountDetailParams.beginOperatorTime = value[0];
this.queryAccountDetailParams.endOperatorTime = value[1];
}
},
resetDetailQuery(){
this.resetForm("queryAccountDetailForm");
this.queryAccountDetailParams.beginOperatorTime = null;
this.queryAccountDetailParams.endOperatorTime = null;
this.queryAccountDetailParams.operateType = null;
this.operatorTime = [];
this.getOperateList();
}
},
};
</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