TaskCheckList.vue 18 KB

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