enterpriseCertificationApprove-list.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  1. <template>
  2. <div>
  3. <el-breadcrumb separator=">">
  4. <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
  5. <el-breadcrumb-item>
  6. <a href="#">审核管理</a>
  7. </el-breadcrumb-item>
  8. <el-breadcrumb-item>
  9. <a href="/enterpriseCertificationApprove">企业信息审核</a>
  10. </el-breadcrumb-item>
  11. </el-breadcrumb>
  12. <el-divider></el-divider>
  13. <!--
  14. 要resetFields起作用,必须配置:model和prop
  15. -->
  16. <el-form
  17. ref="queryForm"
  18. :model="queryModel"
  19. inline
  20. class="demo-form-inline"
  21. >
  22. <el-form-item label="审批状态" prop="isCertification">
  23. <el-select v-model="queryModel.isCertification" filterable placeholder="请选择审批状态" size="mini">
  24. <el-option label="未审批" value="1"></el-option>
  25. <el-option label="已审批" value="2"></el-option>
  26. <el-option label="退回" value="4"></el-option>
  27. </el-select>
  28. </el-form-item>
  29. <el-form-item>
  30. <el-button
  31. type="primary"
  32. size="mini"
  33. icon="ios-search"
  34. @click="changePage(1)"
  35. :loading="loading"
  36. >查询</el-button
  37. >&nbsp;
  38. <el-button
  39. type="info"
  40. size="mini"
  41. style="margin-left: 8px"
  42. @click="handleReset('queryForm')"
  43. >重置</el-button
  44. >&nbsp;
  45. </el-form-item>
  46. </el-form>
  47. <el-divider></el-divider>
  48. <el-table
  49. :data="tableData"
  50. style="min-height: 400px"
  51. v-loading="loading"
  52. stripe
  53. @sort-change="sortChange"
  54. @selection-change="handleSelectionChange"
  55. >
  56. <el-table-column type="selection" width="55"></el-table-column>
  57. <el-table-column prop="approveStatusName" label="审核状态" width="180"></el-table-column>
  58. <el-table-column prop="createByName" label="提交人" width="180"></el-table-column>
  59. <el-table-column prop="createTime" label="申请时间" width="180"></el-table-column>
  60. <el-table-column prop="companyName" label="申请认证企业" width="180"></el-table-column>
  61. <el-table-column prop="approvePersonName" label="审核人" width="180"></el-table-column>
  62. <el-table-column prop="approveTime" label="审核时间" width="180"></el-table-column>
  63. <el-table-column label="操作">
  64. <template slot-scope="{row}">
  65. <el-button v-if="row.approveStatus==1" size="mini" type="warning" @click="handleEdit(row)">处理</el-button>
  66. </template>
  67. </el-table-column>
  68. </el-table>
  69. <el-pagination
  70. :current-page.sync="pageIndex"
  71. :total="totalElements"
  72. :page-sizes="pageSizeList"
  73. @current-change="changePage"
  74. @size-change="pageSizeChange"
  75. layout="total, sizes, prev, pager, next, jumper"
  76. ></el-pagination>
  77. <enterpriseCertificationApprove-check
  78. v-if="showModal"
  79. :companyKey="companyKey"
  80. :businessKey="businessKey"
  81. :title="modalTitle"
  82. @close="onDetailModalClose"
  83. ></enterpriseCertificationApprove-check>
  84. </div>
  85. </template>
  86. <script>
  87. import Constant from "@/constant";
  88. import EnterpriseCertificationApproveCheck from "./enterpriseCertificationApprove-check";
  89. import enterpriseCertificationApproveApi from "@/api/base/enterpriseCertificationApprove";
  90. import NProgress from "nprogress"; // progress bar
  91. import "nprogress/nprogress.css"; // progress bar style
  92. export default {
  93. data() {
  94. var self = this;
  95. return {
  96. queryModel: {
  97. isCertification: "",
  98. },
  99. loading: false,
  100. tableData: [],
  101. pageIndex: 1,
  102. pageSize: 10,
  103. totalPages: 0,
  104. totalElements: 0,
  105. field: "",
  106. direction: "",
  107. pageSizeList: [10, 20, 30],
  108. multipleSelection: [],
  109. showModal: false,
  110. modalTitle: "",
  111. businessKey: "",
  112. companyKey: "",
  113. };
  114. },
  115. methods: {
  116. changePage(pageIndex) {
  117. var self = this;
  118. self.loading = true;
  119. self.pageIndex = pageIndex;
  120. var formData = new FormData();
  121. formData.append("pageIndex", self.pageIndex);
  122. formData.append("pageSize", self.pageSize);
  123. formData.append("approveStatus", self.queryModel.isCertification);
  124. if (this.field != null) {
  125. formData.append("field", this.field);
  126. }
  127. if (this.direction != null) {
  128. formData.append("direction", this.direction);
  129. }
  130. enterpriseCertificationApproveApi
  131. .pageList(formData)
  132. .then(function (response) {
  133. self.loading = false;
  134. var jsonData = response.data.data;
  135. self.tableData = jsonData.data;
  136. self.totalPages = jsonData.totalPages;
  137. self.totalElements = jsonData.recordsTotal;
  138. })
  139. .catch((error) => {
  140. self.loading = false;
  141. // self.$message.error(error + "");
  142. });
  143. },
  144. pageSizeChange(pageSize) {
  145. this.pageSize = pageSize;
  146. this.$nextTick(() => {
  147. this.changePage(this.pageIndex);
  148. });
  149. },
  150. sortChange(data) {
  151. this.field = data.column.field;
  152. this.direction = data.order;
  153. this.changePage(this.pageIndex);
  154. },
  155. handleSelectionChange(val) {
  156. this.multipleSelection = val;
  157. },
  158. handleReset(name) {
  159. this.$refs[name].resetFields();
  160. },
  161. handleAdd() {
  162. this.modalTitle = "新增";
  163. this.businessKey = "";
  164. this.showModal = true;
  165. },
  166. handleEdit(record) {
  167. this.modalTitle = "编辑";
  168. this.companyKey= record.companyId;
  169. this.businessKey = record.id;
  170. this.showModal = true;
  171. },
  172. handleDelete(record) {
  173. var self = this;
  174. self
  175. .$confirm("是否确认删除?", "提示", {
  176. confirmButtonText: "确定",
  177. cancelButtonText: "取消",
  178. type: "warning",
  179. })
  180. .then(() => {
  181. enterpriseCertificationApproveApi
  182. .remove(record.id)
  183. .then(function (response) {
  184. var jsonData = response.data;
  185. if (jsonData.result) {
  186. // var index = self.tableData.indexOf(record);
  187. // self.tableData.splice(index, 1);
  188. self.changePage(self.pageIndex);
  189. self.$message({
  190. type: "success",
  191. message: "删除成功!",
  192. });
  193. }
  194. });
  195. });
  196. },
  197. handleBatchDelete() {
  198. var self = this;
  199. var idList = this.multipleSelection.map((record) => {
  200. return record.id;
  201. });
  202. this.$confirm("是否确认删除选中项?", "提示", {
  203. confirmButtonText: "确定",
  204. cancelButtonText: "取消",
  205. type: "warning",
  206. }).then(() => {
  207. enterpriseCertificationApproveApi
  208. .batchRemove(idList)
  209. .then(function (response) {
  210. var jsonData = response.data;
  211. if (jsonData.result) {
  212. self.changePage(self.pageIndex);
  213. self.$message({
  214. type: "success",
  215. message: "删除成功!",
  216. });
  217. }
  218. });
  219. });
  220. },
  221. onDetailModalClose(refreshed) {
  222. //保存成功后回调
  223. this.showModal = false;
  224. if (refreshed) {
  225. this.changePage(this.pageIndex);
  226. }
  227. },
  228. },
  229. mounted: function () {
  230. this.changePage(1);
  231. },
  232. components: {
  233. "enterpriseCertificationApprove-check": EnterpriseCertificationApproveCheck,
  234. },
  235. };
  236. </script>
  237. <style lang="scss" scoped>
  238. .el-breadcrumb {
  239. margin: 10px;
  240. line-height: 20px;
  241. }
  242. .el-divider {
  243. margin: 5px 0;
  244. }
  245. .demo-form-inline {
  246. margin-left: 10px;
  247. text-align: left;
  248. }
  249. .button-group {
  250. margin-left: 10px;
  251. text-align: left;
  252. }
  253. </style>