index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767
  1. <template>
  2. <div style="width: 100%; height: 100%; position: relative">
  3. <!-- 工单池 -->
  4. <template-page
  5. v-if="!(!!~['detail'].indexOf(pageType) && pageCode != '') && showTableBool"
  6. ref="pageRef"
  7. :getList="getList"
  8. :operation="operation()"
  9. :exportList="exportList"
  10. :optionsEvensGroup="optionsEvensGroup"
  11. :columnParsing="columnParsing"
  12. :tableAttributes="tableAttributes"
  13. :tableEvents="tableEvents"
  14. :moreParameters="moreParameters"
  15. :screeningAnalysis="screeningAnalysis"
  16. :filterMethod="filterMethod"
  17. :replaceOrNotMap="true"
  18. :defaultSearchData="defaultSearchData"
  19. >
  20. <!-- <div slot="moreSearch">
  21. <div style="margin-bottom: 10px">
  22. <span
  23. style="
  24. font-size: 12px;
  25. font-weight: 400;
  26. text-align: left;
  27. color: #666;
  28. line-height: 28px;
  29. margin-right: 10px;
  30. "
  31. >选择年份</span
  32. >
  33. <el-date-picker
  34. style="width: 130px"
  35. v-model="value1"
  36. format="yyyy"
  37. size="mini"
  38. type="year"
  39. placeholder="选择日期"
  40. >
  41. </el-date-picker>
  42. </div>
  43. </div> -->
  44. <!-- 创建工单 -->
  45. <div class="cartographer_big" v-if="!(!!~['detail'].indexOf(pageType) && pageCode != '')">
  46. <el-dialog
  47. title="创建工单"
  48. width="100%"
  49. :modal="false"
  50. :visible.sync="createFormBool"
  51. :before-close="handleClose"
  52. >
  53. <workOrderInfo :workOrderType="workOrderType" v-if="createFormBool" :cloneWorkOrder="cloneWorkOrder" />
  54. </el-dialog>
  55. </div>
  56. <!-- 批量预约/改约 -->
  57. <div class="cartographer_big" v-if="!(!!~['detail'].indexOf(pageType) && pageCode != '')">
  58. <el-dialog
  59. title="批量约单"
  60. width="100%"
  61. :modal="false"
  62. :visible.sync="rescheduleBool"
  63. :before-close="rescheduleClose"
  64. >
  65. <Reschedule v-if="rescheduleBool" :recordSelected="recordSelected" @close="rescheduleClose" />
  66. </el-dialog>
  67. </div>
  68. <!-- 批量派工/改派 -->
  69. <div class="cartographer_big" v-if="!(!!~['detail'].indexOf(pageType) && pageCode != '')">
  70. <el-dialog
  71. title="批量派单"
  72. width="100%"
  73. :modal="false"
  74. :visible.sync="reassignmentBool"
  75. :before-close="reassignmentClose"
  76. >
  77. <Reassignment v-if="reassignmentBool" :recordSelected="recordSelected" @close="reassignmentClose" />
  78. </el-dialog>
  79. </div>
  80. <div class="tubiao">
  81. <span style="margin-right: 4px; font-weight: bold; font-size: 12px">工单标识说明:</span>
  82. <img :src="v4" style="width: 20px; height: 20px; margin: 0 3px" />
  83. <span style="margin-right: 4px; font-size: 12px; display: inline-block; width: 76px">【4.0工单】</span>
  84. <img :src="gc" style="width: 20px; height: 20px; margin: 0 3px" />
  85. <span style="margin-right: 4px; font-size: 12px; display: inline-block; width: 76px">【工程】</span>
  86. <img :src="jj" style="width: 20px; height: 20px; margin: 0 3px" />
  87. <span style="margin-right: 4px; font-size: 12px; display: inline-block; width: 76px">【加急】</span>
  88. <img :src="ls" style="width: 20px; height: 20px; margin: 0 3px" />
  89. <span style="margin-right: 4px; font-size: 12px; display: inline-block; width: 76px">【零售】</span>
  90. <img :src="yjs" style="width: 20px; height: 20px; margin: 0 3px" />
  91. <span style="margin-right: 4px; font-size: 12px; display: inline-block; width: 76px">【已结算】</span>
  92. </div>
  93. <div class="tubiao2">
  94. <span style="margin-right: 4px; font-weight: bold; font-size: 12px; opacity: 0">工单标识说明:</span>
  95. <img :src="ywg" style="width: 20px; height: 20px; margin: 0 3px" />
  96. <span style="margin-right: 4px; font-size: 12px; display: inline-block; width: 76px">【已完工】</span>
  97. <img :src="yc" style="width: 20px; height: 20px; margin: 0 3px" />
  98. <span style="margin-right: 4px; font-size: 12px; display: inline-block; width: 76px">【异常】</span>
  99. <img :src="zj" style="width: 20px; height: 20px; margin: 0 3px" />
  100. <span style="margin-right: 4px; font-size: 12px; display: inline-block; width: 76px">【自建工单】</span>
  101. <img :src="pjsq" style="width: 20px; height: 20px; margin: 0 3px" />
  102. <span style="margin-right: 4px; font-size: 12px; display: inline-block; width: 76px">【配件申请】</span>
  103. <img :src="pjdh" style="width: 20px; height: 20px; margin: 0 3px" />
  104. <span style="margin-right: 4px; font-size: 12px; display: inline-block; width: 76px">【配件到货】</span>
  105. <img :src="pjqx" style="width: 20px; height: 20px; margin: 0 3px" />
  106. <span style="margin-right: 4px; font-size: 12px; display: inline-block; width: 76px">【配件取消】</span>
  107. </div>
  108. </template-page>
  109. <!-- 工单详情 -->
  110. <div class="cartographer_big haidhead__" v-if="!!~['detail'].indexOf(pageType) && pageCode != ''">
  111. <el-dialog
  112. class="noinonnlinin"
  113. :title="'工单详情-' + id"
  114. width="100%"
  115. :modal="false"
  116. :visible.sync="detailFormBool"
  117. :before-close="handleClose"
  118. >
  119. <Detail v-if="detailFormBool" :id="id" :workOrderType="workOrderType" />
  120. </el-dialog>
  121. </div>
  122. </div>
  123. </template>
  124. <script>
  125. import { EventBus } from '@/utils/eventBus'
  126. import TemplatePage from '@/components/template/template-page-1.vue'
  127. import import_mixin from '@/components/template/import_mixin.js'
  128. import operation_mixin from '@/components/template/operation_mixin.js'
  129. import { listPageV2 } from '@/api/workOrder/orderType'
  130. import {
  131. orderBaseList,
  132. orderBaseListExport,
  133. orderBaseStatusCount,
  134. orderEsBaseListEs,
  135. orderEsBaseListExportEs,
  136. orderEsBaseStatusCountEs,
  137. orderBaseImport,
  138. orderBaseImport2,
  139. orderBaseImport3,
  140. orderBaseDetail,
  141. changeOrderChangWebsit,
  142. orderBaseDow
  143. } from '@/api/workOrderPool.js'
  144. import workOrderInfo from '../workOrderPool/detailModule/workOrderInfo/index.vue'
  145. import Detail from '../workOrderPool/detail'
  146. import Reassignment from '../workOrderPool/components/reassignment/index.vue'
  147. import Reschedule from '../workOrderPool/components/reschedule/index.vue'
  148. import { commonTemplateDownload } from '@/api/common.js'
  149. import orderListColumn from '@/mixin/orderListColumn'
  150. // -----------------------
  151. import v4 from '@/assets/order/4.0@2x.png'
  152. import gc from '@/assets/order/工程@2x.png'
  153. import jj from '@/assets/order/加急@2x.png'
  154. import ls from '@/assets/order/零售@2x.png'
  155. import yjs from '@/assets/order/已结算@2x.png'
  156. import ywg from '@/assets/order/已完工待结算@2x@2x.png'
  157. import yc from '@/assets/order/异常@2x.png'
  158. import zj from '@/assets/order/自建@2x.png'
  159. import pjsq from '@/assets/order/配件申请中@2x.png'
  160. import pjdh from '@/assets/order/配件已到货@2x.png'
  161. import pjqx from '@/assets/order/配件已取消@2x.png'
  162. import { orderStatus_v_fh } from '@/views/workOrder/workOrderPool/mixins/orderStatus_FH.js'
  163. export default {
  164. components: {
  165. TemplatePage,
  166. workOrderInfo,
  167. Detail,
  168. Reassignment,
  169. Reschedule
  170. },
  171. mixins: [import_mixin, operation_mixin, orderListColumn],
  172. data() {
  173. return {
  174. v4,
  175. gc,
  176. jj,
  177. ls,
  178. yjs,
  179. ywg,
  180. yc,
  181. zj,
  182. pjsq,
  183. pjdh,
  184. pjqx,
  185. id: this.$route.query.id || '',
  186. // 创建表单
  187. createFormBool: false,
  188. // 详情
  189. detailFormBool: true,
  190. // 批量改约
  191. rescheduleBool: false,
  192. // 批量派工/改派
  193. reassignmentBool: false,
  194. // 表格属性
  195. tableAttributes: {
  196. // 启用勾选列
  197. selectColumn: true
  198. // selectable: this.selectable
  199. },
  200. // 表格事件
  201. tableEvents: {
  202. 'selection-change': this.selectionChange
  203. },
  204. recordSelected: [],
  205. orderTypeList: [],
  206. orderStatusList: [],
  207. defaultSearchData: [],
  208. workOrderType: 1,
  209. cloneWorkOrder: null,
  210. // value1: new Date(),
  211. showTableBool: true,
  212. fuhezhuangtai: {
  213. DSHPG: [
  214. 'DSHPG',
  215. 'CJ',
  216. 'YPD',
  217. 'DXSPD',
  218. 'DZBPG',
  219. 'DWDSPGP',
  220. 'DXSSPGP',
  221. 'DTJXSSPGP',
  222. 'DZBSPGP',
  223. 'DFZXPD',
  224. 'DFZXSPGP'
  225. ],
  226. DWDPG: ['DWDPG', 'DWDPD'],
  227. FWZ: ['FWZ', 'GCSZT', 'BFWG', 'DSM', 'WDBH', 'XSBH', 'TJXSBH', 'ZBBH', 'FZXBH'],
  228. YWG: ['YWG', 'GCSZX', 'WDWG', 'YWGO'],
  229. YJS: ['YJS', 'LRCD'],
  230. YQX: ['YQX', 'FWZT', 'YCGB', 'FWQX', 'FL', 'YZP']
  231. }
  232. }
  233. },
  234. watch: {
  235. // value1() {
  236. // this.showTableBool = false
  237. // this.$nextTick(() => {
  238. // this.showTableBool = true
  239. // })
  240. // }
  241. },
  242. computed: {
  243. moreParameters() {
  244. return [
  245. {
  246. name: '工单类型',
  247. key: 'orderSmallTypeText',
  248. value: '',
  249. conditions: [
  250. {
  251. label: '全部',
  252. value: ''
  253. },
  254. ...this.orderTypeList
  255. ]
  256. },
  257. {
  258. name: '工单状态',
  259. key: 'orderStatus',
  260. value: this.pageType == 'orderStatus' && this.pageCode ? this.pageCode : '',
  261. conditions: [
  262. {
  263. label: '全部',
  264. value: ''
  265. },
  266. ...this.orderStatusList
  267. ]
  268. }
  269. ]
  270. },
  271. // 用户信息
  272. userInfo() {
  273. return JSON.parse(localStorage.getItem('greemall_user'))
  274. },
  275. // 事件组合
  276. optionsEvensGroup() {
  277. return [
  278. [
  279. [
  280. this.optionsEvensAuth(['createWorkOrder', 'createWbWorkOrder'], {
  281. name: '创建工单',
  282. click: () => {}
  283. }),
  284. this.optionsEvensAuth('createWorkOrder', {
  285. click: () => {
  286. this.workOrderType = 1
  287. this.createFormBool = true
  288. }
  289. }),
  290. this.optionsEvensAuth('createGCWorkOrder', {
  291. click: () => {
  292. this.workOrderType = 2
  293. this.createFormBool = true
  294. }
  295. }),
  296. this.optionsEvensAuth('createWbWorkOrder', {
  297. click: () => {
  298. this.workOrderType = 4
  299. this.createFormBool = true
  300. }
  301. })
  302. ],
  303. [
  304. this.optionsEvensAuth(
  305. [
  306. 'import4',
  307. 'importTemplate',
  308. 'downloadImportTemplate',
  309. 'downloadImportTemplate4',
  310. 'importTemplate2',
  311. 'downloadImportTemplate2'
  312. ],
  313. {
  314. name: '导入工单',
  315. click: () => {}
  316. }
  317. ),
  318. this.optionsEvensAuth('import4', ({ moduleName }) => {
  319. return {
  320. name: moduleName,
  321. render: () => {
  322. return this.importButton(orderBaseImport3, moduleName)
  323. }
  324. }
  325. }),
  326. this.optionsEvensAuth('downloadImportTemplate4', {
  327. click: () => {
  328. commonTemplateDownload({ name: '4.0工单导入模板.xlsx' }, `4.0工单导入模板`)
  329. .then(res => {
  330. this.$message({
  331. message: '下载成功',
  332. type: 'success'
  333. })
  334. })
  335. .catch(err => {
  336. this.$message.error('下载失败')
  337. })
  338. }
  339. }),
  340. this.optionsEvensAuth('importTemplate', ({ moduleName }) => {
  341. return {
  342. name: moduleName,
  343. render: () => {
  344. return this.importButton(orderBaseImport, moduleName)
  345. }
  346. }
  347. }),
  348. this.optionsEvensAuth('downloadImportTemplate', {
  349. click: () => {
  350. commonTemplateDownload({ name: '工单导入模板.xlsx' }, `工单导入模板`)
  351. .then(res => {
  352. this.$message({
  353. message: '下载成功',
  354. type: 'success'
  355. })
  356. })
  357. .catch(err => {
  358. this.$message.error('下载失败')
  359. })
  360. }
  361. }),
  362. this.optionsEvensAuth('importTemplate2', ({ moduleName }) => {
  363. return {
  364. name: moduleName,
  365. render: () => {
  366. return this.importButton(orderBaseImport2, moduleName)
  367. }
  368. }
  369. }),
  370. this.optionsEvensAuth('downloadImportTemplate2', {
  371. click: () => {
  372. commonTemplateDownload({ name: '工单导入模板2.xlsx' }, `${this.$route.meta.title}`)
  373. .then(res => {
  374. this.$message({
  375. message: '下载成功',
  376. type: 'success'
  377. })
  378. })
  379. .catch(err => {
  380. this.$message.error('下载失败')
  381. })
  382. }
  383. })
  384. ],
  385. [
  386. this.optionsEvensAuth(['bulkOrder', 'lotOrder'], {
  387. name: '批量操作',
  388. click: () => {}
  389. }),
  390. this.optionsEvensAuth('bulkOrder', {
  391. click: () => {
  392. if (this.recordSelected.length === 0) {
  393. this.$message.warning('请勾选工单')
  394. return
  395. }
  396. this.reassignmentBool = true
  397. }
  398. }),
  399. this.optionsEvensAuth('lotOrder', {
  400. click: () => {
  401. if (this.recordSelected.length === 0) {
  402. this.$message.warning('请勾选工单')
  403. return
  404. }
  405. this.rescheduleBool = true
  406. }
  407. })
  408. ],
  409. [
  410. this.optionsEvensAuth('changeOrderChangWebsit', {
  411. click: () => {
  412. if (this.recordSelected.length === 0) {
  413. this.$message.warning('请勾选工单')
  414. return
  415. }
  416. changeOrderChangWebsit({
  417. ids: this.recordSelected.map(item => item.id)
  418. }).then(res => {
  419. this.$message({
  420. type: 'success',
  421. message: '操作成功!'
  422. })
  423. this.$refs?.pageRef?.refreshList()
  424. })
  425. }
  426. })
  427. ],
  428. [
  429. this.optionsEvensAuth('headquartersDownload', {
  430. click: () => {
  431. if (this.recordSelected.length === 0) {
  432. this.$message.warning('请勾选工单')
  433. return
  434. }
  435. orderBaseDow({ orderBaseId: this.recordSelected.map(item => item.id).join(',') })
  436. .then(res => {
  437. // this.$message({
  438. // type: 'success',
  439. // message: '操作成功!'
  440. // })
  441. this.$refs?.pageRef?.refreshList()
  442. })
  443. .catch(() => {})
  444. }
  445. })
  446. ]
  447. ]
  448. ]
  449. }
  450. },
  451. created() {
  452. this.initFun()
  453. EventBus.$on('handleOrderClone', () => {
  454. if (!(!!~['detail'].indexOf(this.pageType) && this.pageCode != '')) {
  455. this.handleClose()
  456. }
  457. })
  458. EventBus.$on('cloneWorkOrder', data => {
  459. if (!(!!~['detail'].indexOf(this.pageType) && this.pageCode != '')) {
  460. this.handleClose(() => {
  461. this.cloneWorkOrder = data
  462. this.workOrderType = data.saleType
  463. this.createFormBool = false
  464. this.$nextTick(() => {
  465. this.createFormBool = true
  466. })
  467. })
  468. }
  469. })
  470. if (!(!!~['detail'].indexOf(this.pageType) && this.pageCode != '')) {
  471. // 获取工单类型
  472. listPageV2({ pageNum: 1, pageSize: -1, params: [{ param: 'a.status', compare: '=', value: 'true' }] }).then(
  473. res => {
  474. var obj = {}
  475. res.data.records.map(item => {
  476. if (!obj[item.orderSmallTypeText]) {
  477. obj[item.orderSmallTypeText] = {
  478. value: item.orderSmallTypeText,
  479. label: item.orderSmallTypeText
  480. }
  481. }
  482. })
  483. this.orderTypeList = Object.values(obj)
  484. }
  485. )
  486. }
  487. },
  488. methods: {
  489. initFun() {
  490. if (this.pageType == 'detail') {
  491. this.id = this.pageCode
  492. orderBaseDetail({
  493. orderBaseId: this.id
  494. }).then(res => {
  495. this.workOrderType = Number(res?.data?.saleType)
  496. this.$nextTick(() => {
  497. this.detailFormBool = true
  498. })
  499. })
  500. }
  501. if (this.pageType == 'saleOrderId') {
  502. this.defaultSearchData = [{ param: 'a.sale_order_id', compare: '=', value: this.pageCode, label: '销售订单号' }]
  503. }
  504. if (this.pageType == 'pgIncreItemId') {
  505. this.defaultSearchData = [
  506. { param: 'a.pg_incre_order_id', compare: '=', value: this.pageCode, label: '增置服务订单ID' }
  507. ]
  508. }
  509. if (this.pageType == 'rpProjectRepairId') {
  510. this.defaultSearchData = [
  511. { param: 'a.rp_project_repair_id', compare: '=', value: this.pageCode, label: '维保配置ID' }
  512. ]
  513. }
  514. if (this.pageType == 'projectNo') {
  515. this.defaultSearchData = [{ param: 'a.project_no', compare: '=', value: this.pageCode, label: '工程编号' }]
  516. }
  517. },
  518. selectable(row, index) {
  519. var orderStatus = Object.entries(row.selectMapData.orderStatus).find(([key, val]) => val == row.orderStatus)?.[0]
  520. return (
  521. !row.isThreeOrder &&
  522. !['YWG', 'GCSZX', 'WDWG', 'YWGO'].includes(orderStatus) &&
  523. !['YJS', 'LRCD'].includes(orderStatus) &&
  524. !['YQX', 'FWZT', 'YCGB', 'FWQX', 'FL'].includes(orderStatus) &&
  525. !row.rpProjectRepairId &&
  526. !row.isImportExcel
  527. )
  528. },
  529. screeningAnalysis(jname, val) {
  530. if (jname == 'orderFlags') {
  531. return (val || []).map(item => item.tagName).join(',')
  532. } else {
  533. return val
  534. }
  535. },
  536. filterMethod(value, row, column) {
  537. if (column['property'] == 'orderFlags') {
  538. return (row[column['property']] || []).map(item => item.tagName).join(',') === value
  539. }
  540. return row[column['property']] === value
  541. },
  542. // 获取统计
  543. getOrderBaseStatusCount(...p) {
  544. orderEsBaseStatusCountEs(...p).then(res => {
  545. this.orderStatusList = [
  546. {
  547. label: '待预约',
  548. value: 'DYY'
  549. },
  550. {
  551. label: '待抢单',
  552. value: 'DQD'
  553. },
  554. {
  555. label: '待商户派工',
  556. value: 'DSHPG'
  557. },
  558. {
  559. label: '待网点派工',
  560. value: 'DWDPG'
  561. },
  562. {
  563. label: '小程序待接单',
  564. value: 'DJD'
  565. },
  566. {
  567. label: '服务中',
  568. value: 'FWZ'
  569. },
  570. {
  571. label: '异常单',
  572. value: 'YCD'
  573. },
  574. {
  575. label: '已完工',
  576. value: 'YWG'
  577. },
  578. {
  579. label: '已结算',
  580. value: 'YJS'
  581. },
  582. {
  583. label: '已取消',
  584. value: 'YQX'
  585. },
  586. {
  587. label: '配件申请中',
  588. value: 'PJSQZ'
  589. },
  590. {
  591. label: '配件已到货',
  592. value: 'PJYDH'
  593. },
  594. {
  595. label: '配件已取消',
  596. value: 'PJYQX'
  597. },
  598. {
  599. label: '待支付',
  600. value: 'fucaidaizhifu'
  601. }
  602. ].map(item => {
  603. if (item.value === 'fucaidaizhifu') {
  604. item.label = `${item.label}(${res.data.find(val => val.orderStatus == 'DZF')?.total || 0})`
  605. } else if (this.fuhezhuangtai[item.value]) {
  606. var num = 0
  607. this.fuhezhuangtai[item.value].map(status => {
  608. num += res.data.find(val => val.orderStatus == status)?.total || 0
  609. })
  610. item.label = `${item.label}(${num || 0})`
  611. } else {
  612. var data = res.data.find(val => val.orderStatus == item.value)
  613. item.label = `${item.label}(${data?.total || 0})`
  614. }
  615. return item
  616. })
  617. })
  618. },
  619. // 列表请求函数
  620. getList(p, cb) {
  621. var pam = JSON.parse(JSON.stringify(p))
  622. try {
  623. if (pam.orderStatus) {
  624. if (pam.orderStatus == 'fucaidaizhifu') {
  625. pam.isWait = true
  626. } else if (this.fuhezhuangtai[pam.orderStatus]) {
  627. pam.params.push({ param: 'a.order_status', compare: '=', value: this.fuhezhuangtai[pam.orderStatus] })
  628. pam.orderStatus = ''
  629. } else {
  630. pam.params.push({ param: 'a.order_status', compare: '=', value: pam.orderStatus })
  631. }
  632. }
  633. if (pam.orderSmallTypeText) {
  634. pam.params.push({ param: 'a.order_small_type_text', compare: '=', value: pam.orderSmallTypeText })
  635. }
  636. // if (this.value1) {
  637. // pam.params.push(
  638. // { param: 'a.create_time', compare: '>=', value: `${new Date(this.value1).getFullYear()}-01-01 00:00:00` },
  639. // { param: 'a.create_time', compare: '<=', value: `${new Date(this.value1).getFullYear()}-12-31 23:59:59` }
  640. // )
  641. // }
  642. cb && cb(pam)
  643. return orderEsBaseListEs(pam)
  644. } catch (err) {
  645. } finally {
  646. this.$nextTick(() => {
  647. this.getOrderBaseStatusCount({
  648. orderSmallTypeText: pam.orderSmallTypeText || ''
  649. // ...(() => {
  650. // if (this.value1) {
  651. // return {
  652. // startTime: `${new Date(this.value1).getFullYear()}-01-01 00:00:00`,
  653. // endTime: `${new Date(this.value1).getFullYear()}-12-31 23:59:59`
  654. // }
  655. // }
  656. // return {}
  657. // })()
  658. })
  659. })
  660. }
  661. },
  662. // 列表导出函数
  663. exportList: orderEsBaseListExportEs,
  664. // 监听勾选变化
  665. selectionChange(data) {
  666. this.recordSelected = data
  667. },
  668. operation() {
  669. return this.operationBtn({
  670. edit: {
  671. click: ({ row, index, column }) => {
  672. this.$router.push({
  673. name: window.isWorkOrderPoolPath,
  674. params: {
  675. pageName: row.id,
  676. pageType: 'detail',
  677. pageCode: row.id
  678. }
  679. })
  680. }
  681. }
  682. })
  683. },
  684. handleClose(cb) {
  685. this.$router.push({
  686. name: window.isWorkOrderPoolPath,
  687. params: {},
  688. query: {}
  689. })
  690. this.$nextTick(() => {
  691. this.cloneWorkOrder = null
  692. this.createFormBool = false
  693. this.detailFormBool = false
  694. this.recordSelected = []
  695. this.$refs?.pageRef?.refreshList()
  696. if (cb && typeof cb === 'function') {
  697. cb()
  698. }
  699. })
  700. },
  701. rescheduleClose() {
  702. this.rescheduleBool = false
  703. this.recordSelected = []
  704. this.$refs?.pageRef?.refreshList()
  705. },
  706. reassignmentClose() {
  707. this.reassignmentBool = false
  708. this.recordSelected = []
  709. this.$refs?.pageRef?.refreshList()
  710. }
  711. }
  712. }
  713. </script>
  714. <style lang="scss" scoped>
  715. .haidhead__ {
  716. ::v-deep .noinonnlinin {
  717. & > div > .el-dialog__header {
  718. display: none !important;
  719. }
  720. & > div > .el-dialog__body {
  721. width: 100%;
  722. height: 100% !important;
  723. position: relative;
  724. box-sizing: border-box;
  725. padding: 0px;
  726. overflow-y: auto;
  727. }
  728. }
  729. }
  730. .tubiao {
  731. position: absolute;
  732. bottom: 35px;
  733. left: 20px;
  734. z-index: 10;
  735. width: 60%;
  736. height: auto;
  737. display: flex;
  738. justify-content: flex-start;
  739. align-items: center;
  740. z-index: -1;
  741. }
  742. .tubiao2 {
  743. position: absolute;
  744. bottom: 5px;
  745. left: 20px;
  746. z-index: 10;
  747. width: 60%;
  748. height: auto;
  749. display: flex;
  750. justify-content: flex-start;
  751. align-items: center;
  752. z-index: -1;
  753. }
  754. </style>