enterpriseCertificationApprove-list.vue 7.5 KB

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