index.vue 18 KB

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