index.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  1. <template>
  2. <div style="overflow-y: auto">
  3. <el-card class="box-card">
  4. <div slot="header">
  5. <span>
  6. <i class="icon icon-table2"></i> 待办/已办
  7. </span>
  8. <el-form ref="form" :inline="true" style="float: right; margin-top: -10px">
  9. <el-form-item label="类型">
  10. <el-select size="mini" style="width:100px" v-model="searchForm.Type" placeholder="准入类别">
  11. <el-option label="全部" value=""></el-option>
  12. <el-option label="准入" value="1"></el-option>
  13. <el-option label="增项" value="2"></el-option>
  14. <el-option label="年审" value="3"></el-option>
  15. <el-option label="信息变更" value="4"></el-option>
  16. <el-option label="资质变更" value="5"></el-option>
  17. </el-select>
  18. </el-form-item>
  19. <el-form-item label="类别">
  20. <el-select size="mini" style="width:100px" v-model="searchForm.SupplierTypeCode" placeholder="准入类别">
  21. <el-option label="全部" value=""></el-option>
  22. <el-option label="物资类" value="01"></el-option>
  23. <el-option label="基建类" value="02"></el-option>
  24. <el-option label="技术服务类" value="03"></el-option>
  25. </el-select>
  26. </el-form-item>
  27. <el-form-item label="公司名称">
  28. <el-input size="mini" v-model="searchForm.SupplierName" placeholder="请输入" style="width: 100%"></el-input>
  29. </el-form-item>
  30. <el-form-item>
  31. <el-button size="mini" type="primary" @click="handleSearch">查 询</el-button>
  32. </el-form-item>
  33. </el-form>
  34. </div>
  35. <el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
  36. <el-tab-pane label="待办任务" name="first">
  37. <el-table
  38. :data="entityList"
  39. size="mini"
  40. border
  41. :stripe="true"
  42. style="width: 100%">
  43. <!--<el-table-column type="index" label="序号"></el-table-column>-->
  44. <el-table-column label="待办类型" prop="Type">
  45. <template slot-scope="scope">
  46. <span v-if="scope.row.Type=='1'" style="color:#E6A23C">准入</span>
  47. <span v-if="scope.row.Type=='2'" style="color:#E6A23C">增项</span>
  48. <span v-if="scope.row.Type=='3'" style="color:#E6A23C">年审</span>
  49. <span v-if="scope.row.Type=='4'" style="color:#E6A23C">信息变更</span>
  50. <span v-if="scope.row.Type=='5'" style="color:#E6A23C">资质变更</span>
  51. </template>
  52. </el-table-column>
  53. <el-table-column label="类别" prop="SupplierTypeCode">
  54. <template slot-scope="scope">
  55. <span v-if="scope.row.SupplierTypeCode=='01'">物资类</span>
  56. <span v-if="scope.row.SupplierTypeCode=='02'">基建类</span>
  57. <span v-if="scope.row.SupplierTypeCode=='03'">技术服务类</span>
  58. </template>
  59. </el-table-column>
  60. <el-table-column label="公司名称" prop="SupplierName"></el-table-column>
  61. <el-table-column label="执行人" prop="UserName"></el-table-column>
  62. <el-table-column label="操作" width="130" align="center" fixed="right">
  63. <template slot-scope="scope">
  64. <el-button type="text" title="办理" icon="el-icon-edit" size="mini" @click="rowClick(scope.row)">办理</el-button>
  65. <!--<el-button type="text" title="编辑" icon="el-icon-s-promotion" size="mini">跟踪</el-button>-->
  66. </template>
  67. </el-table-column>
  68. </el-table>
  69. </el-tab-pane>
  70. <el-tab-pane label="已办任务" name="second">
  71. <el-table
  72. :data="entityList"
  73. size="mini"
  74. border
  75. :stripe="true"
  76. style="width: 100%">
  77. <el-table-column label="已办类型" prop="Type">
  78. <template slot-scope="scope">
  79. <span v-if="scope.row.Type=='1'" style="color:#E6A23C">准入</span>
  80. <span v-if="scope.row.Type=='2'" style="color:#E6A23C">增项</span>
  81. <span v-if="scope.row.Type=='3'" style="color:#E6A23C">年审</span>
  82. <span v-if="scope.row.Type=='4'" style="color:#E6A23C">信息变更</span>
  83. <span v-if="scope.row.Type=='5'" style="color:#E6A23C">资质变更</span>
  84. </template>
  85. </el-table-column>
  86. <el-table-column label="类别" prop="SupplierTypeCode">
  87. <template slot-scope="scope">
  88. <span v-if="scope.row.SupplierTypeCode=='01'">物资类</span>
  89. <span v-if="scope.row.SupplierTypeCode=='02'">基建类</span>
  90. <span v-if="scope.row.SupplierTypeCode=='03'">技术服务类</span>
  91. </template>
  92. </el-table-column>
  93. <el-table-column label="公司名称" prop="SupplierName"></el-table-column>
  94. <el-table-column label="执行人" prop="UserName"></el-table-column>
  95. <el-table-column label="操作" width="130" align="center" fixed="right">
  96. <template slot-scope="scope">
  97. <el-button type="text" title="打开" icon="el-icon-edit" size="mini" @click="rowClick(scope.row)">打开</el-button>
  98. <!--<el-button type="text" title="编辑" icon="el-icon-s-promotion" size="mini">跟踪</el-button>-->
  99. </template>
  100. </el-table-column>
  101. </el-table>
  102. </el-tab-pane>
  103. </el-tabs>
  104. </el-card>
  105. </div>
  106. </template>
  107. <script>
  108. import api from '@/api/oilsupplier/supplier'
  109. import {
  110. mapGetters
  111. } from 'vuex'
  112. export default {
  113. name: 'index',
  114. computed: mapGetters({
  115. authUser: 'authUser'
  116. }),
  117. data () {
  118. return {
  119. tabindex: '',
  120. activeName: 'first',
  121. currentDate: new Date(),
  122. // 查询时间
  123. CreateOn: [],
  124. // 分页参数
  125. size: 10,
  126. currentPage: 1,
  127. currentItemCount: 0,
  128. // 列表排序
  129. Column: {
  130. Order: '',
  131. Prop: ''
  132. },
  133. // 查询项
  134. searchForm: {
  135. Id: '',
  136. Type: '',
  137. SupplierTypeCode: '',
  138. SupplierName: '',
  139. IsPay: '1',
  140. CreateOn: '',
  141. CreateUserId: '',
  142. CreateBy: '',
  143. ModifiedOn: '',
  144. ModifiedUserId: '',
  145. ModifiedBy: ''
  146. },
  147. entityList: []
  148. }
  149. },
  150. created () {
  151. this.initDatas()
  152. },
  153. methods: {
  154. handleSearch () {
  155. this.currentPage = 1
  156. if (this.tabindex === '0') {
  157. this.initDatas()
  158. } else {
  159. this.finishedData()
  160. }
  161. this.initDatas()
  162. },
  163. handleClick (tab) {
  164. this.tabindex = tab.index
  165. if (tab.index === '0') {
  166. this.initDatas()
  167. } else {
  168. this.finishedData()
  169. }
  170. },
  171. rowClick (val) {
  172. let SupplierType = ''
  173. if (val.Type === '1') {
  174. if (val.SupplierTypeCode === '01') {
  175. SupplierType = 'goodsedit'
  176. } else if (val.SupplierTypeCode === '02') {
  177. SupplierType = 'basisedit'
  178. } else {
  179. SupplierType = 'techedit'
  180. }
  181. this.$router.push('oilsupplier/supplieraudit/' + val.Id + '/' + SupplierType + '?certid=' + val.CertId)
  182. } else if (val.Type === '2') {
  183. if (val.SupplierTypeCode === '01') {
  184. SupplierType = 'goodsdataopera'
  185. } else if (val.SupplierTypeCode === '02') {
  186. SupplierType = 'basisdataopera'
  187. } else {
  188. SupplierType = 'techdataopera'
  189. }
  190. this.$router.push('oilsupplier/addtionaudit/' + val.Id + '/' + SupplierType)
  191. } else if (val.Type === '3') {
  192. this.$router.push('oilsupplier/annualaudit/' + val.SupplierId + '/auditoperation?certid=' + val.CertId + '&WorkflowId=' + val.WorkflowId + '&AnnualStatus=' + val.Status + '&annualId=' + val.Id + '&Step=' + val.Step)
  193. // /oilsupplier/annualaudit/' + scope.row.SupplierId + '/auditoperation?certid=' + scope.row.CerId +'&WorkflowId='+scope.row.WorkflowId+'&AnnualStatus='+scope.row.Status+'&annualId='+scope.row.Id+'&Step='+scope.row.Step
  194. } else if (val.Type === '4') {
  195. this.$router.push('oilsupplier/infochange/' + val.Id + '/auditoperation?InfoStatus=' + val.Status)
  196. } else if (val.Type === '5') {
  197. this.$router.push('oilsupplier/qualchange/' + val.SupplierId + '/auditoperation?certid=' + val.CertId + '&QualId=' + val.Id + '&QualStatus=' + val.Status)
  198. }
  199. },
  200. finishedData () {
  201. // 分页及列表条件
  202. let params = {
  203. _currentPage: this.currentPage,
  204. _size: this.size,
  205. Order: this.Column.Order,
  206. Prop: this.Column.Prop,
  207. Statustype: 2
  208. }
  209. let myCreateOn = []
  210. // 解析时间
  211. if (this.CreateOn.length === 2) {
  212. this.CreateOn[1].setHours(23)
  213. this.CreateOn[1].setMinutes(59)
  214. this.CreateOn[1].setSeconds(59)
  215. myCreateOn.push(this.formatDateTime(this.CreateOn[0]))
  216. myCreateOn.push(this.formatDateTime(this.CreateOn[1]))
  217. }
  218. // 查询条件
  219. Object.assign(params, this.searchForm)
  220. api.getMyTaskFinished(params, this.$axios).then(res => {
  221. this.entityList = res.data.items
  222. console.log(this.entityList, 'this.entityList')
  223. this.currentItemCount = res.data.currentItemCount
  224. }).catch(err => {
  225. console.error(err)
  226. })
  227. },
  228. initDatas () {
  229. // 分页及列表条件
  230. let params = {
  231. _currentPage: this.currentPage,
  232. _size: this.size,
  233. Order: this.Column.Order,
  234. Prop: this.Column.Prop,
  235. Statustype: 2
  236. }
  237. let myCreateOn = []
  238. // 解析时间
  239. if (this.CreateOn.length === 2) {
  240. this.CreateOn[1].setHours(23)
  241. this.CreateOn[1].setMinutes(59)
  242. this.CreateOn[1].setSeconds(59)
  243. myCreateOn.push(this.formatDateTime(this.CreateOn[0]))
  244. myCreateOn.push(this.formatDateTime(this.CreateOn[1]))
  245. }
  246. // 查询条件
  247. Object.assign(params, this.searchForm)
  248. // 访问接口
  249. api.getTodoList(params, this.$axios).then(res => {
  250. this.entityList = res.data.items
  251. console.log(this.entityList, 'this.entityList')
  252. this.currentItemCount = res.data.currentItemCount
  253. }).catch(err => {
  254. console.error(err)
  255. })
  256. },
  257. handleCurrentChange (value) {
  258. this.currentPage = value
  259. this.initData()
  260. },
  261. handleSizeChange (value) {
  262. this.size = value
  263. this.currentPage = 1
  264. this.initData()
  265. }
  266. }
  267. }
  268. </script>