index.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500
  1. <template>
  2. <div>
  3. <div class="bar-container">
  4. <el-row>
  5. <el-col :xs="24" :sm="12" :lg="3" :span="6" style="margin-right: 8px;">
  6. <el-input v-if="keyword" v-model.trim="listQuery.keyword" placeholder="关键字搜索..." clearable>
  7. </el-input>
  8. </el-col>
  9. <el-col :xs="24" :sm="12" :lg="3" :span="6">
  10. <el-select v-if="nodeCode" v-model="listQuery.nodeId" placeholder="流程节点" clearable filterable
  11. class="filter-item">
  12. <el-option v-for="(item, index) in nodes" :key="index" :label="item.name" :value="item.id" />
  13. </el-select>
  14. </el-col>
  15. <el-col :xs="24" :sm="12" :lg="3" :span="6">
  16. <el-select v-if="cancellation" v-model="listQuery.isCancellation" placeholder="项目作废" clearable
  17. class="filter-item">
  18. <el-option label="未作废" :value="false" />
  19. <el-option label="已作废" :value="true" />
  20. </el-select>
  21. </el-col>
  22. <el-col :xs="24" :sm="12" :lg="3" :span="6">
  23. <el-select v-if="ifSaveFileQuery" v-model="listQuery.getNodeIsCheckArchiving" placeholder="全部" clearable
  24. class="filter-item">
  25. <el-option label="非归档审核" :value="false" />
  26. <el-option label="归档审核" :value="true" />
  27. </el-select>
  28. </el-col>
  29. <el-col :xs="24" :sm="12" :lg="6" :span="6">
  30. <el-date-picker class="filter-item" v-if="orderDateSearch" clearable v-model="orderDate"
  31. type="daterange" align="center" unlink-panels range-separator="至" start-placeholder="下单日期(开始)"
  32. end-placeholder="下单日期(结束)" :picker-options="pickerOptions" value-format="yyyy-MM-dd">
  33. </el-date-picker>
  34. </el-col>
  35. <el-col :xs="24" :sm="12" :lg="2" :span="6" style="margin-right: 5px;">
  36. <el-select v-if="delivery" v-model="listQuery.delivery" @change="searchList" placeholder="送达状态">
  37. <el-option :value="null" label="(送达)全部">(送达)全部</el-option>
  38. <el-option :value="true" label="已送达">已送达</el-option>
  39. <el-option :value="false" label="未送达">未送达</el-option>
  40. </el-select>
  41. </el-col>
  42. <el-col :xs="24" :sm="12" :lg="2" :span="6" style="margin-right: 5px;">
  43. <el-select v-if="hasRealAmount" v-model="listQuery.hasRealAmount" @change="searchList" placeholder="收款状态">
  44. <el-option :value="null" label="(实收款)全部">(实收款)全部</el-option>
  45. <el-option :value="true" label="已收款">已收款</el-option>
  46. <el-option :value="false" label="未收款">未收款</el-option>
  47. </el-select>
  48. </el-col>
  49. <el-col :xs="24" :sm="12" :lg="3" :span="6" style="margin-right: 5px; margin-left: -55px;">
  50. <el-select v-if="personalRealAmount" v-model="listQuery.personalRealAmount" @change="searchList" placeholder="实收款状态" clearable>
  51. <el-option :value="true" label="已收款">已收款</el-option>
  52. <el-option :value="false" label="未收款">未收款</el-option>
  53. </el-select>
  54. </el-col>
  55. <el-col :xs="24" :sm="12" :lg="3" :span="6" style="margin-right: 5px; margin-left: -15px;">
  56. <el-select v-if="productions" v-model="listQuery.productions" @change="searchList" placeholder="已出产品" clearable>
  57. <el-option value="意见书" label="意见书">意见书</el-option>
  58. <el-option value="技术报告" label="技术报告">技术报告</el-option>
  59. <el-option value="结果报告" label="结果报告">结果报告</el-option>
  60. <el-option value="复评函" label="复评函">复评函</el-option>
  61. </el-select>
  62. </el-col>
  63. <el-col :xs="24" :sm="12" :lg="8" :span="6">
  64. <el-button class="filter-item" type="success" @click="searchList" v-loading.fullscreen.lock="loading"
  65. round>搜索
  66. </el-button>
  67. <el-button class="filter-item" round type="info" @click="resetSearch()">重置
  68. </el-button>
  69. <el-button class="filter-item" @click="moreSearch()" round>更多搜索<i :class="moreSearchIcon"></i>
  70. </el-button>
  71. <slot name="otherButton"></slot>
  72. </el-col>
  73. </el-row>
  74. <div v-if="business === 'MAJOR_BUSINESS'" v-show="moreSearchBar" class="moreSearchStyle">
  75. <el-row class="row">
  76. <el-col :xs="24" :sm="12" :lg="3" :span="6">
  77. <el-select v-if="financial" clearable v-model="listQuery.financial" placeholder="金融类型">
  78. <el-option :value="true" label="金融">金融</el-option>
  79. <el-option :value="false" label="非金融">非金融</el-option>
  80. </el-select>
  81. </el-col>
  82. <el-col :xs="24" :sm="12" :lg="3" :span="6" style="margin-right: 8px;">
  83. <el-input v-if="orderId" v-model="listQuery.orderId" placeholder="订单号" clearable>
  84. </el-input>
  85. </el-col>
  86. <el-col :xs="24" :sm="12" :lg="3" :span="6" style="margin-right: 8px;">
  87. <el-input v-if="productionNo" v-model="listQuery.productionNo" placeholder="产品号" clearable>
  88. </el-input>
  89. </el-col>
  90. <el-col :xs="24" :sm="12" :lg="3" :span="6" style="margin-right: 8px;">
  91. <el-input v-if="clientName" v-model="listQuery.clienteleName" placeholder="客户名称" clearable>
  92. </el-input>
  93. </el-col>
  94. <el-col :xs="24" :sm="12" :lg="3" :span="6" style="margin-right: 8px;">
  95. <el-input v-if="clientSubName" v-model="listQuery.clienteleSubName" placeholder="业务来源" clearable>
  96. </el-input>
  97. </el-col>
  98. <el-col :xs="24" :sm="12" :lg="3" :span="6">
  99. <el-select v-if="clientManagerX" clearable filterable v-model="listQuery.clientManagerId"
  100. placeholder="客户经理">
  101. <el-option v-for="(item, id) in clientManagers" :key="id" :label="item.name" :value="item.id" />
  102. </el-select>
  103. </el-col>
  104. <el-col :xs="24" :sm="12" :lg="3" :span="6">
  105. <el-select v-if="principal" v-model="listQuery.principalId" placeholder="负责人" clearable filterable
  106. class="filter-item">
  107. <el-option v-for="(item, id) in principals" :key="id" :label="item.name" :value="item.id" />
  108. </el-select>
  109. </el-col>
  110. <el-col :xs="24" :sm="12" :lg="3" :span="6">
  111. <el-select v-if="businessObjectType" clearable v-model="listQuery.businessObjectType"
  112. placeholder="评估对象类型">
  113. <el-option value="土地" label="土地">土地</el-option>
  114. <el-option value="房地产" label="房地产">房地产</el-option>
  115. </el-select>
  116. </el-col>
  117. <el-col :xs="24" :sm="12" :lg="3" :span="6">
  118. <el-select v-if="department" clearable v-model="listQuery.departmentId" placeholder="接单部门">
  119. <el-option v-for="(d, id) in trunDep" :key="id" :label="d.name" :value="d.id"></el-option>
  120. </el-select>
  121. </el-col>
  122. <el-col :xs="24" :sm="12" :lg="3" :span="6">
  123. <el-select v-if="productionType" clearable v-model="listQuery.production" placeholder="产品类型" @change="searchList">
  124. <el-option value="STATEMENT" label="意见书">意见书</el-option>
  125. <el-option value="REPORT" label="报告">报告</el-option>
  126. <el-option value="LETTER" label="复评函">复评函</el-option>
  127. <el-option value="ORDER" label="订单">订单</el-option>
  128. </el-select>
  129. </el-col>
  130. </el-row>
  131. </div>
  132. <div v-if="business === 'PERSONAL_BUSINESS'" v-show="moreSearchBar" class="moreSearchStyle">
  133. <el-row class="row">
  134. <el-col :xs="24" :sm="12" :lg="3" :span="6" style="margin-right: 8px;">
  135. <el-input v-if="clientName" v-model="listQuery.clientName" placeholder="客户名称" clearable>
  136. </el-input>
  137. </el-col>
  138. <el-col :xs="24" :sm="12" :lg="3" :span="6" style="margin-right: 8px;">
  139. <el-input v-if="clientSubName" v-model="listQuery.clientSubName" placeholder="业务来源" clearable>
  140. </el-input>
  141. </el-col>
  142. <el-col :xs="24" :sm="12" :lg="3" :span="6" style="margin-right: 8px;">
  143. <el-input v-if="clientManager" v-model="listQuery.clientManager" placeholder="客户经理" clearable>
  144. </el-input>
  145. </el-col>
  146. <el-col :xs="24" :sm="12" :lg="3" :span="6" style="margin-right: 8px;">
  147. <el-input v-if="outwardStaffName" v-model="listQuery.outwardStaffName" placeholder="外业人员" clearable>
  148. </el-input>
  149. </el-col>
  150. <el-col :xs="24" :sm="12" :lg="3" :span="6" style="margin-right: 8px;">
  151. <el-input v-if="inwardStaffName" v-model="listQuery.inwardStaffName" placeholder="内业人员" clearable>
  152. </el-input>
  153. </el-col>
  154. <el-col :xs="24" :sm="12" :lg="3" :span="6" style="margin-right: 8px;">
  155. <el-input v-if="pricingStaffName" v-model="listQuery.pricingStaffName" placeholder="定价内业" clearable>
  156. </el-input>
  157. </el-col>
  158. <el-col :xs="24" :sm="12" :lg="3" :span="6" style="margin-right: 8px;">
  159. <el-input v-if="handlerName" v-model="listQuery.handlerName" placeholder="处理人" clearable>
  160. </el-input>
  161. </el-col>
  162. <el-col :xs="24" :sm="12" :lg="3" :span="6" style="margin-right: 8px; margin-top: 10px;">
  163. <el-select v-if="evaluateAim" v-model="listQuery.evaluateAim" placeholder="评估目的" style="width: 100%" clearable>
  164. <el-option label="按揭" value="按揭"></el-option>
  165. <el-option label="抵押" value="抵押"></el-option>
  166. <el-option label="咨询" value="咨询"></el-option>
  167. </el-select>
  168. </el-col>
  169. </el-row>
  170. </div>
  171. </div>
  172. </div>
  173. </template>
  174. <script>
  175. export default {
  176. name: "moreSerachBar",
  177. components: {
  178. },
  179. props: {
  180. listQuery: {
  181. type: Object,
  182. require: false
  183. },
  184. keyword: {
  185. type: Boolean,
  186. require: false,
  187. default: true
  188. },
  189. business: {
  190. type: String,
  191. require: false,
  192. },
  193. financial: {
  194. type: Boolean,
  195. require: false,
  196. default: false
  197. },
  198. nodeCode: {
  199. type: Boolean,
  200. require: false,
  201. default: true
  202. },
  203. clientName: {
  204. type: Boolean,
  205. require: false,
  206. default: true
  207. },
  208. orderId: {
  209. type: Boolean,
  210. require: false,
  211. default: false
  212. },
  213. productionNo: {
  214. type: Boolean,
  215. require: false,
  216. default: false
  217. },
  218. clientManager: {
  219. type: Boolean,
  220. require: false,
  221. default: true
  222. },
  223. principal: {
  224. type: Boolean,
  225. require: false,
  226. default: true
  227. },
  228. department: {
  229. type: Boolean,
  230. require: false,
  231. default: false
  232. },
  233. orderDateSearch: {
  234. type: Boolean,
  235. require: false,
  236. default: true
  237. },
  238. delivery: {
  239. type: Boolean,
  240. require: false,
  241. default: false
  242. },
  243. hasRealAmount: {
  244. type: Boolean,
  245. require: false,
  246. default: false
  247. },
  248. // hasShouldAmount: {
  249. // type: Boolean,
  250. // require: false,
  251. // default: false
  252. // },
  253. businessObjectType: {
  254. type: Boolean,
  255. require: false,
  256. default: true
  257. },
  258. nodes: {
  259. type: Array,
  260. require: false,
  261. default: function () {
  262. return [];
  263. }
  264. },
  265. clientName: {
  266. type: Boolean,
  267. require: false,
  268. default: true
  269. },
  270. clientSubName: {
  271. type: Boolean,
  272. require: false,
  273. default: true
  274. },
  275. clientManagerX: {
  276. type: Boolean,
  277. require: false,
  278. default: true
  279. },
  280. outwardStaffName: {
  281. type: Boolean,
  282. require: false,
  283. default: true
  284. },
  285. inwardStaffName: {
  286. type: Boolean,
  287. require: false,
  288. default: true
  289. },
  290. pricingStaffName: {
  291. type: Boolean,
  292. require: false,
  293. default: true
  294. },
  295. handlerName: {
  296. type: Boolean,
  297. require: false,
  298. default: true
  299. },
  300. productionType: {
  301. type: Boolean,
  302. require: false,
  303. default: false
  304. },
  305. personalRealAmount: {
  306. type: Boolean,
  307. require: false,
  308. default: false
  309. },
  310. productions: {
  311. type: Boolean,
  312. require: false,
  313. default: false
  314. },
  315. cancellation: {
  316. type: Boolean,
  317. require: false,
  318. default: null
  319. },
  320. ifSaveFileQuery: {
  321. type: Boolean,
  322. require: false,
  323. default: false
  324. },
  325. evaluateAim: {
  326. type: Boolean,
  327. require: false,
  328. default: false
  329. },
  330. defaultStartDate:{
  331. type: String,
  332. require: true,
  333. default:null
  334. },
  335. defaultEndDate:{
  336. type: String,
  337. require: true,
  338. default:null
  339. }
  340. },
  341. computed: {
  342. },
  343. created() {
  344. if (this.defaultStartDate && this.defaultEndDate){
  345. this.orderDate = [this.defaultStartDate,this.defaultEndDate];
  346. }
  347. if (this.business === 'MAJOR_BUSINESS') {
  348. this.getMajorTurnDepartment();
  349. this.getAllotDepartmentUser();
  350. this.getClientManager();
  351. }
  352. },
  353. data() {
  354. return {
  355. pickerOptions: {
  356. shortcuts: [{
  357. text: '最近一周',
  358. onClick(picker) {
  359. const end = new Date();
  360. const start = new Date();
  361. start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
  362. picker.$emit('pick', [start, end]);
  363. }
  364. }, {
  365. text: '最近一个月',
  366. onClick(picker) {
  367. const end = new Date();
  368. const start = new Date();
  369. start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
  370. picker.$emit('pick', [start, end]);
  371. }
  372. }, {
  373. text: '最近三个月',
  374. onClick(picker) {
  375. const end = new Date();
  376. const start = new Date();
  377. start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
  378. picker.$emit('pick', [start, end]);
  379. }
  380. }]
  381. },
  382. moreSearchBar: false,
  383. moreSearchIcon: "el-icon-arrow-right",
  384. orderDate: '',
  385. trunDep: [],
  386. allotDepartment: [],
  387. clientManagers: [],
  388. principals: [],
  389. loading: false,
  390. }
  391. },
  392. methods: {
  393. resetSearch() {
  394. // 重置分页
  395. this.loading = true;
  396. this.orderDate = '';
  397. this.$emit('resetParams');
  398. setTimeout(() => {
  399. this.loading = false;
  400. }, 500);
  401. },
  402. searchList() {
  403. // 重置分页
  404. this.loading = true;
  405. this.listQuery.page = 1
  406. this.listQuery.size = 20
  407. if (this.orderDate) {
  408. this.listQuery.startDate = this.orderDate[0] + ' 00:00:00';
  409. this.listQuery.endDate = this.orderDate[1] + ' 23:59:59';
  410. }else {
  411. this.listQuery.startDate = null;
  412. this.listQuery.endDate = null;
  413. }
  414. this.$emit('fliterSearch', this.listQuery);
  415. setTimeout(() => {
  416. this.loading = false;
  417. }, 500);
  418. },
  419. moreSearch() {
  420. this.moreSearchBar = !this.moreSearchBar;
  421. if (this.moreSearchBar) {
  422. this.moreSearchIcon = "el-icon-arrow-down";
  423. } else {
  424. this.moreSearchIcon = "el-icon-arrow-right";
  425. }
  426. },
  427. getMajorTurnDepartment() {
  428. this.$api.department.trunDep("MAJOR_BUSINESS").then(res => {
  429. if (res.code === 200) {
  430. this.trunDep = res.data;
  431. }
  432. })
  433. },
  434. getAllotDepartment() {
  435. this.$api.department.allot(this.business).then(res => {
  436. if (res.code === 200) {
  437. this.allotDepartment = res.data;
  438. }
  439. })
  440. },
  441. getClientManager() {
  442. const post = "客户经理"
  443. this.$api.user.postUser(post).then(res => {
  444. if (res.code === 200) {
  445. this.clientManagers = res.data;
  446. }
  447. })
  448. },
  449. getAllotDepartmentUser() {
  450. const businessType = "MAJOR_BUSINESS"
  451. this.$api.user.allotDepartmentUser(businessType).then(res => {
  452. if (res.code === 200 && res.data != null) {
  453. this.principals = res.data;
  454. }
  455. })
  456. },
  457. }
  458. }
  459. </script>
  460. <style scoped lang="css">
  461. .row {
  462. margin-top: 10px;
  463. }
  464. .bar-container {
  465. width: 1650px;
  466. }
  467. .moreSearchStyle {
  468. animation: scale-in-ver-top .2s cubic-bezier(.25, .46, .45, .94) both
  469. }
  470. @keyframes scale-in-ver-top {
  471. 0% {
  472. transform: scaleY(0);
  473. transform-origin: 100% 0;
  474. opacity: 1
  475. }
  476. 100% {
  477. transform: scaleY(1);
  478. transform-origin: 100% 0;
  479. opacity: 1
  480. }
  481. }
  482. </style>