index.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  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="uniCode" label-width="200">
  5. <el-input
  6. v-model="queryParams.uniCode"
  7. placeholder="请输入统一社会信用代码"
  8. clearable
  9. @keyup.enter="handleQuery"
  10. />
  11. </el-form-item>
  12. <el-form-item>
  13. <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
  14. <el-button icon="Refresh" @click="resetQuery">重置</el-button>
  15. </el-form-item>
  16. </el-form>
  17. <el-row :gutter="10" class="mb8">
  18. <el-col :span="1.5">
  19. <el-button
  20. type="warning"
  21. plain
  22. icon="Download"
  23. @click="handleExport"
  24. :disabled="!xcrEquityFreezeExecutionList.length"
  25. v-hasPermi="['basicData:xcrEquityFreezeExecution:export']"
  26. >导出
  27. </el-button>
  28. </el-col>
  29. </el-row>
  30. <el-table v-loading="loading" :data="xcrEquityFreezeExecutionList" height="650" @selection-change="handleSelectionChange">
  31. <el-table-column label="统一社会信用代码" align="center" prop="uniCode" width="200"/>
  32. <el-table-column label="${comment}" align="center" prop="etpsId" :show-overflow-tooltip='true' width="150"/>
  33. <el-table-column label="股权冻结被执行人信息ID" align="center" prop="parentId" :show-overflow-tooltip='true' width="150"/>
  34. <el-table-column label="主体身份代码" align="center" prop="PRIPID" :show-overflow-tooltip='true' width="150"/>
  35. <el-table-column label="执行法院" align="center" prop="FROAUTH" :show-overflow-tooltip='true' width="150"/>
  36. <el-table-column label="协助公示通知书文号" align="center" prop="EXECUTENO" :show-overflow-tooltip='true' width="150"/>
  37. <el-table-column label="股权所在公司名称" align="center" prop="ENTNAME" :show-overflow-tooltip='true' width="150"/>
  38. <el-table-column label="股权所在企业注册号" align="center" prop="REGNO" :show-overflow-tooltip='true' width="150"/>
  39. <el-table-column label="股权所在企业统一社会信用代码" align="center" prop="UNISCID" :show-overflow-tooltip='true' width="150"/>
  40. <el-table-column label="被执行人" align="center" prop="INV" :show-overflow-tooltip='true' width="150"/>
  41. <el-table-column label="股权数额" align="center" prop="FROAM" :show-overflow-tooltip='true' width="150"/>
  42. <el-table-column label="币种" align="center" prop="REGCAPCUR" :show-overflow-tooltip='true' width="150"/>
  43. <el-table-column label="币种" align="center" prop="regcapcurCn" :show-overflow-tooltip='true' width="150"/>
  44. <el-table-column label="股权冻结状态" align="center" prop="FROZSTATE" :show-overflow-tooltip='true' width="150"/>
  45. <el-table-column label="股权冻结状态" align="center" prop="frozstateCn" :show-overflow-tooltip='true' width="150"/>
  46. <el-table-column label="公示日期" align="center" prop="PUBLICDATE" width="180">
  47. <template #default="scope">
  48. <span>{{ parseTime(scope.row.PUBLICDATE, '{y}-{m}-{d}') }}</span>
  49. </template>
  50. </el-table-column>
  51. <el-table-column label="数据更新时间" align="center" prop="sExtDatatime" width="180">
  52. <template #default="scope">
  53. <span>{{ parseTime(scope.row.sExtDatatime, '{y}-{m}-{d}') }}</span>
  54. </template>
  55. </el-table-column>
  56. </el-table>
  57. <div style="position: fixed;bottom: 20px;right: 10px;">
  58. <pagination
  59. v-show="total>0"
  60. :total="total"
  61. v-model:page="queryParams.pageNum"
  62. v-model:limit="queryParams.pageSize"
  63. @pagination="getList"
  64. />
  65. </div>
  66. <el-dialog :title="upload.title" v-model="upload.open" width="400px" append-to-body>
  67. <el-upload ref="uploadRef" :limit="1" accept=".xlsx, .xls" :headers="upload.headers"
  68. :action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading"
  69. :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
  70. <el-icon class="el-icon--upload">
  71. <upload-filled/>
  72. </el-icon>
  73. <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
  74. <template #tip>
  75. <div class="el-upload__tip text-center">
  76. <span>仅允许导入xls、xlsx格式文件。</span>
  77. </div>
  78. </template>
  79. </el-upload>
  80. <template #footer>
  81. <div class="dialog-footer">
  82. <el-button type="primary" @click="submitFileForm">确 定</el-button>
  83. <el-button @click="upload.open = false">取 消</el-button>
  84. </div>
  85. </template>
  86. </el-dialog>
  87. </div>
  88. </template>
  89. <script setup name="Execution">
  90. import {
  91. listExecution,
  92. getExecution,
  93. delExecution,
  94. delExecutionBatch
  95. } from "@/api/basicData/xcrEquityFreezeExecution";
  96. import {reactive, ref, toRaw} from "vue";
  97. import {getToken} from "@/utils/auth";
  98. import {ElMessage} from "element-plus";
  99. import {likeQueryMethod} from "@/utils/likeQueryMethod";
  100. const {proxy} = getCurrentInstance();
  101. const xcrEquityFreezeExecutionList = ref([]);
  102. const open = ref(false);
  103. const loading = ref(true);
  104. const showSearch = ref(true);
  105. const ids = ref([]);
  106. const single = ref(true);
  107. const multiple = ref(true);
  108. const total = ref(0);
  109. const title = ref("");
  110. const upload = reactive({
  111. // 是否显示弹出层(用户导入)
  112. open: false,
  113. // 弹出层标题(用户导入)
  114. title: '',
  115. // 是否禁用上传
  116. isUploading: false,
  117. // 设置上传的请求头部
  118. headers: {Authorization: getToken()},
  119. // 上传的地址
  120. url: import.meta.env.VITE_APP_BASE_API + '/xcrEquityFreezeExecution/importData'
  121. })
  122. const handleFileSuccess = (e) => {
  123. if (e.code == 200) {
  124. ElMessage({
  125. type: "success",
  126. message: e.msg
  127. })
  128. getList()
  129. proxy.$refs['uploadRef']?.clearFiles()
  130. } else {
  131. ElMessage({
  132. type: "error",
  133. message: e.msg
  134. })
  135. proxy.$refs['uploadRef']?.clearFiles()
  136. }
  137. }
  138. function submitFileForm() {
  139. proxy.$refs['uploadRef']?.submit();
  140. upload.open = false;
  141. }
  142. function handleImport() {
  143. upload.open = true
  144. }
  145. const data = reactive({
  146. form: {},
  147. queryParams: {
  148. pageNum: 1,
  149. pageSize: 20,
  150. etpsId: null,
  151. parentId: null,
  152. PRIPID: null,
  153. FROAUTH: null,
  154. EXECUTENO: null,
  155. ENTNAME: null,
  156. REGNO: null,
  157. UNISCID: null,
  158. INV: null,
  159. FROAM: null,
  160. REGCAPCUR: null,
  161. regcapcurCn: null,
  162. FROZSTATE: null,
  163. frozstateCn: null,
  164. PUBLICDATE: null,
  165. sExtDatatime: null,
  166. uniCode: ''
  167. },
  168. rules: {
  169. }
  170. });
  171. const {queryParams, form, rules} = toRefs(data);
  172. /** 查询股权冻结被执行人信息列表 */
  173. function getList() {
  174. loading.value = true;
  175. let toServerObj = likeQueryMethod('uni_code', queryParams.value.uniCode, queryParams.value.pageNum, queryParams.value.pageSize);
  176. listExecution(toServerObj).then(response => {
  177. xcrEquityFreezeExecutionList.value = response.records;
  178. total.value = response.total;
  179. loading.value = false;
  180. });
  181. }
  182. // 表单重置
  183. function reset() {
  184. form.value = {
  185. xhCodeId: null,
  186. etpsId: null,
  187. parentId: null,
  188. PRIPID: null,
  189. FROAUTH: null,
  190. EXECUTENO: null,
  191. ENTNAME: null,
  192. REGNO: null,
  193. UNISCID: null,
  194. INV: null,
  195. FROAM: null,
  196. REGCAPCUR: null,
  197. regcapcurCn: null,
  198. FROZSTATE: null,
  199. frozstateCn: null,
  200. PUBLICDATE: null,
  201. sExtDatatime: null,
  202. uniCode: ''
  203. };
  204. proxy.resetForm("xcrEquityFreezeExecutionRef");
  205. }
  206. /** 搜索按钮操作 */
  207. function handleQuery() {
  208. queryParams.value.pageNum = 1;
  209. getList();
  210. }
  211. /** 重置按钮操作 */
  212. function resetQuery() {
  213. proxy.resetForm("queryRef");
  214. handleQuery();
  215. }
  216. // 多选框选中数据
  217. function handleSelectionChange(selection) {
  218. ids.value = selection.map(item => item.xhCodeId);
  219. single.value = selection.length != 1;
  220. multiple.value = !selection.length;
  221. }
  222. /** 删除按钮操作 */
  223. async function handleDelete(row) {
  224. const res = await delExecution();
  225. if(res.code == 200){
  226. ElMessage({
  227. type:'success',
  228. message:'删除成功'
  229. })
  230. getList();
  231. }
  232. }
  233. /** 批量删除*/
  234. const batchDelete = (row)=>{
  235. const idsToS = row.xhCodeId || ids.value;
  236. (proxy.$modal).confirm('是否确认删除这' + idsToS.length+'条的数据项?').then(function() {
  237. return delExecutionBatch(toRaw(idsToS));
  238. }).then(() => {
  239. getList();
  240. proxy.$modal.msgSuccess("删除成功");
  241. }).catch(() => {});
  242. }
  243. /** 导出按钮操作 */
  244. function handleExport() {
  245. proxy.download('basicData/xcrEquityFreezeExecution/export', {
  246. ...queryParams.value
  247. }, `股权冻结被执行人信息_${new Date().getTime()}.xlsx`)
  248. }
  249. getList();
  250. </script>