index.vue 18 KB

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