TaskCheckList.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548
  1. <template>
  2. <div>
  3. <a-page-header
  4. style="background-color: #FFFFFF;"
  5. title="客户列表"
  6. sub-title=""
  7. @back="goBack"
  8. >
  9. <a-descriptions :title="task.taskName" :column="3" :bordered="false">
  10. <a-descriptions-item label="状态">
  11. <a-tag :color="task.taskStateColor">{{ task.taskStateText }}</a-tag>
  12. </a-descriptions-item>
  13. <a-descriptions-item label="开始时间">{{ task.taskStartTime }}</a-descriptions-item>
  14. <a-descriptions-item label="结束时间">{{ task.taskEndTime }}</a-descriptions-item>
  15. <!-- <a-descriptions-item label="描述"><span v-html="task.description"></span></a-descriptions-item>-->
  16. </a-descriptions>
  17. <a-divider style="margin: 6px;"/>
  18. </a-page-header>
  19. <a-card :bordered="false" style="margin-top: -20px;">
  20. <a-tabs :active-key="currentTab" default-active-key="all" @change="tabChange">
  21. <a-tab-pane key="all" :tab="tabAll"></a-tab-pane>
  22. <a-tab-pane key="undo" :tab="tabUndo"></a-tab-pane>
  23. <a-tab-pane key="uncheck" :tab="tabUncheck"></a-tab-pane>
  24. <a-tab-pane key="checked" :tab="tabChecked"></a-tab-pane>
  25. <a-tab-pane key="passed" :tab="tabPassed"></a-tab-pane>
  26. </a-tabs>
  27. <!-- 查询区域 -->
  28. <div class="table-page-search-wrapper">
  29. <a-form layout="inline" @keyup.enter.native="searchQuery">
  30. <a-row :gutter="24">
  31. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  32. <a-form-item label="客户编号">
  33. <j-input placeholder="请输入客户编号" v-model="queryParam.customerNo"></j-input>
  34. </a-form-item>
  35. </a-col>
  36. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  37. <a-form-item label="客户名称">
  38. <j-input placeholder="请输入客户名称" v-model="queryParam.customerName"></j-input>
  39. </a-form-item>
  40. </a-col>
  41. <template v-if="toggleSearchStatus">
  42. </template>
  43. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  44. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  45. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  46. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  47. <a @click="handleToggleSearch" style="margin-left: 8px">
  48. {{ toggleSearchStatus ? '收起' : '展开' }}
  49. <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
  50. </a>
  51. </span>
  52. </a-col>
  53. </a-row>
  54. </a-form>
  55. </div>
  56. <!-- 查询区域-END -->
  57. <!-- 操作按钮区域 -->
  58. <div class="table-operator">
  59. <a-button v-has="'specialApply:task:check:import:custiom'" type="primary" icon="download"
  60. @click="importCustiom">导入客户
  61. </a-button>
  62. <a-button type="primary" icon="download" @click="handleExportXls('客户列表')">导出</a-button>
  63. <!-- 高级查询区域 -->
  64. <a-dropdown v-if="selectedRowKeys.length > 0">
  65. <a-menu slot="overlay">
  66. <a-menu-item key="1" @click="batchDel" v-has="'task:check:list:delete'">
  67. <a-icon type="delete"/>
  68. 删除
  69. </a-menu-item>
  70. </a-menu>
  71. <a-button style="margin-left: 8px"> 批量操作
  72. <a-icon type="down"/>
  73. </a-button>
  74. </a-dropdown>
  75. </div>
  76. <!-- table区域-begin -->
  77. <div>
  78. <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  79. <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a
  80. style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
  81. <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  82. </div>
  83. <a-table
  84. ref="table"
  85. size="middle"
  86. :scroll="{x:true}"
  87. bordered
  88. rowKey="id"
  89. :columns="columns"
  90. :dataSource="dataSource"
  91. :pagination="ipagination"
  92. :loading="loading"
  93. :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  94. class="j-table-force-nowrap"
  95. @change="handleTableChange">
  96. <template slot="action" slot-scope="text, record">
  97. <span v-has="'special:task:check:list:upload:improve'"
  98. v-if="record.checkState == 0 || record.checkState == 1">
  99. <a @click="showImprove(record)">上传资料</a>
  100. <a-divider type="vertical"/>
  101. </span>
  102. <span v-has="'special:task:check:list:upload:improve'" v-if="record.checkState == 4">
  103. <a @click="showUpload(record)">整改</a>
  104. <a-divider type="vertical"/>
  105. </span>
  106. <span v-has="'special:task:check:list:submit'" v-if="record.checkState == 1 || record.checkState == 4">
  107. <a @click="handSubmit(record)">提交</a>
  108. <a-divider type="vertical"/>
  109. </span>
  110. <span v-has="'special:task:check:list:audit'" v-if="record.checkState === 2 || record.checkState === 3">
  111. <a @click="showCheckCheck(record)">稽核</a>
  112. <a-divider type="vertical"/>
  113. </span>
  114. <span v-has="'special:task:check:list:history'" v-if="record.checkState >= 4">
  115. <a @click="showCheckLog(record)">历史</a>
  116. <a-divider type="vertical"/>
  117. </span>
  118. <span v-has="'special:task:check:list:notice'"
  119. v-if="record.checkState != 2 && record.checkState != 3 && record.checkState != 5">
  120. <a @click="noticeDeal(record)">催办</a>
  121. <a-divider type="vertical"/>
  122. </span>
  123. <a-dropdown>
  124. <a class="ant-dropdown-link">更多
  125. <a-icon type="down"/>
  126. </a>
  127. <a-menu slot="overlay">
  128. <a-menu-item v-has="'task:check:list:delete'">
  129. <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
  130. <a>删除</a>
  131. </a-popconfirm>
  132. </a-menu-item>
  133. <a-menu-item v-has="'task:check:list:clear'">
  134. <a-popconfirm title="确定清空吗?" @confirm="() => dataDelete(record.id)">
  135. <a>清空</a>
  136. </a-popconfirm>
  137. </a-menu-item>
  138. </a-menu>
  139. </a-dropdown>
  140. </template>
  141. <template v-slot:customerName="text, record">
  142. <a @click="showCheckDetail(record)">{{ text }}</a>
  143. </template>
  144. <template v-slot:checkState="status">
  145. <a-badge :status="status | statusTypeFilter" :text="status | statusFilter"/>
  146. </template>
  147. <template v-slot:rowIndex="text,records,index">
  148. {{ (ipagination.current - 1) * ipagination.pageSize + Number(index) + 1 }}
  149. </template>
  150. </a-table>
  151. </div>
  152. <!-- table区域 end -->
  153. </a-card>
  154. </div>
  155. </template>
  156. <script>
  157. import {postAction, getAction, httpAction, deleteAction} from '@api/manage'
  158. import '@/assets/less/TableExpand.less'
  159. import {JeecgListMixin} from '@/mixins/JeecgListMixin'
  160. export default {
  161. name: 'TaskCheckList',
  162. mixins: [JeecgListMixin],
  163. inject: ['closeCurrent'],
  164. data() {
  165. let _self = this;
  166. return {
  167. description: '稽核详情页面',
  168. currentTab: 'all',
  169. currentCheckState: null,
  170. task: {
  171. id: '',
  172. taskName: '',
  173. taskStartTime: '',
  174. taskEndTime: '',
  175. description: '',
  176. taskState: 0,
  177. taskStateText: '',
  178. taskStateColor: '',
  179. },
  180. tabAll: '全部(0)',
  181. tabUndo: '未完善(0)',
  182. tabUncheck: '待稽核(0)',
  183. tabChecked: '待整改(0)',
  184. tabPassed: '稽核通过(0)',
  185. count: 0,
  186. undoCount: 0,
  187. uncheckCount: 0,
  188. checkedCount: 0,
  189. passedCount: 0,
  190. columns: [
  191. {
  192. title: '#',
  193. dataIndex: '',
  194. key: 'rowIndex',
  195. width: 60,
  196. align: "center",
  197. scopedSlots: {customRender: 'rowIndex'}
  198. },
  199. {
  200. title: '提交材料日期',
  201. align: "center",
  202. dataIndex: 'submitSpecialDate'
  203. },
  204. {
  205. title: '机主姓名',
  206. align: "center",
  207. width: 60,
  208. dataIndex: 'customerName',
  209. scopedSlots: {customRender: 'customerName'}
  210. },
  211. {
  212. title: '号码',
  213. align: "center",
  214. dataIndex: 'smsNumber'
  215. },
  216. {
  217. title: '关停标签',
  218. align: "center",
  219. dataIndex: 'shutdownLabel'
  220. },
  221. {
  222. title: '漫游被关停日期(ABM查询)',
  223. align: "center",
  224. dataIndex: 'shutdownLabelDate'
  225. },
  226. {
  227. title: '三级部门',
  228. align: "center",
  229. dataIndex: 'staffDeptLevel3'
  230. },
  231. {
  232. title: '复开时间',
  233. align: "center",
  234. dataIndex: 'reopenTime'
  235. },
  236. {
  237. title: '有无特审单',
  238. align: "center",
  239. dataIndex: 'materialLabel'
  240. },
  241. {
  242. title: '是否自查实名制合规',
  243. align: "center",
  244. dataIndex: 'nameFindCompliance'
  245. },
  246. {
  247. title: '负责人',
  248. align: "center",
  249. dataIndex: 'staffName'
  250. },
  251. {
  252. title: '负责人工号',
  253. align: "center",
  254. sorter: true,
  255. dataIndex: 'staffNo'
  256. },
  257. {
  258. title: '导入时间',
  259. align: "center",
  260. sorter: true,
  261. dataIndex: 'createTime'
  262. },
  263. {
  264. title: '更新时间',
  265. align: "center",
  266. sorter: true,
  267. dataIndex: 'updateTime'
  268. },
  269. {
  270. title: '稽核进度',
  271. align: "center",
  272. sorter: true,
  273. dataIndex: 'checkState',
  274. scopedSlots: {customRender: 'checkState'}
  275. },
  276. {
  277. title: '操作',
  278. dataIndex: 'action',
  279. align: "center",
  280. scopedSlots: {customRender: 'action'}
  281. }
  282. ],
  283. isorter: {
  284. column: 'checkState',
  285. order: 'asc',
  286. },
  287. url: {
  288. queryTask: "/smsCheck/task/queryById",
  289. list: "/smsCheck/customerInfo/list",
  290. count: "/smsCheck/customerInfo/count",
  291. delete: "/smsCheck/customerInfo/delete",
  292. edit: "/smsCheck/customerInfo/edit",
  293. notice: "/smsCheck/customerInfo/notice",
  294. editCheck: "/smsCheck/customerInfo/edit/check/state",
  295. dataDelete: "/smsCheck/customerData/clear",
  296. exportXlsUrl: "smsCheck/customerInfo/exportXls",
  297. },
  298. autoSearch: false,
  299. }
  300. },
  301. created() {
  302. this.task.id = this.$route.query.id;
  303. this.queryTaskById(this.task.id);
  304. this.queryParam.taskId = this.task.id;
  305. this.loadData();
  306. this.loadTabNumber(this.task.id);
  307. },
  308. filters: {
  309. statusTypeFilter(type) {
  310. const statusTypeMap = {
  311. '0': 'error',
  312. '1': 'error',
  313. '2': 'warning',
  314. '3': 'warning',
  315. '4': 'processing',
  316. '5': 'success'
  317. }
  318. return statusTypeMap[type]
  319. },
  320. statusFilter(status) {
  321. const statusMap = {
  322. '0': '未完善',
  323. '1': '未完善',
  324. '2': '待稽核',
  325. '3': '待稽核',
  326. '4': '待整改',
  327. '5': '通过'
  328. }
  329. return statusMap[status]
  330. }
  331. },
  332. methods: {
  333. /**导入客户列表*/
  334. importCustiom() {
  335. this.$router.push({path: '/specialApply/task/import', query: {id: this.task.id}});
  336. },
  337. // 返回上一级
  338. goBack() {
  339. this.$router.go(-1);
  340. //关闭当前页面
  341. this.closeCurrent();
  342. },
  343. // 上传客户资料
  344. showImprove(record) {
  345. this.$router.push({path: '/specialApply/data/upload', query: {id: record.id, data: record}});
  346. },
  347. // 整改
  348. showUpload(record) {
  349. this.$router.push({path: '/specialApply/data/upload', query: {id: record.id, data: record,rectification:true}});
  350. },
  351. // 显示上传页面
  352. handSubmit(record) {
  353. let that = this;
  354. let model = {
  355. id: record.id,
  356. }
  357. postAction(this.url.editCheck, model)
  358. .then((res) => {
  359. if (res.success) {
  360. that.$message.success(res.message)
  361. that.loadData(that.ipagination.current);
  362. } else {
  363. that.$message.warning(res.message)
  364. }
  365. }).finally(() => {
  366. })
  367. },
  368. dataDelete(id) {
  369. var that = this;
  370. deleteAction(that.url.dataDelete, {infoId: id}).then((res) => {
  371. if (res.success) {
  372. that.$message.success('附件资料清空完成!');
  373. } else {
  374. that.$message.warning('附件资料清空失败!');
  375. }
  376. });
  377. },
  378. // 稽核点击事件
  379. showCheckCheck(record) {
  380. this.$router.push({path: '/specialApply/modules/TaskCheckAudit', query: {id: record.id}});
  381. },
  382. // 显示稽核详情页面
  383. showCheckDetail(record) {
  384. this.$router.push({path: '/specialApply/modules/TaskCheckDetails', query: {id: record.id, data: record}});
  385. },
  386. // 显示稽核历史页面
  387. showCheckLog(record) {
  388. this.$router.push({path: '/sms/check/task/check/log', query: {id: record.id}});
  389. },
  390. // 构建任务信息
  391. buildTaskInfo(record) {
  392. let taskInfo = Object.assign({}, this.task);
  393. taskInfo.count = this.count;
  394. taskInfo.undoCount = this.undoCount;
  395. taskInfo.uncheckCount = this.uncheckCount;
  396. taskInfo.checkedCount = this.checkedCount;
  397. taskInfo.passedCount = this.passedCount;
  398. return {
  399. task: this.task,
  400. info: record
  401. }
  402. },
  403. handleCancel() {
  404. this.visible = false;
  405. },
  406. detail(record) {
  407. this.model = Object.assign({}, record);
  408. this.visible = true;
  409. },
  410. searchQuery() {
  411. this.loadData(1);
  412. this.selectedRowKeys = [];
  413. this.selectionRows = [];
  414. this.loadTabNumber(this.task.id);
  415. },
  416. searchReset() {
  417. this.queryParam = {};
  418. this.queryParam.taskId = this.task.id;
  419. this.queryParam.checkState_MultiString = this.currentCheckState;
  420. this.tabChange('all');
  421. this.loadTabNumber(this.queryParam.taskId);
  422. },
  423. tabChange(key) {
  424. // 稽核状态(0:未处理;1:未完善;2:待稽核;3:待整改;4:已整改;5:稽核通过;)
  425. if (key === 'all') {
  426. this.currentCheckState = null;
  427. this.queryParam.checkState_MultiString = this.currentCheckState;
  428. this.currentTab = 'all';
  429. } else if (key === 'undo') {
  430. this.currentCheckState = '0,1';
  431. this.queryParam.checkState_MultiString = this.currentCheckState;
  432. this.currentTab = 'undo';
  433. } else if (key === 'uncheck') {
  434. this.currentCheckState = '2,3';
  435. this.queryParam.checkState_MultiString = this.currentCheckState;
  436. this.currentTab = 'uncheck';
  437. } else if (key === 'checked') {
  438. this.currentCheckState = '4';
  439. this.queryParam.checkState_MultiString = this.currentCheckState;
  440. this.currentTab = 'checked';
  441. } else if (key === 'passed') {
  442. this.currentCheckState = '5';
  443. this.queryParam.checkState_MultiString = this.currentCheckState;
  444. this.currentTab = 'passed';
  445. }
  446. this.loadData(1);
  447. },
  448. loadTabNumber(taskId) {
  449. let url = this.url.count;
  450. let params = {
  451. id: taskId
  452. }
  453. let that = this;
  454. getAction(url, params).then(res => {
  455. let {result} = res;
  456. if (result) {
  457. that.count = result.count;
  458. that.undoCount = result.undoCount;
  459. that.uncheckCount = result.uncheckCount;
  460. that.checkedCount = result.checkedCount;
  461. that.passedCount = result.passedCount;
  462. that.tabAll = '全部(' + result.count + ')';
  463. that.tabUndo = '未完善(' + result.undoCount + ')';
  464. that.tabUncheck = '待稽核(' + result.uncheckCount + ')';
  465. that.tabChecked = '待整改(' + result.checkedCount + ')';
  466. that.tabPassed = '稽核通过(' + result.passedCount + ')';
  467. }
  468. }).finally(() => {
  469. })
  470. },
  471. noticeDeal(record) {
  472. let url = this.url.notice;
  473. let params = {
  474. customerName: record.customerName,
  475. smsNumber: record.smsNumber,
  476. staffNo: record.staffNo,
  477. userNo: record.userNo,
  478. }
  479. let that = this;
  480. postAction(url, params).then(res => {
  481. let {result} = res;
  482. if (res.success) {
  483. that.$message.info('已通知客户经理,进行材料补充!');
  484. }
  485. }).finally(() => {
  486. })
  487. },
  488. queryTaskById(id) {
  489. let url = this.url.queryTask;
  490. let params = {
  491. id: id
  492. }
  493. let that = this;
  494. getAction(url, params).then(res => {
  495. if (res.success) {
  496. that.task = res.result;
  497. that.getTaskState(that.task.taskState);
  498. }
  499. }).finally(() => {
  500. })
  501. },
  502. getTaskState(taskState) {
  503. if (taskState === 0) {
  504. this.task.taskStateColor = '#fadb14';
  505. this.task.taskStateText = '未开始';
  506. } else if (taskState === 1) {
  507. this.task.taskStateColor = '#1890ff';
  508. this.task.taskStateText = '稽核中';
  509. } else if (taskState === 2) {
  510. this.task.taskStateColor = '#52c41a';
  511. this.task.taskStateText = '稽核完成';
  512. }
  513. }
  514. }
  515. }
  516. </script>
  517. <style scoped>
  518. </style>