TaskCheckList.vue 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  1. <template>
  2. <div>
  3. <a-page-header
  4. style="background-color: #FFFFFF;"
  5. title="稽核详情-客户列表"
  6. sub-title=""
  7. @back="showList"
  8. >
  9. <a-descriptions :title="task.name" size="small" :bordered="true" :column="3">
  10. <a-descriptions-item label="状态"><a-tag color="blue">{{task.stateText}}</a-tag></a-descriptions-item>
  11. <a-descriptions-item label="开始时间">{{task.startTime}}</a-descriptions-item>
  12. <a-descriptions-item label="结束时间">{{task.endTime}}</a-descriptions-item>
  13. <a-descriptions-item label="描述">{{task.description}}</a-descriptions-item>
  14. </a-descriptions>
  15. <!-- <a-divider style="margin: 6px;"/>-->
  16. </a-page-header>
  17. <a-card :bordered="false" style="margin-top: -15px;">
  18. <a-tabs default-active-key="1" @change="tabChange">
  19. <a-tab-pane key="all" :tab="tabAll"></a-tab-pane>
  20. <a-tab-pane key="undo" :tab="tabUndo"></a-tab-pane>
  21. <a-tab-pane key="uncheck" :tab="tabUncheck"></a-tab-pane>
  22. <a-tab-pane key="checked" :tab="tabChecked"></a-tab-pane>
  23. <a-tab-pane key="passed" :tab="tabPassed"></a-tab-pane>
  24. </a-tabs>
  25. <!-- 查询区域 -->
  26. <div class="table-page-search-wrapper">
  27. <a-form layout="inline" @keyup.enter.native="searchQuery">
  28. <a-row :gutter="24">
  29. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  30. <a-form-item label="客户编号">
  31. <j-input placeholder="请输入客户编号" v-model="queryParam.customerNo"></j-input>
  32. </a-form-item>
  33. </a-col>
  34. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  35. <a-form-item label="客户名称">
  36. <j-input placeholder="请输入客户名称" v-model="queryParam.customerName"></j-input>
  37. </a-form-item>
  38. </a-col>
  39. <template v-if="toggleSearchStatus">
  40. </template>
  41. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  42. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  43. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  44. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  45. <a @click="handleToggleSearch" style="margin-left: 8px">
  46. {{ toggleSearchStatus ? '收起' : '展开' }}
  47. <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
  48. </a>
  49. </span>
  50. </a-col>
  51. </a-row>
  52. </a-form>
  53. </div>
  54. <!-- 查询区域-END -->
  55. <!-- table区域-begin -->
  56. <div>
  57. <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  58. <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
  59. <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  60. </div>
  61. <a-table
  62. ref="table"
  63. size="middle"
  64. :scroll="{x:true}"
  65. bordered
  66. rowKey="id"
  67. :columns="columns"
  68. :dataSource="dataSource"
  69. :pagination="ipagination"
  70. :loading="loading"
  71. :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  72. class="j-table-force-nowrap"
  73. @change="handleTableChange">
  74. <template slot="htmlSlot" slot-scope="text">
  75. <div v-html="text"></div>
  76. </template>
  77. <template slot="imgSlot" slot-scope="text,record">
  78. <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
  79. <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
  80. </template>
  81. <template slot="fileSlot" slot-scope="text">
  82. <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
  83. <a-button
  84. v-else
  85. :ghost="true"
  86. type="primary"
  87. icon="download"
  88. size="small"
  89. @click="downloadFile(text)">
  90. 下载
  91. </a-button>
  92. </template>
  93. <span slot="action" slot-scope="text, record">
  94. <!-- <a @click="handleEdit(record)">编辑</a>-->
  95. <!-- <a-divider type="vertical" />-->
  96. <a @click="showCheckDetail(record)">详情</a>
  97. <a-divider type="vertical" />
  98. <a-dropdown>
  99. <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
  100. <a-menu slot="overlay">
  101. <a-menu-item>
  102. <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
  103. <a>删除</a>
  104. </a-popconfirm>
  105. </a-menu-item>
  106. </a-menu>
  107. </a-dropdown>
  108. </span>
  109. </a-table>
  110. </div>
  111. <!-- table区域 end -->
  112. </a-card>
  113. </div>
  114. </template>
  115. <script>
  116. import { httpAction, getAction } from '@api/manage'
  117. import '@/assets/less/TableExpand.less'
  118. import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  119. export default {
  120. name: 'TaskCheckList',
  121. mixins:[JeecgListMixin],
  122. props: {
  123. task: {
  124. type: Object,
  125. require: true
  126. }
  127. },
  128. data () {
  129. return {
  130. description: '稽核详情页面',
  131. tabAll: '全部(0)',
  132. tabUndo: '未完善(0)',
  133. tabUncheck: '待稽核(0)',
  134. tabChecked: '待整改(0)',
  135. tabPassed: '稽核通过(0)',
  136. count: 0,
  137. undoCount: 0,
  138. uncheckCount: 0,
  139. checkedCount: 0,
  140. passedCount: 0,
  141. columns: [
  142. {
  143. title: '#',
  144. dataIndex: '',
  145. key:'rowIndex',
  146. width:60,
  147. align:"center",
  148. customRender:function (t,r,index) {
  149. return parseInt(index)+1;
  150. }
  151. },
  152. {
  153. title:'客户编号',
  154. align:"center",
  155. dataIndex: 'customerNo'
  156. },
  157. {
  158. title:'客户名称',
  159. align:"center",
  160. dataIndex: 'customerName'
  161. },
  162. {
  163. title:'服务号码(全)',
  164. align:"center",
  165. dataIndex: 'smsNumber'
  166. },
  167. {
  168. title:'用户编号',
  169. align:"center",
  170. dataIndex: 'userNo'
  171. },
  172. {
  173. title:'入网时间',
  174. align:"center",
  175. dataIndex: 'networkAccessTime'
  176. },
  177. {
  178. title:'用户状态',
  179. align:"center",
  180. dataIndex: 'userState'
  181. },
  182. {
  183. title:'员工姓名',
  184. align:"center",
  185. dataIndex: 'staffName'
  186. },
  187. {
  188. title:'员工工号',
  189. align:"center",
  190. dataIndex: 'staffNo'
  191. },
  192. {
  193. title: '操作',
  194. dataIndex: 'action',
  195. align:"center",
  196. fixed:"right",
  197. width:147,
  198. scopedSlots: { customRender: 'action' }
  199. }
  200. ],
  201. url: {
  202. list: "/smsCheck/customerInfo/list",
  203. count: "/smsCheck/customerInfo/count",
  204. delete: "/smsCheck/task/delete",
  205. edit: "/smsCheck/task/edit",
  206. },
  207. autoSearch: false,
  208. }
  209. },
  210. created() {
  211. this.queryParam.taskId = this.task.id;
  212. this.loadData();
  213. let url = this.url.count;
  214. let params = {
  215. id: this.task.id
  216. }
  217. let that = this;
  218. getAction(url, params).then(res => {
  219. let { result } = res;
  220. if (result) {
  221. that.count = result.count;
  222. that.undoCount = result.undoCount;
  223. that.uncheckCount = result.uncheckCount;
  224. that.checkedCount = result.checkedCount;
  225. that.passedCount = result.passedCount;
  226. that.tabAll= '全部(' + result.count + ')';
  227. that.tabUndo= '未完善(' + result.undoCount + ')';
  228. that.tabUncheck= '待稽核(' + result.uncheckCount + ')';
  229. that.tabChecked= '待整改(' + result.checkedCount + ')';
  230. that.tabPassed= '稽核通过(' + result.passedCount + ')';
  231. }
  232. }).finally(() => {
  233. })
  234. },
  235. methods: {
  236. // 显示列表页面
  237. showList() {
  238. this.$emit('goList');
  239. },
  240. // 显示列表页面
  241. showCheckDetail(record) {
  242. let taskInfo = Object.assign({}, this.task);
  243. taskInfo.count = this.count;
  244. taskInfo.undoCount = this.undoCount;
  245. taskInfo.uncheckCount = this.uncheckCount;
  246. taskInfo.checkedCount = this.checkedCount;
  247. taskInfo.passedCount = this.passedCount;
  248. let info = {
  249. task: this.task,
  250. info: record
  251. };
  252. this.$emit('goCheckDetail', info);
  253. },
  254. handleCancel () {
  255. this.visible = false;
  256. },
  257. detail (record) {
  258. this.model = Object.assign({}, record);
  259. this.visible = true;
  260. },
  261. tabChange (key) {
  262. // 稽核状态(0:未处理;1:未完善;2:待稽核;3:待整改;4:已整改;5:稽核通过;)
  263. if (key === 'undo') {
  264. this.queryParam.checkState_MultiString = '0,1';
  265. } else if (key === 'uncheck') {
  266. this.queryParam.checkState_MultiString = '2,4';
  267. } else if (key === 'checked') {
  268. this.queryParam.checkState_MultiString = '3';
  269. } else if (key === 'passed') {
  270. this.queryParam.checkState_MultiString = '5';
  271. }
  272. this.loadData();
  273. },
  274. }
  275. }
  276. </script>
  277. <style scoped>
  278. </style>