29a8a8bec305e8966dfe2d2f7554cebbd16de415.svn-base 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. <template>
  2. <div class="app-container common-list-page">
  3. <el-tabs v-model="activeName" @tab-click="handleClick">
  4. <el-tab-pane :label="sumAmountDCL" name="first">
  5. <el-table :data="listDCL" :row-style="rowStyle" :cell-style="cellStyle" :show-header="false" @cell-click="cellClickDCL">
  6. <el-table-column prop="remark" min-width="180" />
  7. <el-table-column prop="repairCode" min-width="180" />
  8. <el-table-column prop="mesTime" min-width="180" />
  9. </el-table>
  10. <pagination v-show="totalDCL>0" :total="totalDCL" :page.sync="getdataListParmDCL.offset" :limit.sync="getdataListParmDCL.pagecount" @pagination="getListDCL" />
  11. </el-tab-pane>
  12. <el-tab-pane :label="sumAmountAll" name="second">
  13. <el-table :data="listAll" :row-style="rowStyle" :cell-style="cellStyle" :show-header="false">
  14. <el-table-column prop="remark" min-width="180" />
  15. <el-table-column prop="repairCode" min-width="180" />
  16. <el-table-column prop="mesTime" min-width="180" />
  17. </el-table>
  18. <pagination v-show="totalAll>0" :total="totalAll" :page.sync="getdataListParmAll.offset" :limit.sync="getdataListParmAll.pagecount" @pagination="getListALL" />
  19. </el-tab-pane>
  20. <el-tab-pane :label="sumAmountYCL" name="third">
  21. <el-table :data="listYCL" :row-style="rowStyle" :cell-style="cellStyle" :show-header="false">
  22. <el-table-column prop="remark" min-width="180" />
  23. <el-table-column prop="repairCode" min-width="180" />
  24. <el-table-column prop="mesTime" min-width="180" />
  25. </el-table>
  26. <pagination v-show="totalYCL>0" :total="totalYCL" :page.sync="getdataListParmYCL.offset" :limit.sync="getdataListParmYCL.pagecount" @pagination="getListYCL" />
  27. </el-tab-pane>
  28. </el-tabs>
  29. </div>
  30. </template>
  31. <script>
  32. import { GetDataByName } from '@/api/common'
  33. import Pagination from '@/components/Pagination'
  34. import Cookies from 'js-cookie'
  35. export default {
  36. components: { Pagination },
  37. data() {
  38. return {
  39. activeName: 'first',
  40. rowStyle: { maxHeight: 40 + 'px', height: 35 + 'px' },
  41. cellStyle: { padding: 0 + 'px' },
  42. tableKey: 0,
  43. getNoMesCountParm: {
  44. name: 'getNoMesCount',
  45. parammaps: {
  46. empId: this.$store.state.user.employeid,
  47. pastureId: this.$store.state.user.pastureid,
  48. deptId: this.$store.state.user.departmentid
  49. }
  50. },
  51. sumAmountDCL: null,
  52. getAllMesCountParm: {
  53. name: 'getAllMesCount',
  54. parammaps: {
  55. empId: this.$store.state.user.employeid,
  56. pastureId: this.$store.state.user.pastureid,
  57. deptId: this.$store.state.user.departmentid
  58. }
  59. },
  60. sumAmountAll: '',
  61. getMesCountParm: {
  62. name: 'getMesCount',
  63. parammaps: {
  64. empId: this.$store.state.user.employeid,
  65. pastureId: this.$store.state.user.pastureid,
  66. deptId: this.$store.state.user.departmentid
  67. }
  68. },
  69. sumAmountYCL: '',
  70. // 待处理
  71. getdataListParmDCL: {
  72. name: 'getNoMesList',
  73. page: 1,
  74. offset: 1,
  75. pagecount: 10,
  76. returntype: 'Map',
  77. parammaps: {
  78. empId: this.$store.state.user.employeid,
  79. pastureId: this.$store.state.user.pastureid,
  80. deptId: this.$store.state.user.departmentid
  81. }
  82. },
  83. listDCL: [],
  84. totalDCL: 0,
  85. pageNumDCL: '',
  86. pageSizeDCL: '',
  87. listLoadingDCL: true,
  88. // 全部
  89. getdataListParmAll: {
  90. name: 'getAllMesList',
  91. page: 1,
  92. offset: 1,
  93. pagecount: 10,
  94. returntype: 'Map',
  95. parammaps: {
  96. empId: this.$store.state.user.employeid,
  97. pastureId: this.$store.state.user.pastureid,
  98. deptId: this.$store.state.user.departmentid
  99. }
  100. },
  101. listAll: [],
  102. totalAll: 0,
  103. pageNumAll: '',
  104. pageSizeAll: '',
  105. listLoadingAll: true,
  106. // 已处理
  107. getdataListParmYCL: {
  108. name: 'getMesList',
  109. page: 1,
  110. offset: 1,
  111. pagecount: 10,
  112. returntype: 'Map',
  113. parammaps: {
  114. empId: this.$store.state.user.employeid,
  115. pastureId: this.$store.state.user.pastureid,
  116. deptId: this.$store.state.user.departmentid
  117. }
  118. },
  119. listYCL: [],
  120. totalYCL: 0,
  121. pageNumYCL: '',
  122. pageSizeYCL: '',
  123. listLoadingYCL: true
  124. }
  125. },
  126. created() {
  127. this.getListDCL()
  128. this.getNoMesCount()
  129. this.getAllMesCount()
  130. this.getMesCount()
  131. },
  132. methods: {
  133. // 待处理消息
  134. getNoMesCount() {
  135. GetDataByName(this.getNoMesCountParm).then(response => {
  136. console.log('待处理数据', response.data.list)
  137. this.sumAmountDCL = '待处理(' + response.data.list[0].sumAmount + ')'
  138. })
  139. },
  140. // 全部消息
  141. getAllMesCount() {
  142. GetDataByName(this.getAllMesCountParm).then(response => {
  143. console.log('全部数据', response.data.list)
  144. this.sumAmountAll = '全部数据(' + response.data.list[0].sumAmount + ')'
  145. })
  146. },
  147. // 已处理消息
  148. getMesCount() {
  149. GetDataByName(this.getMesCountParm).then(response => {
  150. console.log('已处理', response.data.list)
  151. this.sumAmountYCL = '已处理(' + response.data.list[0].sumAmount + ')'
  152. })
  153. },
  154. handleClick(tab) {
  155. if (tab.name === 'second') {
  156. this.getListALL()
  157. } else if (tab.name === 'third') {
  158. this.getListYCL()
  159. } else {
  160. this.getListDCL()
  161. }
  162. },
  163. // 待处理table
  164. getListDCL() {
  165. this.listLoadingDCL = true
  166. GetDataByName(this.getdataListParmDCL).then(response => {
  167. console.log('待处理table数据', response.data.list)
  168. this.listDCL = response.data.list
  169. this.pageNumDCL = response.data.pageNum
  170. this.pageSizeDCL = response.data.pageSize
  171. this.totalDCL = response.data.total
  172. setTimeout(() => {
  173. this.listLoadingDCL = false
  174. }, 100)
  175. })
  176. },
  177. // 全部
  178. getListALL() {
  179. this.listLoadingAll = true
  180. GetDataByName(this.getdataListParmAll).then(response => {
  181. console.log('全部table数据', response.data.list)
  182. this.listAll = response.data.list
  183. this.pageNumAll = response.data.pageNum
  184. ths.ageSizAll = response.data.pageSize
  185. if (response.data.total) {
  186. this.totalAll = response.data.total
  187. }
  188. setTimeout(() => {
  189. this.listLoadingAll = false
  190. }, 100)
  191. })
  192. },
  193. // 已处理
  194. getListYCL() {
  195. this.listLoadingYCL = true
  196. GetDataByName(this.getdataListParmYCL).then(response => {
  197. console.log('已处理table数据', response.data.list)
  198. this.listYCL = response.data.list
  199. this.paNumYCL = response.data.pageNum
  200. this.pageSizeYCL = response.data.pageSize
  201. this.totalYCL = response.data.total
  202. setTimeout(() => {
  203. this.listLoadingYCL = false
  204. }, 100)
  205. })
  206. },
  207. // 行点击
  208. cellClickDCL(row) {
  209. console.log(row.remark)
  210. var regex1 = /\【(.+?)\】/g
  211. var value = (row.remark).match(regex1)[0]
  212. var routerName = value.substring(1, value.length - 1)
  213. if (routerName === '合同审核') {
  214. this.$router.push('/customs/Contract')
  215. } else if (routerName === '申购审核') {
  216. this.$router.push('/customs/Subscribe')
  217. } else if (routerName === '采购配单') {
  218. this.$router.push('/customs/Purchase')
  219. } else if (routerName === '领用审核') {
  220. this.$router.push('/customs/Receive')
  221. } else if (routerName === '退货审核') {
  222. this.$router.push('/customs/Returngoods')
  223. } else if (routerName === '设备审核') {
  224. this.$router.push({ path: '/asset/Basics', query: { tabName: 'second' }})
  225. } else if (routerName === '设备保养' || routerName === '保养审核') {
  226. this.$router.push('/maintenance/Maintain')
  227. } else if (routerName === '维修接单' || routerName === '维修派单' || routerName === '维修审核') {
  228. this.$router.push('/maintenance/Repair')
  229. } else if (routerName === '备件审核') {
  230. this.$router.push({ path: '/customs/Basic', query: { tabName: 'second' }})
  231. } else if (routerName === '配单审核') {
  232. this.$router.push({ path: '/customs/Purchase', query: { activeName: 'fouth' }})
  233. }
  234. }
  235. }
  236. }
  237. </script>
  238. <style lang="scss" scoped>
  239. </style>