index.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  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="!announcementList.length"
  25. v-hasPermi="['basicData:xcrSimplifiedCancellationAnnouncement:export']"
  26. >导出
  27. </el-button>
  28. </el-col>
  29. </el-row>
  30. <el-table v-loading="loading" :data="announcementList" height="650" @selection-change="handleSelectionChange">
  31. <el-table-column label="简易注销公告ID" align="center" prop="SCID" :show-overflow-tooltip='true'/>
  32. <el-table-column label="主体身份代码" align="center" prop="PRIPID" :show-overflow-tooltip='true'/>
  33. <el-table-column label="名称" align="center" prop="ENTNAME" :show-overflow-tooltip='true'/>
  34. <el-table-column label="统一社会信用代码 (CA91)" align="center" prop="UNISCID" :show-overflow-tooltip='true'/>
  35. <el-table-column label="注册号 (CA15)" align="center" prop="REGNO" :show-overflow-tooltip='true'/>
  36. <el-table-column label="登记机关 (CA11)" align="center" prop="REGORG" :show-overflow-tooltip='true'/>
  37. <el-table-column label="公告申请日期" align="center" prop="APPDATE" width="180">
  38. <template #default="scope">
  39. <span>{{ parseTime(scope.row.APPDATE, '{y}-{m}-{d}') }}</span>
  40. </template>
  41. </el-table-column>
  42. <el-table-column label="公告期自" align="center" prop="NOTICEFROM" width="180">
  43. <template #default="scope">
  44. <span>{{ parseTime(scope.row.NOTICEFROM, '{y}-{m}-{d}') }}</span>
  45. </template>
  46. </el-table-column>
  47. <el-table-column label="公告期至" align="center" prop="NOTICETO" width="180">
  48. <template #default="scope">
  49. <span>{{ parseTime(scope.row.NOTICETO, '{y}-{m}-{d}') }}</span>
  50. </template>
  51. </el-table-column>
  52. <el-table-column label="全体投资人承诺书 (不下放)" align="center" prop="COMMITMENT" :show-overflow-tooltip='true'/>
  53. <el-table-column label="全体投资人承诺书文件名称" align="center" prop="locFilename" :show-overflow-tooltip='true'/>
  54. <el-table-column label="简易注销结果 (CD83)" align="center" prop="SIMPLECANREA" :show-overflow-tooltip='true'/>
  55. <el-table-column label="核准日期" align="center" prop="APPRDATE" width="180">
  56. <template #default="scope">
  57. <span>{{ parseTime(scope.row.APPRDATE, '{y}-{m}-{d}') }}</span>
  58. </template>
  59. </el-table-column>
  60. <el-table-column label="公告撤销日期" align="center" prop="CANCELDATE" width="180">
  61. <template #default="scope">
  62. <span>{{ parseTime(scope.row.CANCELDATE, '{y}-{m}-{d}') }}</span>
  63. </template>
  64. </el-table-column>
  65. <el-table-column label="数据更新时间 (数据初始化或更新时间戳)" align="center" prop="sExtDatatime" width="180">
  66. <template #default="scope">
  67. <span>{{ parseTime(scope.row.sExtDatatime, '{y}-{m}-{d}') }}</span>
  68. </template>
  69. </el-table-column>
  70. <el-table-column label="统一社会信用代码" align="center" prop="uniCode" width="200"/>
  71. </el-table>
  72. <div style="position: fixed;bottom: 20px;right: 10px;">
  73. <pagination
  74. v-show="total>0"
  75. :total="total"
  76. v-model:page="queryParams.pageNum"
  77. v-model:limit="queryParams.pageSize"
  78. @pagination="getList"
  79. />
  80. </div>
  81. <el-dialog :title="upload.title" v-model="upload.open" width="400px" append-to-body>
  82. <el-upload ref="uploadRef" :limit="1" accept=".xlsx, .xls" :headers="upload.headers"
  83. :action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading"
  84. :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
  85. <el-icon class="el-icon--upload">
  86. <upload-filled/>
  87. </el-icon>
  88. <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
  89. <template #tip>
  90. <div class="el-upload__tip text-center">
  91. <span>仅允许导入xls、xlsx格式文件。</span>
  92. </div>
  93. </template>
  94. </el-upload>
  95. <template #footer>
  96. <div class="dialog-footer">
  97. <el-button type="primary" @click="submitFileForm">确 定</el-button>
  98. <el-button @click="upload.open = false">取 消</el-button>
  99. </div>
  100. </template>
  101. </el-dialog>
  102. </div>
  103. </template>
  104. <script setup name="Announcement">
  105. import {
  106. listAnnouncement,
  107. getAnnouncement,
  108. delAnnouncement,
  109. delAnnouncementBatch
  110. } from "@/api/basicData/xcrSimplifiedCancellationAnnouncement";
  111. import {reactive, ref, toRaw} from "vue";
  112. import {getToken} from "@/utils/auth";
  113. import {ElMessage} from "element-plus";
  114. import {likeQueryMethod} from "@/utils/likeQueryMethod";
  115. const {proxy} = getCurrentInstance();
  116. const announcementList = ref([]);
  117. const open = ref(false);
  118. const loading = ref(true);
  119. const showSearch = ref(true);
  120. const ids = ref([]);
  121. const single = ref(true);
  122. const multiple = ref(true);
  123. const total = ref(0);
  124. const title = ref("");
  125. const upload = reactive({
  126. // 是否显示弹出层(用户导入)
  127. open: false,
  128. // 弹出层标题(用户导入)
  129. title: '',
  130. // 是否禁用上传
  131. isUploading: false,
  132. // 设置上传的请求头部
  133. headers: {Authorization: getToken()},
  134. // 上传的地址
  135. url: import.meta.env.VITE_APP_BASE_API + '/xcrSimplifiedCancellationAnnouncement/importData'
  136. })
  137. const handleFileSuccess = (e) => {
  138. if (e.code == 200) {
  139. ElMessage({
  140. type: "success",
  141. message: e.msg
  142. })
  143. getList()
  144. proxy.$refs['uploadRef']?.clearFiles()
  145. } else {
  146. ElMessage({
  147. type: "error",
  148. message: e.msg
  149. })
  150. proxy.$refs['uploadRef']?.clearFiles()
  151. }
  152. }
  153. function submitFileForm() {
  154. proxy.$refs['uploadRef']?.submit();
  155. upload.open = false;
  156. }
  157. function handleImport() {
  158. upload.open = true
  159. }
  160. const data = reactive({
  161. form: {},
  162. queryParams: {
  163. pageNum: 1,
  164. pageSize: 20,
  165. SCID: null,
  166. PRIPID: null,
  167. ENTNAME: null,
  168. UNISCID: null,
  169. REGNO: null,
  170. REGORG: null,
  171. APPDATE: null,
  172. NOTICEFROM: null,
  173. NOTICETO: null,
  174. COMMITMENT: null,
  175. locFilename: null,
  176. SIMPLECANREA: null,
  177. APPRDATE: null,
  178. CANCELDATE: null,
  179. sExtDatatime: null,
  180. uniCode: ''
  181. },
  182. rules: {
  183. }
  184. });
  185. const {queryParams, form, rules} = toRefs(data);
  186. /** 查询简易注销公告信息列表 */
  187. function getList() {
  188. loading.value = true;
  189. let toServerObj = likeQueryMethod('uni_code', queryParams.value.uniCode, queryParams.value.pageNum, queryParams.value.pageSize);
  190. listAnnouncement(toServerObj).then(response => {
  191. announcementList.value = response.records;
  192. total.value = response.total;
  193. loading.value = false;
  194. });
  195. }
  196. // 表单重置
  197. function reset() {
  198. form.value = {
  199. xhCodeId: null,
  200. SCID: null,
  201. PRIPID: null,
  202. ENTNAME: null,
  203. UNISCID: null,
  204. REGNO: null,
  205. REGORG: null,
  206. APPDATE: null,
  207. NOTICEFROM: null,
  208. NOTICETO: null,
  209. COMMITMENT: null,
  210. locFilename: null,
  211. SIMPLECANREA: null,
  212. APPRDATE: null,
  213. CANCELDATE: null,
  214. sExtDatatime: null,
  215. uniCode: ''
  216. };
  217. proxy.resetForm("announcementRef");
  218. }
  219. /** 搜索按钮操作 */
  220. function handleQuery() {
  221. queryParams.value.pageNum = 1;
  222. getList();
  223. }
  224. /** 重置按钮操作 */
  225. function resetQuery() {
  226. proxy.resetForm("queryRef");
  227. handleQuery();
  228. }
  229. // 多选框选中数据
  230. function handleSelectionChange(selection) {
  231. ids.value = selection.map(item => item.xhCodeId);
  232. single.value = selection.length != 1;
  233. multiple.value = !selection.length;
  234. }
  235. /** 删除按钮操作 */
  236. async function handleDelete(row) {
  237. const res = await delAnnouncement();
  238. if(res.code == 200){
  239. ElMessage({
  240. type:'success',
  241. message:'删除成功'
  242. })
  243. getList();
  244. }
  245. }
  246. /** 批量删除*/
  247. const batchDelete = (row)=>{
  248. const idsToS = row.xhCodeId || ids.value;
  249. (proxy.$modal).confirm('是否确认删除这' + idsToS.length+'条的数据项?').then(function() {
  250. return delAnnouncementBatch(toRaw(idsToS));
  251. }).then(() => {
  252. getList();
  253. proxy.$modal.msgSuccess("删除成功");
  254. }).catch(() => {});
  255. }
  256. /** 导出按钮操作 */
  257. function handleExport() {
  258. proxy.download('basicData/xcrSimplifiedCancellationAnnouncement/export', {
  259. ...queryParams.value
  260. }, `简易注销公告信息_${new Date().getTime()}.xlsx`)
  261. }
  262. getList();
  263. </script>