departmentTodoList.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316
  1. <template>
  2. <div class="app-container">
  3. <div class="title-container">
  4. <breadcrumb id="breadcrumb-container" class="breadcrumb-container" />
  5. </div>
  6. <y-page-list-layout :page-list="pageData" :page-para="listQuery" :get-page-list="selectPage">
  7. <template slot="left">
  8. <el-input style="margin-left: 20px;width: 300px;float: left;" class="filter-item"
  9. v-model="listQuery.keyWord" placeholder="项目编号/报告号/项目名称/业务来源" clearable>
  10. </el-input>
  11. <el-select v-model="listQuery.principalId" filterable placeholder="项目负责人(可搜索)"
  12. style=" width: 200px;margin-left: 10px;float: left;">
  13. <el-option v-for="(u, id) in allUsers" :label="u.name" :value="u.id"></el-option>
  14. </el-select>
  15. <el-select v-model="listQuery.clientManagerId" filterable placeholder="客户经理(可搜索)"
  16. style=" width: 200px;margin-left: 10px;float: left;">
  17. <el-option v-for="(u, id) in allUsers" :label="u.name" :value="u.id"></el-option>
  18. </el-select>
  19. <el-select v-model="listQuery.assetsBusinessGener" filterable placeholder="业务类型"
  20. style=" width: 200px;margin-left: 10px;float: left;">
  21. <el-option v-for="(s, value) in assetsBusinessGeners" :label="s.label" :value="s.value"></el-option>
  22. </el-select>
  23. <el-select v-model="listQuery.nodeCode" filterable placeholder="流程节点(可搜索)"
  24. style=" width: 200px;margin-left: 10px;float: left;">
  25. <el-option v-for="item in nodes" :label="item.name" :value="item.code">
  26. </el-option>
  27. </el-select>
  28. <el-select v-model="listQuery.departmentId" filterable placeholder="接单部门"
  29. style=" width: 200px;margin-left: 10px;float: left;">
  30. <el-option v-for="(d, id) in allotDepartment" :label="d.name" :value="d.id"></el-option>
  31. </el-select>
  32. <el-button class="filter-item" style="margin-left: 10px;float: left;" type="primary" @click="searchList"
  33. round>搜索
  34. </el-button>
  35. <el-button class="filter-item" style="float: left;" round type="success" @click="resetParams()">重置
  36. </el-button>
  37. </template>
  38. <parentTable ref="table" v-loading="listLoading" :data="pageData.records" slot="table" style="width: 100%;">
  39. <el-table-column label="项目编号" align="center" width="150">
  40. <template slot-scope="{row}">
  41. <span>{{ row.orderId }}</span>
  42. </template>
  43. </el-table-column>
  44. <el-table-column label="分单类型" align="center" width="150">
  45. <template slot-scope="{row}">
  46. <span>{{ row.allotType }}</span>
  47. </template>
  48. </el-table-column>
  49. <el-table-column label="意见书号" align="center" width="250">
  50. <template slot-scope="{row}">
  51. <span>{{ row.statementNo == null ? '-' : row.statementNo }}</span>
  52. </template>
  53. </el-table-column>
  54. <el-table-column label="报告号" align="center" width="250">
  55. <template slot-scope="{row}">
  56. <span>{{ row.reportNo == null ? '-' : row.reportNo }}</span>
  57. </template>
  58. </el-table-column>
  59. <el-table-column label="项目名称" align="center" width="250">
  60. <template slot-scope="{row}">
  61. <span>{{ row.reportName || row.statementName || row.name }}</span>
  62. </template>
  63. </el-table-column>
  64. <el-table-column label="业务类型" align="center" width="150">
  65. <template slot-scope="{row}">
  66. <span>{{ row.assetsBusinessGener }}</span>
  67. </template>
  68. </el-table-column>
  69. <el-table-column label="客户名称" align="center" width="150">
  70. <template slot-scope="{row}">
  71. <span>{{ row.customerName }}</span>
  72. </template>
  73. </el-table-column>
  74. <el-table-column label="业务来源" align="center" width="150">
  75. <template slot-scope="{row}">
  76. <span>{{ row.customerSubName }}</span>
  77. </template>
  78. </el-table-column>
  79. <el-table-column label="委托人" align="center" width="150">
  80. <template slot-scope="{row}">
  81. <span>{{ row.bailor == null ? '-' : row.bailor }}</span>
  82. </template>
  83. </el-table-column>
  84. <el-table-column label="委托人联系电话" align="center" width="150">
  85. <template slot-scope="{row}">
  86. <span>{{ row.bailorContactTel == null ? '-' : row.bailorContactTel }}</span>
  87. </template>
  88. </el-table-column>
  89. <el-table-column label="当前节点" align="center" width="150">
  90. <template slot-scope="{row}">
  91. <span>{{ row.currentNodeName }}</span>
  92. </template>
  93. </el-table-column>
  94. <el-table-column label="当前节点负责人" align="center" width="150">
  95. <template slot-scope="{row}">
  96. <span>{{ row.handlerName }}</span>
  97. </template>
  98. </el-table-column>
  99. <el-table-column label="项目负责人" align="center" width="150">
  100. <template slot-scope="{row}">
  101. <span>{{ row.principalName }}</span>
  102. </template>
  103. </el-table-column>
  104. <el-table-column label="客户经理" align="center" width="150">
  105. <template slot-scope="{row}">
  106. <span>{{ row.clientManagerName }}</span>
  107. </template>
  108. </el-table-column>
  109. <el-table-column label="操作" align="center" width="100" fixed="right">
  110. <template slot-scope="{row}">
  111. <el-button type="text" @click="orderViewDetail(row)">查看</el-button>
  112. <el-button v-if="row.handlerId === $store.getters.userInfo.id" type="text"
  113. @click="orderDetail(row)">任务处理</el-button>
  114. </template>
  115. </el-table-column>
  116. </parentTable>
  117. </y-page-list-layout>
  118. </div>
  119. </template>
  120. <script>
  121. import YPageListLayout from '@/components/YPageListLayout'
  122. import Breadcrumb from '@/components/Breadcrumb'
  123. export default {
  124. name: 'AssetsDepartmentToDoList',
  125. components: {
  126. Breadcrumb,
  127. YPageListLayout,
  128. },
  129. data() {
  130. return {
  131. pageData: { records: [] },
  132. listLoading: false,
  133. listQuery: {
  134. page: 1,
  135. size: 10,
  136. current: 1,
  137. // 节点code
  138. nodeCode: null,
  139. // 客户经理id
  140. clientManagerId: null,
  141. // 项目负责人id
  142. principalId: null,
  143. // 业务类型
  144. assetsBusinessGener: null,
  145. // 关键字
  146. keyWord: null,
  147. // 处理人id
  148. handlerId: null,
  149. //是否以部门id查询
  150. selectByDepartment: true,
  151. departmentId: null
  152. },
  153. // 接单部门
  154. allotDepartment: [],
  155. // 用户下拉列表
  156. allUsers: [],
  157. // 节点信息下拉列表
  158. nodes: [],
  159. // 业务类型下拉列表
  160. assetsBusinessGeners: [
  161. {
  162. value: '企业价值',
  163. label: '企业价值'
  164. }, {
  165. value: '单项资产',
  166. label: '单项资产'
  167. }, {
  168. value: '资产组合',
  169. label: '资产组合'
  170. }, {
  171. value: '无形资产',
  172. label: '无形资产'
  173. }, {
  174. value: '森林资源资产',
  175. label: '森林资源资产'
  176. }, {
  177. value: '珠宝首饰艺术品',
  178. label: '珠宝首饰艺术品'
  179. }, {
  180. value: '其他资产评估',
  181. label: '其他资产评估'
  182. }
  183. ]
  184. }
  185. },
  186. created() {
  187. // 获取用户下拉列表
  188. this.getAllUser();
  189. // 获取节点下拉列表
  190. this.getNodes();
  191. // 获取分单部门
  192. this.getAllotDepartment();
  193. // 获取资产业务订单
  194. this.selectPage();
  195. },
  196. methods: {
  197. // 当前用户所属部门的待办分页查询
  198. selectPage() {
  199. this.listLoading = true;
  200. this.listQuery.selectByDepartment = true;
  201. this.$api.assets.selectPage(this.listQuery).then(res => {
  202. if (res.code === 200) {
  203. this.pageData = res.data;
  204. }
  205. this.listLoading = false;
  206. })
  207. },
  208. // 条件查询
  209. searchList() {
  210. // 重置分页
  211. this.listQuery.page = 1
  212. this.listQuery.size = 10
  213. this.selectPage()
  214. },
  215. // 重置搜索条件
  216. resetParams() {
  217. this.$router.push({ query: {} });
  218. this.listQuery = {
  219. current: 1,
  220. size: 10,
  221. }
  222. this.selectPage();
  223. },
  224. // 获取所有用户下拉列表
  225. getAllUser() {
  226. this.$api.user.simpleAll().then(res => {
  227. if (res.code === 200) {
  228. this.allUsers = res.data;
  229. }
  230. })
  231. },
  232. getNodes() {
  233. this.$api.workNode.enum().then(res => {
  234. if (res.code === 200) {
  235. this.nodes = res.data
  236. }
  237. })
  238. },
  239. orderDetail(row) {
  240. if (row.currentNodeCode === 'REPORT_OUT_APPLY') {
  241. this.$router.push(`/assets/myOrderList`)
  242. return;
  243. } else if (row.currentNodeCode === 'REPORT_OUT_DEPARTMENT_CHECK') {
  244. this.$router.push(`/out/warehouse/check?todoBusinessId=${row.assetsId}&sNo=${row.statementNo}&rNo=${row.reportNo}&tId=${row.recordId}&cId=${row.currentNodeId}&nCode=${row.currentNodeCode}&businessType=ASSET_BUSINESS`)
  245. return;
  246. } else {
  247. // 根据节点预设需要激活的tab页面
  248. let activeTabName = 'baseInfo';
  249. if (row.currentNodeCode === 'DEPARTMENT_ALLOCATION') {
  250. activeTabName = 'members';
  251. } else if (row.currentNodeCode === 'SPOT_RECONNAISSANCE_DETERMINE_PRICE'
  252. || row.currentNodeCode === 'ASSET_REPORT_TAKE_NO'
  253. || row.currentNodeCode === 'GENERATE_STATEMENT'
  254. || row.currentNodeCode === 'WRITE_REPORT'
  255. || row.currentNodeCode === 'REVIEW_STATEMENT'
  256. || row.currentNodeCode === 'CHECK_REPORT') {
  257. activeTabName = 'target';
  258. } else if (row.currentNodeCode === 'REEXAMINE_STATEMENT'
  259. || row.currentNodeCode === 'RECHECK_REPORT'
  260. || row.currentNodeCode === 'FOURTH_CHECK_REPORT'
  261. || row.currentNodeCode === 'STATEMENT_IN'
  262. || row.currentNodeCode === 'STATEMENT_OUT'
  263. || row.currentNodeCode === 'REPORT_IN'
  264. || row.currentNodeCode === 'REPORT_OUT') {
  265. activeTabName = 'production';
  266. }
  267. const newRow = {
  268. assetsId: row.assetsId,
  269. statementNo: row.statementNo,
  270. reportNo: row.reportNo,
  271. }
  272. this.$router.push({
  273. path: "/assets/orderDetail",
  274. query: {
  275. row: JSON.stringify(newRow),
  276. back: '/assets/department/todoList',
  277. couldEdit: true,
  278. couldBack: true,
  279. disabledStatus: false,
  280. activeTabName: activeTabName
  281. }
  282. })
  283. }
  284. },
  285. orderViewDetail(row) {
  286. const newRow = {
  287. assetsId: row.assetsId,
  288. statementNo: row.statementNo,
  289. reportNo: row.reportNo,
  290. }
  291. this.$router.push({
  292. path: "/assets/orderDetail",
  293. query: {
  294. row: JSON.stringify(newRow),
  295. back: '/assets/department/todoList',
  296. couldEdit: false,
  297. couldBack: false,
  298. disabledStatus: true
  299. }
  300. })
  301. },
  302. // 获取部门下拉列表
  303. getAllotDepartment() {
  304. this.$api.department.allot('ASSET_BUSINESS').then(res => {
  305. if (res.code === 200) {
  306. this.allotDepartment = res.data;
  307. }
  308. })
  309. }
  310. }
  311. }
  312. </script>
  313. <style lang="scss" scoped></style>