123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344 |
- <template>
- <div>
- <div class="bar-container">
- <el-row>
- <el-col :xs="24" :sm="12" :lg="6" :span="6" style="margin-right: 8px;">
- <el-input v-if="keyword" v-model="listQuery.keyword" placeholder="关键字搜索..." clearable>
- </el-input>
- </el-col>
-
- <el-col :xs="24" :sm="12" :lg="3" :span="6">
- <el-select v-if="nodeCode" v-model="listQuery.nodeCode" placeholder="流程节点" clearable filterable class="filter-item" >
- <el-option v-for="(item, index) in nodes" :key="index" :label="item.name" :value="item.code" />
- </el-select>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6" :span="6">
- <el-date-picker v-if="orderDateSearch" clearable v-model="orderDate" type="daterange" align="center" unlink-panels
- range-separator="至" start-placeholder="下单日期(开始)" end-placeholder="下单日期(结束)" :picker-options="pickerOptions"
- value-format="yyyy-MM-dd">
- </el-date-picker>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="6" :span="6">
- <el-button class="filter-item" type="success" @click="searchList" round>搜索
- </el-button>
- <el-button class="filter-item" round type="info" @click="resetSearch()">重置
- </el-button>
- <el-button class="filter-item" @click="moreSearch()" round>更多搜索<i :class="moreSearchIcon"></i>
- </el-button>
- <slot name="otherButton"></slot>
- </el-col>
- </el-row>
- <div v-if="business==='MAJOR_BUSINESS'" v-show="moreSearchBar" class="moreSearchStyle">
- <el-row class="row">
- <el-col :xs="24" :sm="12" :lg="3" :span="6">
- <el-select v-if="financial" clearable v-model="listQuery.financial" placeholder="金融类型">
- <el-option :value="true" label="金融">金融</el-option>
- <el-option :value="false" label="非金融">非金融</el-option>
- </el-select>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="3" :span="6" style="margin-right: 8px;">
- <el-input v-if="clientName" v-model="listQuery.clientName" placeholder="客户名称" clearable >
- </el-input>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="3" :span="6">
- <el-select v-if="clientManager" clearable filterable v-model="listQuery.clientManagerId" placeholder="客户经理">
- <el-option v-for="(item, id) in clientManagers" :key="id" :label="item.name" :value="item.id" />
- </el-select>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="3" :span="6">
- <el-select v-if="principal" v-model="listQuery.principalId" placeholder="负责人" clearable filterable class="filter-item"
- >
- <el-option v-for="(item, id) in principals" :key="id" :label="item.name" :value="item.id" />
- </el-select>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="3" :span="6">
- <el-select v-if="businessObjectType" clearable v-model="listQuery.businessObjectType" placeholder="评估对象类型">
- <el-option value="土地" label="土地">土地</el-option>
- <el-option value="房地产" label="房地产">房地产</el-option>
- </el-select>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="3" :span="6">
- <el-select v-if="department" clearable v-model="listQuery.departmentId" placeholder="接单部门">
- <el-option v-for="(d,id) in trunDep" :key="id" :label="d.name" :value="d.id"></el-option>
- </el-select>
- </el-col>
-
- </el-row>
- </div>
- <div v-if="business==='PERSONAL_BUSINESS'" v-show="moreSearchBar" class="moreSearchStyle">
- <el-row class="row">
- <el-col :xs="24" :sm="12" :lg="3" :span="6" style="margin-right: 8px;">
- <el-input v-if="clientName" v-model="listQuery.clientName" placeholder="客户名称" clearable >
- </el-input>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="3" :span="6" style="margin-right: 8px;">
- <el-input v-if="clientSubName" v-model="listQuery.clientSubName" placeholder="业务来源" clearable >
- </el-input>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="3" :span="6" style="margin-right: 8px;">
- <el-input v-if="clientManager" v-model="listQuery.clientManager" placeholder="客户经理" clearable >
- </el-input>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="3" :span="6" style="margin-right: 8px;">
- <el-input v-if="outwardStaffName" v-model="listQuery.outwardStaffName" placeholder="外业人员" clearable >
- </el-input>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="3" :span="6" style="margin-right: 8px;">
- <el-input v-if="inwardStaffName" v-model="listQuery.inwardStaffName" placeholder="内业人员" clearable >
- </el-input>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="3" :span="6" style="margin-right: 8px;">
- <el-input v-if="pricingStaffName" v-model="listQuery.pricingStaffName" placeholder="定价内业" clearable >
- </el-input>
- </el-col>
- <el-col :xs="24" :sm="12" :lg="3" :span="6" style="margin-right: 8px;">
- <el-input v-if="handlerName" v-model="listQuery.handlerName" placeholder="处理人" clearable >
- </el-input>
- </el-col>
- </el-row>
- </div>
- </div>
-
- </div>
- </template>
- <script>
- export default {
- name: "moreSerachBar",
- components: {
- },
- props: {
- listQuery:{
- type: Object,
- require:true
- },
- keyword:{
- type: Boolean,
- require:false,
- default:true
- },
- business:{
- type: String,
- require:true,
- },
- financial:{
- type: Boolean,
- require:false,
- default:true
- },
- nodeCode:{
- type: Boolean,
- require:false,
- default:true
- },
- clientName:{
- type: Boolean,
- require:false,
- default:true
- },
- clientManager:{
- type: Boolean,
- require:false,
- default:true
- },
- principal:{
- type: Boolean,
- require:false,
- default:true
- },
- department:{
- type: Boolean,
- require:false,
- default:true
- },
- orderDateSearch:{
- type: Boolean,
- require:false,
- default:true
- },
- businessObjectType:{
- type: Boolean,
- require:false,
- default:true
- },
- nodes:{
- type: Array,
- require:false,
- default:function(){
- return [];
- }
- },
- clientName:{
- type: Boolean,
- require:false,
- default:true
- },
- clientSubName:{
- type: Boolean,
- require:false,
- default:true
- },
- clientManager:{
- type: Boolean,
- require:false,
- default:true
- },
- outwardStaffName:{
- type: Boolean,
- require:false,
- default:true
- },
- inwardStaffName:{
- type: Boolean,
- require:false,
- default:true
- },
- pricingStaffName:{
- type: Boolean,
- require:false,
- default:true
- },
- handlerName:{
- type: Boolean,
- require:false,
- default:true
- },
- },
- computed: {
- },
- created() {
- if (this.business==='MAJOR_BUSINESS'){
- this.getMajorTurnDepartment();
- this.getAllotDepartmentUser();
- this.getClientManager();
- }
-
- },
- data() {
- return {
- pickerOptions: {
- shortcuts: [{
- text: '最近一周',
- onClick(picker) {
- const end = new Date();
- const start = new Date();
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
- picker.$emit('pick', [start, end]);
- }
- }, {
- text: '最近一个月',
- onClick(picker) {
- const end = new Date();
- const start = new Date();
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
- picker.$emit('pick', [start, end]);
- }
- }, {
- text: '最近三个月',
- onClick(picker) {
- const end = new Date();
- const start = new Date();
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
- picker.$emit('pick', [start, end]);
- }
- }]
- },
- moreSearchBar: false,
- moreSearchIcon: "el-icon-arrow-right",
- orderDate: '',
- trunDep: [],
- allotDepartment:[],
- clientManagers:[],
- principals:[],
- }
- },
- methods: {
- resetSearch() {
- this.orderDate = '';
- this.$emit('resetParams');
- },
- searchList() {
- // 重置分页
- this.listQuery.page = 1
- this.listQuery.size = 10
- if (this.orderDate) {
- this.listQuery.startDate = this.orderDate[0] + ' 00:00:00';
- this.listQuery.endDate = this.orderDate[1] + ' 23:59:59';
- }
- this.$emit('fliterSearch',this.listQuery);
- },
- moreSearch() {
- this.moreSearchBar = !this.moreSearchBar;
- if (this.moreSearchBar) {
- this.moreSearchIcon = "el-icon-arrow-down";
- } else {
- this.moreSearchIcon = "el-icon-arrow-right";
- }
- },
- getMajorTurnDepartment() {
- this.$api.department.trunDep("MAJOR_BUSINESS").then(res => {
- if (res.code === 200) {
- this.trunDep = res.data;
- }
- })
- },
- getAllotDepartment(){
- this.$api.department.allot(this.business).then(res=>{
- if (res.code === 200){
- this.allotDepartment = res.data;
- }
- })
- },
- getClientManager(){
- const post = "客户经理"
- this.$api.user.postUser(post).then(res=>{
- if (res.code === 200){
- this.clientManagers = res.data;
- }
- })
- },
- getAllotDepartmentUser(){
- const businessType = "MAJOR_BUSINESS"
- this.$api.user.allotDepartmentUser(businessType).then(res=>{
- if (res.code === 200 && res.data!=null){
- this.principals = res.data;
- }
- })
- }
- }
- }
- </script>
- <style scoped lang="css">
- .row{
- margin-top: 10px;
- }
- .bar-container{
- width: 1650px;
- }
- .moreSearchStyle {
- animation: scale-in-ver-top .2s cubic-bezier(.25, .46, .45, .94) both
- }
- @keyframes scale-in-ver-top {
- 0% {
- transform: scaleY(0);
- transform-origin: 100% 0;
- opacity: 1
- }
- 100% {
- transform: scaleY(1);
- transform-origin: 100% 0;
- opacity: 1
- }
- }
- </style>
|