index.vue 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361
  1. <!-- 报装申请 1 -->
  2. <template>
  3. <div id="machineAccount">
  4. <div class="head">
  5. <el-form :inline="true" class="demo-form-inline" size="small">
  6. <el-form-item label="关键字">
  7. <el-input v-model="keys" clearable placeholder="请输入编号、名称、地址" />
  8. </el-form-item>
  9. <el-form-item label="当前环节:">
  10. <el-select v-model="currentStep" clearable filterable placeholder="请选择当前环节">
  11. <el-option v-for="item in optionData" :key="item.id" :label="item.label" :value="item.id" />
  12. </el-select>
  13. </el-form-item>
  14. <el-form-item label="申请日期">
  15. <el-date-picker
  16. v-model="applyDate"
  17. type="daterange"
  18. format="yyyy年MM月dd日"
  19. value-format="yyyy-MM-dd"
  20. range-separator="-"
  21. start-placeholder="开始日期"
  22. end-placeholder="结束日期"
  23. />
  24. </el-form-item>
  25. <el-form-item>
  26. <el-button type="primary" size="small" icon="el-icon-search" @click="searchBtn">查询</el-button>
  27. </el-form-item>
  28. </el-form>
  29. </div>
  30. <div class="modal_box">
  31. <div class="form">
  32. <el-dialog v-dialogDrag title="报装详情" :visible.sync="dialogVisible" width="80%">
  33. <div class="dialog_style" :style="{ height: mapHeight }">
  34. <ProcessDetails v-if="dialogVisible" ref="processDetails" style="height:100%" :data="editData" :map-height="mapHeightT" :active-names="['apply','headViews']" :is-look="isLook" :process-instance-id="processInstanceId" :destroy-on-close="true" />
  35. </div>
  36. </el-dialog>
  37. </div>
  38. </div>
  39. <div class="main">
  40. <tf-table
  41. :loading="listLoading"
  42. :table-data="list"
  43. :column="column"
  44. :pagination="true"
  45. :pagesize="pagination.size"
  46. :currentpage="pagination.current"
  47. :for-id="true"
  48. :tableheight="tableheight"
  49. :border="true"
  50. :multiple="false"
  51. :total="total"
  52. :isdelete="false"
  53. @rowDblclick="rowDblclick"
  54. @handleCurrentChange="handleCurrentChange"
  55. @handleSizeChange="handleSizeChange"
  56. @handleSelectionChange="handleSelectionChange"
  57. @detail="detail"
  58. />
  59. </div>
  60. </div>
  61. </template>
  62. <script>
  63. import { client } from '@/utils/index'
  64. import ProcessDetails from '../processDetails/indexTabs.vue'
  65. import { getInstallList } from '@/api/dcApi/installationProcess/process.js'
  66. export default {
  67. name: 'MachineAccount',
  68. components: { ProcessDetails },
  69. data() {
  70. return {
  71. keys: '',
  72. applyDate: '',
  73. currentStep: '',
  74. optionData: [
  75. {
  76. id: 'apply',
  77. label: '报装申请'
  78. },
  79. {
  80. id: 'installChargeSuggest',
  81. label: '安装负责人意见'
  82. },
  83. {
  84. id: 'managerChargeApproval',
  85. label: '分管经理批示'
  86. },
  87. {
  88. id: 'managerApproval',
  89. label: '经理批示'
  90. },
  91. {
  92. id: 'survey',
  93. label: '上门勘察'
  94. },
  95. {
  96. id: 'pay',
  97. label: '用户缴费'
  98. },
  99. {
  100. id: 'construction',
  101. label: '上门施工'
  102. },
  103. {
  104. id: 'check',
  105. label: '工程验收'
  106. },
  107. {
  108. id: 'finished',
  109. label: '已完结'
  110. }
  111. ],
  112. column: [
  113. {
  114. label: '报装编号',
  115. prop: 'applyInstallNo',
  116. width: 200
  117. },
  118. {
  119. label: '用户名称',
  120. prop: 'consumerName'
  121. },
  122. {
  123. label: '业务类型',
  124. prop: 'buinessTypeName'
  125. },
  126. {
  127. label: '详细地址',
  128. prop: 'consumerAddress'
  129. },
  130. {
  131. label: '安装数量',
  132. prop: 'installNum'
  133. },
  134. {
  135. label: '申请人',
  136. prop: 'applyUserName'
  137. },
  138. {
  139. label: '联系电话',
  140. prop: 'contactPhoneNo'
  141. },
  142. {
  143. label: '申请日期',
  144. prop: 'applyDate'
  145. },
  146. {
  147. label: '勘察日期',
  148. prop: 'surveyDate'
  149. },
  150. {
  151. label: '缴费日期',
  152. prop: 'chargeTime'
  153. },
  154. {
  155. label: '安装日期',
  156. prop: 'installTime'
  157. },
  158. {
  159. label: '验收日期',
  160. prop: 'checkTime'
  161. },
  162. {
  163. label: '当前环节',
  164. prop: 'currentNodeName'
  165. },
  166. {
  167. slotScoped: 'operation',
  168. label: '操作',
  169. acts: [{ emitWay: 'detail', color: '#0000FF', operation: '详情' }]
  170. }
  171. ],
  172. list: [],
  173. total: 0,
  174. editData: {},
  175. selectedData: [],
  176. multipleSelection: [],
  177. pagination: { current: 1, size: 30, approvalPersonId: sessionStorage.getItem('userId') },
  178. listLoading: true,
  179. dialogVisible: false,
  180. isLook: false,
  181. processInstanceId: 0, visible: false
  182. }
  183. },
  184. computed: {
  185. tableheight() {
  186. return client().height - 64 - 43 - 40 - 55 + 'px'
  187. },
  188. mapHeight() {
  189. return client().height - 134 - (client().height * 0.02) + 'px'
  190. },
  191. mapHeightT() {
  192. return client().height - 134 - 193 - (client().height * 0.02) + 'px'
  193. }
  194. },
  195. watch: {
  196. },
  197. created() {
  198. this.fetchData(this.pagination)
  199. },
  200. methods: {
  201. handleCurrentChange(currentPage) {
  202. this.pagination.current = currentPage
  203. this.fetchData(this.pagination)
  204. },
  205. handleSizeChange(pagesize) {
  206. this.pagination.current = 1
  207. this.pagination.size = pagesize
  208. this.fetchData(this.pagination)
  209. },
  210. handleSelectionChange(value) {
  211. this.multipleSelection = value
  212. },
  213. fetchData(data) {
  214. this.listLoading = true
  215. getInstallList({
  216. ...data,
  217. applyStatus: 2
  218. }).then((res) => {
  219. if (res.code === 1) {
  220. this.total = res.result.total
  221. this.list = res.result.records
  222. this.list.map(e => {
  223. e.applyDate = e.applyDate.split(' ')[0]
  224. })
  225. this.listLoading = false
  226. }
  227. })
  228. },
  229. searchBtn() {
  230. this.pagination.current = 1
  231. this.keys ? this.pagination.keys = this.keys : delete this.pagination.keys
  232. this.currentStep ? this.pagination.queryNodeAlias = this.currentStep : delete this.pagination.queryNodeAlias
  233. if (this.applyDate) {
  234. console.log('this.applyDate', this.applyDate)
  235. this.pagination.applyInstallTimeStart = this.applyDate[0]
  236. this.pagination.applyInstallTimeEnd = this.applyDate[1]
  237. } else {
  238. delete this.pagination.applyInstallTimeStart
  239. delete this.pagination.applyInstallTimeEnd
  240. }
  241. this.fetchData(this.pagination)
  242. },
  243. submitForm() {
  244. this.$refs.form.submitForm()
  245. },
  246. rowDblclick(row) {
  247. console.log(row)
  248. },
  249. detail(val) {
  250. if (val.id) {
  251. this.editData = val
  252. this.processInstanceId = val.processInstanceId
  253. } else {
  254. this.editData = this.multipleSelection[0]
  255. this.processInstanceId = this.multipleSelection[0].processInstanceId
  256. }
  257. this.processInstanceId = this.processInstanceId || 0
  258. this.dialogTitle = '详情'
  259. this.dialogVisible = true
  260. this.isLook = false
  261. },
  262. remind(data) {
  263. this.dialogVisible = false
  264. this.searchBtn()
  265. }
  266. }
  267. }
  268. </script>
  269. <style lang="scss" scoped>
  270. #machineAccount {
  271. margin: 20px;
  272. .el-form-item {
  273. margin-bottom: 15px;
  274. }
  275. .modal_box {
  276. /deep/ .el-dialog__wrapper {
  277. display: flex;
  278. justify-content: center;
  279. align-items: center;
  280. padding: 20px 0;
  281. box-sizing: border-box;
  282. .el-dialog {
  283. margin-top: 0vh !important;
  284. font-size: 12px;
  285. .el-date-editor {
  286. width: 100%;
  287. }
  288. .el-dialog__body {
  289. padding: 10px 0px !important;
  290. }
  291. .el-dialog__header {
  292. height: 40px;
  293. padding: 7px 0;
  294. .el-dialog__headerbtn {
  295. position: absolute;
  296. top: 0px;
  297. right: 0px;
  298. height: 40px;
  299. padding: 7px 20px;
  300. }
  301. background-color: #2d74e7;
  302. .el-dialog__title {
  303. color: #dfeffe;
  304. }
  305. .el-icon-close:before {
  306. color: #fff;
  307. }
  308. }
  309. .el-input__inner {
  310. height: 34px;
  311. }
  312. .el-form {
  313. padding: 0 35px;
  314. box-sizing: border-box;
  315. .el-form-item {
  316. margin-bottom: 14px;
  317. }
  318. }
  319. .el-dialog__footer {
  320. padding: 0 20px 5px !important;
  321. }
  322. }
  323. }
  324. .text-space {
  325. /deep/.el-link--inner {
  326. font-size: 12px;
  327. max-width: 650px;
  328. // 1.先强制一行内显示文本
  329. white-space: nowrap;
  330. // 2.超出部分隐藏
  331. overflow: hidden;
  332. // 3.文字用省略号替换超出的部分
  333. text-overflow: ellipsis;
  334. }
  335. }
  336. }
  337. }
  338. .dialog_style {
  339. width: 100%;
  340. /deep/ .el-table {
  341. text-align: center;
  342. vertical-align: middle;
  343. }
  344. }
  345. </style>