index.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378
  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="!xcrAdministrativeLicensingList.length"
  25. v-hasPermi="['basicData:xcrAdministrativeLicensing:export']"
  26. >导出
  27. </el-button>
  28. </el-col>
  29. </el-row>
  30. <el-table v-loading="loading" :data="xcrAdministrativeLicensingList" height="650" @selection-change="handleSelectionChange">
  31. <el-table-column label="统一社会信用代码" align="center" prop="uniCode" width="200"/>
  32. <el-table-column label="备注" align="center" prop="BZ" :show-overflow-tooltip='true' width="150"/>
  33. <el-table-column label="发布状态" align="center" prop="FBZT" :show-overflow-tooltip='true' width="150"/>
  34. <el-table-column label="当前状态" align="center" prop="ISLATE" :show-overflow-tooltip='true' width="150"/>
  35. <el-table-column label="唯一标识" align="center" prop="UNID" :show-overflow-tooltip='true' width="150"/>
  36. <el-table-column label="其他法定代表人证件类型" align="center" prop="xkFddbrzjlxOther" :show-overflow-tooltip='true' width="150"/>
  37. <el-table-column label="法定代表人" align="center" prop="xkFrdb" :show-overflow-tooltip='true' width="150"/>
  38. <el-table-column label="法定代表人证件号码" align="center" prop="xkFrZjhm" :show-overflow-tooltip='true' width="150"/>
  39. <el-table-column label="法定代表人证件类型" align="center" prop="xkFrZjlx" :show-overflow-tooltip='true' width="150"/>
  40. <el-table-column label="许可决定日期" align="center" prop="xkJdrq" width="180">
  41. <template #default="scope">
  42. <span>{{ parseTime(scope.row.xkJdrq, '{y}-{m}-{d}') }}</span>
  43. </template>
  44. </el-table-column>
  45. <el-table-column label="其他许可类别" align="center" prop="xkLbOther" :show-overflow-tooltip='true' width="150"/>
  46. <el-table-column label="数据来源单位" align="center" prop="xkLydw" :show-overflow-tooltip='true' width="150"/>
  47. <el-table-column label="数据来源单位统一社会信用代码" align="center" prop="xkLydwdm" :show-overflow-tooltip='true' width="150"/>
  48. <el-table-column label="许可内容" align="center" prop="xkNr" :show-overflow-tooltip='true' width="150"/>
  49. <el-table-column label="行政许可决定文书号" align="center" prop="xkWsh" :show-overflow-tooltip='true' width="150"/>
  50. <el-table-column label="工商注册号" align="center" prop="xkXdrGszc" :show-overflow-tooltip='true' width="150"/>
  51. <el-table-column label="许可类别" align="center" prop="xkXdrLb" :show-overflow-tooltip='true' width="150"/>
  52. <el-table-column label="对象代码" align="center" prop="xkXdrShxym" :show-overflow-tooltip='true' width="150"/>
  53. <el-table-column label="社会组织登记证号" align="center" prop="xkXdrShzz" :show-overflow-tooltip='true' width="150"/>
  54. <el-table-column label="税务登记号" align="center" prop="xkXdrSwdj" :show-overflow-tooltip='true' width="150"/>
  55. <el-table-column label="事业单位证书号" align="center" prop="xkXdrSydw" :show-overflow-tooltip='true' width="150"/>
  56. <el-table-column label="证件号码" align="center" prop="xkXdrZjhm" :show-overflow-tooltip='true' width="150"/>
  57. <el-table-column label="证件类型" align="center" prop="xkXdrZjlx" :show-overflow-tooltip='true' width="150"/>
  58. <el-table-column label="组织机构代码" align="center" prop="xkXdrZzjg" :show-overflow-tooltip='true' width="150"/>
  59. <el-table-column label="许可编号" align="center" prop="xkXkbh" :show-overflow-tooltip='true' width="150"/>
  60. <el-table-column label="许可机关" align="center" prop="xkXkjg" :show-overflow-tooltip='true' width="150"/>
  61. <el-table-column label="许可机关统一社会信用代码" align="center" prop="xkXkjgdm" :show-overflow-tooltip='true' width="150"/>
  62. <el-table-column label="许可类别" align="center" prop="xkXklb" :show-overflow-tooltip='true' width="150"/>
  63. <el-table-column label="行政许可决定文书名称" align="center" prop="xkXkws" :show-overflow-tooltip='true' width="150"/>
  64. <el-table-column label="许可证书名称" align="center" prop="xkXkzs" :show-overflow-tooltip='true' width="150"/>
  65. <el-table-column label="有效期自" align="center" prop="xkYxqz" width="180">
  66. <template #default="scope">
  67. <span>{{ parseTime(scope.row.xkYxqz, '{y}-{m}-{d}') }}</span>
  68. </template>
  69. </el-table-column>
  70. <el-table-column label="有效期至" align="center" prop="xkYxqzi" width="180">
  71. <template #default="scope">
  72. <span>{{ parseTime(scope.row.xkYxqzi, '{y}-{m}-{d}') }}</span>
  73. </template>
  74. </el-table-column>
  75. <el-table-column label="其他证件类型" align="center" prop="xkZjlxOther" :show-overflow-tooltip='true' width="150"/>
  76. <el-table-column label="当前状态" align="center" prop="xkZt" :show-overflow-tooltip='true' width="150"/>
  77. <el-table-column label="批次号" align="center" prop="batchNo" :show-overflow-tooltip='true' width="150"/>
  78. <el-table-column label="创建用户" align="center" prop="createUser" :show-overflow-tooltip='true' width="150"/>
  79. <el-table-column label="数据代码" align="center" prop="dataCode" :show-overflow-tooltip='true' width="150"/>
  80. <el-table-column label="部门ID" align="center" prop="depId" :show-overflow-tooltip='true' width="150"/>
  81. <el-table-column label="对象代码" align="center" prop="entityCode" :show-overflow-tooltip='true' width="150"/>
  82. <el-table-column label="附加代码" align="center" prop="entityCodeAdd" :show-overflow-tooltip='true' width="150"/>
  83. <el-table-column label="对象名称" align="center" prop="entityName" :show-overflow-tooltip='true' width="150"/>
  84. <el-table-column label="实体类型" align="center" prop="entityType" :show-overflow-tooltip='true' width="150"/>
  85. <el-table-column label="库存ID" align="center" prop="inventoryId" :show-overflow-tooltip='true' width="150"/>
  86. <el-table-column label="库存来源ID" align="center" prop="inventorySourceId" :show-overflow-tooltip='true' width="150"/>
  87. <el-table-column label="是否删除" align="center" prop="isDel" :show-overflow-tooltip='true' width="150"/>
  88. <el-table-column label="元数据ID" align="center" prop="metaId" :show-overflow-tooltip='true' width="150"/>
  89. <el-table-column label="组织ID" align="center" prop="orgId" :show-overflow-tooltip='true' width="150"/>
  90. <el-table-column label="报告状态" align="center" prop="reportState" :show-overflow-tooltip='true' width="150"/>
  91. <el-table-column label="记录状态" align="center" prop="status" :show-overflow-tooltip='true' width="150"/>
  92. <el-table-column label="更新用户" align="center" prop="updateUser" :show-overflow-tooltip='true' width="150"/>
  93. </el-table>
  94. <div style="position: fixed;bottom: 20px;right: 10px;">
  95. <pagination
  96. v-show="total>0"
  97. :total="total"
  98. v-model:page="queryParams.pageNum"
  99. v-model:limit="queryParams.pageSize"
  100. @pagination="getList"
  101. />
  102. </div>
  103. <el-dialog :title="upload.title" v-model="upload.open" width="400px" append-to-body>
  104. <el-upload ref="uploadRef" :limit="1" accept=".xlsx, .xls" :headers="upload.headers"
  105. :action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading"
  106. :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag>
  107. <el-icon class="el-icon--upload">
  108. <upload-filled/>
  109. </el-icon>
  110. <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
  111. <template #tip>
  112. <div class="el-upload__tip text-center">
  113. <span>仅允许导入xls、xlsx格式文件。</span>
  114. </div>
  115. </template>
  116. </el-upload>
  117. <template #footer>
  118. <div class="dialog-footer">
  119. <el-button type="primary" @click="submitFileForm">确 定</el-button>
  120. <el-button @click="upload.open = false">取 消</el-button>
  121. </div>
  122. </template>
  123. </el-dialog>
  124. </div>
  125. </template>
  126. <script setup name="Licensing">
  127. import {
  128. listLicensing,
  129. getLicensing,
  130. delLicensing,
  131. delLicensingBatch
  132. } from "@/api/basicData/xcrAdministrativeLicensing";
  133. import {reactive, ref, toRaw} from "vue";
  134. import {getToken} from "@/utils/auth";
  135. import {ElMessage} from "element-plus";
  136. import {likeQueryMethod} from "@/utils/likeQueryMethod";
  137. const {proxy} = getCurrentInstance();
  138. const xcrAdministrativeLicensingList = ref([]);
  139. const open = ref(false);
  140. const loading = ref(true);
  141. const showSearch = ref(true);
  142. const ids = ref([]);
  143. const single = ref(true);
  144. const multiple = ref(true);
  145. const total = ref(0);
  146. const title = ref("");
  147. const upload = reactive({
  148. // 是否显示弹出层(用户导入)
  149. open: false,
  150. // 弹出层标题(用户导入)
  151. title: '',
  152. // 是否禁用上传
  153. isUploading: false,
  154. // 设置上传的请求头部
  155. headers: {Authorization: getToken()},
  156. // 上传的地址
  157. url: import.meta.env.VITE_APP_BASE_API + '/xcrAdministrativeLicensing/importData'
  158. })
  159. const handleFileSuccess = (e) => {
  160. if (e.code == 200) {
  161. ElMessage({
  162. type: "success",
  163. message: e.msg
  164. })
  165. getList()
  166. proxy.$refs['uploadRef']?.clearFiles()
  167. } else {
  168. ElMessage({
  169. type: "error",
  170. message: e.msg
  171. })
  172. proxy.$refs['uploadRef']?.clearFiles()
  173. }
  174. }
  175. function submitFileForm() {
  176. proxy.$refs['uploadRef']?.submit();
  177. upload.open = false;
  178. }
  179. function handleImport() {
  180. upload.open = true
  181. }
  182. const data = reactive({
  183. form: {},
  184. queryParams: {
  185. pageNum: 1,
  186. pageSize: 20,
  187. BZ: null,
  188. FBZT: null,
  189. ISLATE: null,
  190. UNID: null,
  191. xkFddbrzjlxOther: null,
  192. xkFrdb: null,
  193. xkFrZjhm: null,
  194. xkFrZjlx: null,
  195. xkJdrq: null,
  196. xkLbOther: null,
  197. xkLydw: null,
  198. xkLydwdm: null,
  199. xkNr: null,
  200. xkWsh: null,
  201. xkXdrGszc: null,
  202. xkXdrLb: null,
  203. xkXdrShxym: null,
  204. xkXdrShzz: null,
  205. xkXdrSwdj: null,
  206. xkXdrSydw: null,
  207. xkXdrZjhm: null,
  208. xkXdrZjlx: null,
  209. xkXdrZzjg: null,
  210. xkXkbh: null,
  211. xkXkjg: null,
  212. xkXkjgdm: null,
  213. xkXklb: null,
  214. xkXkws: null,
  215. xkXkzs: null,
  216. xkYxqz: null,
  217. xkYxqzi: null,
  218. xkZjlxOther: null,
  219. xkZt: null,
  220. batchNo: null,
  221. createUser: null,
  222. dataCode: null,
  223. depId: null,
  224. entityCode: null,
  225. entityCodeAdd: null,
  226. entityName: null,
  227. entityType: null,
  228. inventoryId: null,
  229. inventorySourceId: null,
  230. isDel: null,
  231. metaId: null,
  232. orgId: null,
  233. reportState: null,
  234. status: null,
  235. updateUser: null,
  236. uniCode: ''
  237. },
  238. rules: {
  239. }
  240. });
  241. const {queryParams, form, rules} = toRefs(data);
  242. /** 查询行政许可信息列表 */
  243. function getList() {
  244. loading.value = true;
  245. let toServerObj = likeQueryMethod('uni_code', queryParams.value.uniCode, queryParams.value.pageNum, queryParams.value.pageSize);
  246. listLicensing(toServerObj).then(response => {
  247. xcrAdministrativeLicensingList.value = response.records;
  248. total.value = response.total;
  249. loading.value = false;
  250. });
  251. }
  252. // 表单重置
  253. function reset() {
  254. form.value = {
  255. xhCodeId: null,
  256. BZ: null,
  257. FBZT: null,
  258. ISLATE: null,
  259. UNID: null,
  260. xkFddbrzjlxOther: null,
  261. xkFrdb: null,
  262. xkFrZjhm: null,
  263. xkFrZjlx: null,
  264. xkJdrq: null,
  265. xkLbOther: null,
  266. xkLydw: null,
  267. xkLydwdm: null,
  268. xkNr: null,
  269. xkWsh: null,
  270. xkXdrGszc: null,
  271. xkXdrLb: null,
  272. xkXdrShxym: null,
  273. xkXdrShzz: null,
  274. xkXdrSwdj: null,
  275. xkXdrSydw: null,
  276. xkXdrZjhm: null,
  277. xkXdrZjlx: null,
  278. xkXdrZzjg: null,
  279. xkXkbh: null,
  280. xkXkjg: null,
  281. xkXkjgdm: null,
  282. xkXklb: null,
  283. xkXkws: null,
  284. xkXkzs: null,
  285. xkYxqz: null,
  286. xkYxqzi: null,
  287. xkZjlxOther: null,
  288. xkZt: null,
  289. batchNo: null,
  290. createTime: null,
  291. createUser: null,
  292. dataCode: null,
  293. depId: null,
  294. entityCode: null,
  295. entityCodeAdd: null,
  296. entityName: null,
  297. entityType: null,
  298. id: null,
  299. inventoryId: null,
  300. inventorySourceId: null,
  301. isDel: null,
  302. metaId: null,
  303. orgId: null,
  304. reportState: null,
  305. status: "0",
  306. updateTime: null,
  307. updateUser: null,
  308. uniCode: ''
  309. };
  310. proxy.resetForm("xcrAdministrativeLicensingRef");
  311. }
  312. /** 搜索按钮操作 */
  313. function handleQuery() {
  314. queryParams.value.pageNum = 1;
  315. getList();
  316. }
  317. /** 重置按钮操作 */
  318. function resetQuery() {
  319. proxy.resetForm("queryRef");
  320. handleQuery();
  321. }
  322. // 多选框选中数据
  323. function handleSelectionChange(selection) {
  324. ids.value = selection.map(item => item.xhCodeId);
  325. single.value = selection.length != 1;
  326. multiple.value = !selection.length;
  327. }
  328. /** 删除按钮操作 */
  329. async function handleDelete(row) {
  330. const res = await delLicensing();
  331. if(res.code == 200){
  332. ElMessage({
  333. type:'success',
  334. message:'删除成功'
  335. })
  336. getList();
  337. }
  338. }
  339. /** 批量删除*/
  340. const batchDelete = (row)=>{
  341. const idsToS = row.xhCodeId || ids.value;
  342. (proxy.$modal).confirm('是否确认删除这' + idsToS.length+'条的数据项?').then(function() {
  343. return delLicensingBatch(toRaw(idsToS));
  344. }).then(() => {
  345. getList();
  346. proxy.$modal.msgSuccess("删除成功");
  347. }).catch(() => {});
  348. }
  349. /** 导出按钮操作 */
  350. function handleExport() {
  351. proxy.download('basicData/xcrAdministrativeLicensing/export', {
  352. ...queryParams.value
  353. }, `行政许可信息_${new Date().getTime()}.xlsx`)
  354. }
  355. getList();
  356. </script>