index.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  1. <template>
  2. <div class="app-container">
  3. <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
  4. <el-form-item label="企业名称" prop="enterpriseName" label-width="200">
  5. <el-input
  6. v-model="queryParams.enterpriseName"
  7. placeholder="请输入企业名称"
  8. clearable
  9. @keyup.enter="handleQuery"
  10. />
  11. </el-form-item>
  12. <el-form-item label="信用代码" prop="unifiedSocialCreditCode" label-width="200">
  13. <el-input
  14. v-model="queryParams.unifiedSocialCreditCode"
  15. placeholder="请输入信用代码"
  16. clearable
  17. @keyup.enter="handleQuery"
  18. />
  19. </el-form-item>
  20. <el-form-item>
  21. <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
  22. <el-button icon="Refresh" @click="resetQuery">重置</el-button>
  23. </el-form-item>
  24. </el-form>
  25. <el-row :gutter="10" class="mb8">
  26. <el-col :span="1.5">
  27. <el-popconfirm
  28. title="你确定清除所有数据?"
  29. confirm-button-text="是的"
  30. cancel-button-text="不是"
  31. :icon="InfoFilled"
  32. icon-color="#626AEF"
  33. @confirm="handleDelete"
  34. >
  35. <template #reference>
  36. <el-button
  37. type="danger"
  38. plain
  39. icon="Delete"
  40. v-hasPermi="['basicData:ggxyjl:sfcpxx:sfsssxbzxr:remove']"
  41. >清除全表
  42. </el-button>
  43. </template>
  44. </el-popconfirm>
  45. </el-col>
  46. <el-col :span="1.5">
  47. <el-button
  48. type="danger"
  49. plain
  50. icon="Delete"
  51. @click="batchDelete"
  52. v-hasPermi="['basicData:ggxyjl:sfcpxx:sfsssxbzxr:remove']"
  53. :disabled="ids.length === 0"
  54. >批量删除
  55. </el-button>
  56. </el-col>
  57. <el-col :span="1.5">
  58. <el-button
  59. type="warning"
  60. plain
  61. icon="Download"
  62. @click="handleExport"
  63. :disabled="!executorList.length"
  64. v-hasPermi="['basicData:ggxyjl:sfcpxx:sfsssxbzxr:export']"
  65. >导出
  66. </el-button>
  67. </el-col>
  68. <el-col :span="1.5">
  69. <el-button type="info" plain icon="Upload" @click="handleImport"
  70. v-hasPermi="['basicData:ggxyjl:sfcpxx:sfsssxbzxr:import']">导入
  71. </el-button>
  72. </el-col>
  73. <el-col :span="1.5">
  74. <el-button type="success" plain icon="Download" @click="downloadTemplate" v-hasPermi="['basicData:ggxyjl:sfcpxx:sfsssxbzxr:download']">
  75. 下载导入模板
  76. </el-button>
  77. </el-col>
  78. </el-row>
  79. <el-table v-loading="loading" :data="executorList" height="650" @selection-change="handleSelectionChange">
  80. <el-table-column type="selection" width="55" align="center"/>
  81. <el-table-column label="企业名称" align="center" prop="enterpriseName" :show-overflow-tooltip='true'/>
  82. <el-table-column label="信用代码" align="center" prop="unifiedSocialCreditCode" width="200"/>
  83. <el-table-column label="行业代码" align="center" prop="industryCode" :show-overflow-tooltip='true'/>
  84. <el-table-column label="被执行人名称" align="center" prop="executorName" :show-overflow-tooltip='true'/>
  85. <el-table-column label="案号" align="center" prop="caseNumber" :show-overflow-tooltip='true'/>
  86. <el-table-column label="执行法院" align="center" prop="enforcementCourt" :show-overflow-tooltip='true'/>
  87. <el-table-column label="省份" align="center" prop="province" :show-overflow-tooltip='true'/>
  88. <el-table-column label="做出执行依据单位" align="center" prop="basisUnit" :show-overflow-tooltip='true'/>
  89. <el-table-column label="执行依据文号" align="center" prop="basisDocumentNumber" :show-overflow-tooltip='true'/>
  90. <el-table-column label="立案时间" align="center" prop="filingTime" width="180">
  91. <template #default="scope">
  92. <span>{{ parseTime(scope.row.filingTime, '{y}-{m}-{d}') }}</span>
  93. </template>
  94. </el-table-column>
  95. <el-table-column label="生效法律文书确定的义务" align="center" prop="legalObligation" :show-overflow-tooltip='true'/>
  96. <el-table-column label="被执行人的履行情况" align="center" prop="performanceStatus" :show-overflow-tooltip='true'/>
  97. <el-table-column label="失信被执行人行为具体情形" align="center" prop="dishonestBehavior" :show-overflow-tooltip='true'/>
  98. </el-table>
  99. <div style="position: fixed;bottom: 20px;right: 10px;">
  100. <pagination
  101. v-show="total>0"
  102. :total="total"
  103. v-model:page="queryParams.pageNum"
  104. v-model:limit="queryParams.pageSize"
  105. @pagination="getList"
  106. />
  107. </div>
  108. <el-dialog :title="upload.title" v-model="upload.open" width="400px" append-to-body>
  109. <el-upload ref="uploadRef" :limit="1" accept=".xlsx, .xls" :headers="upload.headers"
  110. :action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading"
  111. :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
  112. <el-icon class="el-icon--upload">
  113. <upload-filled/>
  114. </el-icon>
  115. <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
  116. <template #tip>
  117. <div class="el-upload__tip text-center">
  118. <span>仅允许导入xls、xlsx格式文件。</span>
  119. </div>
  120. </template>
  121. </el-upload>
  122. <template #footer>
  123. <div class="dialog-footer">
  124. <el-button type="primary" @click="submitFileForm">确 定</el-button>
  125. <el-button @click="upload.open = false">取 消</el-button>
  126. </div>
  127. </template>
  128. </el-dialog>
  129. <!-- 添加或修改司法涉诉-失信被执行人对话框 -->
  130. </div>
  131. </template>
  132. <script setup name="Executor">
  133. import {
  134. listExecutor,
  135. getExecutor,
  136. delExecutor,
  137. delExecutorBatch
  138. } from "@/api/basicData/executor3";
  139. import {reactive, ref, toRaw} from "vue";
  140. import {getToken} from "@/utils/auth";
  141. import {ElMessage} from "element-plus";
  142. import {likeQueryMethod} from "@/utils/likeQueryMethod";
  143. const {proxy} = getCurrentInstance();
  144. const executorList = ref([]);
  145. const open = ref(false);
  146. const loading = ref(true);
  147. const showSearch = ref(true);
  148. const ids = ref([]);
  149. const single = ref(true);
  150. const multiple = ref(true);
  151. const total = ref(0);
  152. const title = ref("");
  153. const upload = reactive({
  154. // 是否显示弹出层(用户导入)
  155. open: false,
  156. // 弹出层标题(用户导入)
  157. title: '',
  158. // 是否禁用上传
  159. isUploading: false,
  160. // 设置上传的请求头部
  161. headers: {Authorization: getToken()},
  162. // 上传的地址
  163. url: import.meta.env.VITE_APP_BASE_API + '/crmDishonestExecutor/importData'
  164. })
  165. const handleFileSuccess = (e) => {
  166. if (e.code == 200) {
  167. ElMessage({
  168. type: "success",
  169. message: e.msg
  170. })
  171. getList()
  172. proxy.$refs['uploadRef']?.clearFiles()
  173. } else {
  174. ElMessage({
  175. type: "error",
  176. message: e.msg
  177. })
  178. proxy.$refs['uploadRef']?.clearFiles()
  179. }
  180. }
  181. function submitFileForm() {
  182. proxy.$refs['uploadRef']?.submit();
  183. upload.open = false;
  184. }
  185. function handleImport() {
  186. upload.open = true
  187. }
  188. const data = reactive({
  189. form: {},
  190. queryParams: {
  191. pageNum: 1,
  192. pageSize: 20,
  193. enterpriseName: null,
  194. unifiedSocialCreditCode: '',
  195. industryCode: null,
  196. executorName: null,
  197. caseNumber: null,
  198. enforcementCourt: null,
  199. province: null,
  200. basisUnit: null,
  201. basisDocumentNumber: null,
  202. filingTime: null,
  203. legalObligation: null,
  204. performanceStatus: null,
  205. dishonestBehavior: null
  206. },
  207. rules: {
  208. enterpriseName: [
  209. {
  210. required: true, message: "企业名称不能为空", trigger: "blur" }
  211. ],
  212. unifiedSocialCreditCode: [
  213. {
  214. required: true, message: "信用代码不能为空", trigger: "blur" }
  215. ],
  216. }
  217. });
  218. const {queryParams, form, rules} = toRefs(data);
  219. /** 查询司法涉诉-失信被执行人列表 */
  220. function getList() {
  221. loading.value = true;
  222. let toServerObj = likeQueryMethod('unified_social_credit_code', queryParams.value.unifiedSocialCreditCode, queryParams.value.pageNum, queryParams.value.pageSize,'enterprise_name',queryParams.value.enterpriseName);
  223. listExecutor(toServerObj).then(response => {
  224. executorList.value = response.records;
  225. total.value = response.total;
  226. loading.value = false;
  227. });
  228. }
  229. // 表单重置
  230. function reset() {
  231. form.value = {
  232. id: null,
  233. enterpriseName: null,
  234. unifiedSocialCreditCode: '',
  235. industryCode: null,
  236. executorName: null,
  237. caseNumber: null,
  238. enforcementCourt: null,
  239. province: null,
  240. basisUnit: null,
  241. basisDocumentNumber: null,
  242. filingTime: null,
  243. legalObligation: null,
  244. performanceStatus: "0",
  245. dishonestBehavior: null
  246. };
  247. proxy.resetForm("executorRef");
  248. }
  249. /** 搜索按钮操作 */
  250. function handleQuery() {
  251. queryParams.value.pageNum = 1;
  252. getList();
  253. }
  254. /** 重置按钮操作 */
  255. function resetQuery() {
  256. proxy.resetForm("queryRef");
  257. handleQuery();
  258. }
  259. // 多选框选中数据
  260. function handleSelectionChange(selection) {
  261. ids.value = selection.map(item => item.id);
  262. single.value = selection.length != 1;
  263. multiple.value = !selection.length;
  264. }
  265. /** 删除按钮操作 */
  266. async function handleDelete(row) {
  267. const res = await delExecutor();
  268. if(res.code == 200){
  269. ElMessage({
  270. type:'success',
  271. message:'删除成功'
  272. })
  273. getList();
  274. }
  275. }
  276. /** 批量删除*/
  277. const batchDelete = (row)=>{
  278. const idsToS = row.id || ids.value;
  279. (proxy.$modal).confirm('是否确认删除这' + idsToS.length+'条的数据项?').then(function() {
  280. return delExecutorBatch(toRaw(idsToS));
  281. }).then(() => {
  282. getList();
  283. proxy.$modal.msgSuccess("删除成功");
  284. }).catch(() => {});
  285. }
  286. /** 导出按钮操作 */
  287. function handleExport() {
  288. proxy.download('crmDishonestExecutor/exportData', {
  289. ...queryParams.value
  290. }, `司法涉诉-失信被执行人_${new Date().getTime()}.xlsx`)
  291. }
  292. const downloadTemplate = ()=>{
  293. proxy.download('crmDishonestExecutor/getUploadTemplate',{}, `司法涉诉-失信被执行人模板.xlsx`)
  294. }
  295. getList();
  296. </script>