index.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472
  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-row>
  163. </div>
  164. </div>
  165. </div>
  166. </template>
  167. <script>
  168. export default {
  169. name: "moreSerachBar",
  170. components: {
  171. },
  172. props: {
  173. listQuery: {
  174. type: Object,
  175. require: false
  176. },
  177. keyword: {
  178. type: Boolean,
  179. require: false,
  180. default: true
  181. },
  182. business: {
  183. type: String,
  184. require: false,
  185. },
  186. financial: {
  187. type: Boolean,
  188. require: false,
  189. default: false
  190. },
  191. nodeCode: {
  192. type: Boolean,
  193. require: false,
  194. default: true
  195. },
  196. clientName: {
  197. type: Boolean,
  198. require: false,
  199. default: true
  200. },
  201. orderId: {
  202. type: Boolean,
  203. require: false,
  204. default: false
  205. },
  206. productionNo: {
  207. type: Boolean,
  208. require: false,
  209. default: false
  210. },
  211. clientManager: {
  212. type: Boolean,
  213. require: false,
  214. default: true
  215. },
  216. principal: {
  217. type: Boolean,
  218. require: false,
  219. default: true
  220. },
  221. department: {
  222. type: Boolean,
  223. require: false,
  224. default: false
  225. },
  226. orderDateSearch: {
  227. type: Boolean,
  228. require: false,
  229. default: true
  230. },
  231. delivery: {
  232. type: Boolean,
  233. require: false,
  234. default: false
  235. },
  236. hasRealAmount: {
  237. type: Boolean,
  238. require: false,
  239. default: false
  240. },
  241. // hasShouldAmount: {
  242. // type: Boolean,
  243. // require: false,
  244. // default: false
  245. // },
  246. businessObjectType: {
  247. type: Boolean,
  248. require: false,
  249. default: true
  250. },
  251. nodes: {
  252. type: Array,
  253. require: false,
  254. default: function () {
  255. return [];
  256. }
  257. },
  258. clientName: {
  259. type: Boolean,
  260. require: false,
  261. default: true
  262. },
  263. clientSubName: {
  264. type: Boolean,
  265. require: false,
  266. default: true
  267. },
  268. clientManagerX: {
  269. type: Boolean,
  270. require: false,
  271. default: true
  272. },
  273. outwardStaffName: {
  274. type: Boolean,
  275. require: false,
  276. default: true
  277. },
  278. inwardStaffName: {
  279. type: Boolean,
  280. require: false,
  281. default: true
  282. },
  283. pricingStaffName: {
  284. type: Boolean,
  285. require: false,
  286. default: true
  287. },
  288. handlerName: {
  289. type: Boolean,
  290. require: false,
  291. default: true
  292. },
  293. productionType: {
  294. type: Boolean,
  295. require: false,
  296. default: false
  297. },
  298. personalRealAmount: {
  299. type: Boolean,
  300. require: false,
  301. default: false
  302. },
  303. productions: {
  304. type: Boolean,
  305. require: false,
  306. default: false
  307. },
  308. cancellation: {
  309. type: Boolean,
  310. require: false,
  311. default: null
  312. },
  313. ifSaveFileQuery: {
  314. type: Boolean,
  315. require: false,
  316. default: false
  317. },
  318. },
  319. computed: {
  320. },
  321. created() {
  322. if (this.business === 'MAJOR_BUSINESS') {
  323. this.getMajorTurnDepartment();
  324. this.getAllotDepartmentUser();
  325. this.getClientManager();
  326. }
  327. },
  328. data() {
  329. return {
  330. pickerOptions: {
  331. shortcuts: [{
  332. text: '最近一周',
  333. onClick(picker) {
  334. const end = new Date();
  335. const start = new Date();
  336. start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
  337. picker.$emit('pick', [start, end]);
  338. }
  339. }, {
  340. text: '最近一个月',
  341. onClick(picker) {
  342. const end = new Date();
  343. const start = new Date();
  344. start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
  345. picker.$emit('pick', [start, end]);
  346. }
  347. }, {
  348. text: '最近三个月',
  349. onClick(picker) {
  350. const end = new Date();
  351. const start = new Date();
  352. start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
  353. picker.$emit('pick', [start, end]);
  354. }
  355. }]
  356. },
  357. moreSearchBar: false,
  358. moreSearchIcon: "el-icon-arrow-right",
  359. orderDate: '',
  360. trunDep: [],
  361. allotDepartment: [],
  362. clientManagers: [],
  363. principals: [],
  364. loading: false
  365. }
  366. },
  367. methods: {
  368. resetSearch() {
  369. // 重置分页
  370. this.loading = true;
  371. this.orderDate = '';
  372. this.$emit('resetParams');
  373. setTimeout(() => {
  374. this.loading = false;
  375. }, 500);
  376. },
  377. searchList() {
  378. // 重置分页
  379. this.loading = true;
  380. this.listQuery.page = 1
  381. this.listQuery.size = 20
  382. if (this.orderDate) {
  383. this.listQuery.startDate = this.orderDate[0] + ' 00:00:00';
  384. this.listQuery.endDate = this.orderDate[1] + ' 23:59:59';
  385. }
  386. this.$emit('fliterSearch', this.listQuery);
  387. setTimeout(() => {
  388. this.loading = false;
  389. }, 500);
  390. },
  391. moreSearch() {
  392. this.moreSearchBar = !this.moreSearchBar;
  393. if (this.moreSearchBar) {
  394. this.moreSearchIcon = "el-icon-arrow-down";
  395. } else {
  396. this.moreSearchIcon = "el-icon-arrow-right";
  397. }
  398. },
  399. getMajorTurnDepartment() {
  400. this.$api.department.trunDep("MAJOR_BUSINESS").then(res => {
  401. if (res.code === 200) {
  402. this.trunDep = res.data;
  403. }
  404. })
  405. },
  406. getAllotDepartment() {
  407. this.$api.department.allot(this.business).then(res => {
  408. if (res.code === 200) {
  409. this.allotDepartment = res.data;
  410. }
  411. })
  412. },
  413. getClientManager() {
  414. const post = "客户经理"
  415. this.$api.user.postUser(post).then(res => {
  416. if (res.code === 200) {
  417. this.clientManagers = res.data;
  418. }
  419. })
  420. },
  421. getAllotDepartmentUser() {
  422. const businessType = "MAJOR_BUSINESS"
  423. this.$api.user.allotDepartmentUser(businessType).then(res => {
  424. if (res.code === 200 && res.data != null) {
  425. this.principals = res.data;
  426. }
  427. })
  428. }
  429. }
  430. }
  431. </script>
  432. <style scoped lang="css">
  433. .row {
  434. margin-top: 10px;
  435. }
  436. .bar-container {
  437. width: 1650px;
  438. }
  439. .moreSearchStyle {
  440. animation: scale-in-ver-top .2s cubic-bezier(.25, .46, .45, .94) both
  441. }
  442. @keyframes scale-in-ver-top {
  443. 0% {
  444. transform: scaleY(0);
  445. transform-origin: 100% 0;
  446. opacity: 1
  447. }
  448. 100% {
  449. transform: scaleY(1);
  450. transform-origin: 100% 0;
  451. opacity: 1
  452. }
  453. }
  454. </style>