home_list.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785
  1. <template>
  2. <template-page
  3. ref="pageRef"
  4. :getList="getList"
  5. :operation="operation()"
  6. :optionsEvensGroup="optionsEvensGroup"
  7. :exportList="exportList"
  8. :columnParsing="columnParsing"
  9. :tableAttributes="tableAttributes"
  10. :tableEvents="tableEvents"
  11. :fieldBeansHook="fieldBeansHook"
  12. :operationColumnWidth="200"
  13. >
  14. <div slot="moreSearch">
  15. <ul class="ulStyle">
  16. <li class="title">
  17. 金额:<span class="num">{{ (Number(numSum.amountC) || 0) | numToFixed }}</span>
  18. </li>
  19. <li class="title">
  20. 数量:<span class="num">{{ Number(numSum.totalC) || 0 | numToFixed }}</span>
  21. </li>
  22. </ul>
  23. <div class="worker">
  24. <div class="worker_left">工单状态</div>
  25. <div class="worker_right">
  26. <el-button
  27. v-for="(item, index) in workerState"
  28. :key="index"
  29. :type="orderStatusParam == item.value ? 'primary' : null"
  30. @click="handleOrderStatusParam(item.value, index)"
  31. size="mini"
  32. >{{ item.label }}</el-button
  33. >
  34. </div>
  35. </div>
  36. </div>
  37. <!-- <EditDateDialog :is-show.sync="isShowEditDateDialog" :date-form.sync="dateForm" /> -->
  38. <Popu v-if="isShowDetail || isShowForm || isShowExamine || isShowReturn">
  39. <HomeDetail v-if="isShowDetail" :list-item="queryItem" @backListFormDetail="backList" />
  40. <HomeForm v-if="isShowForm" :list-item="queryItem" @backListFormDetail="backList" />
  41. <HomeExamine v-if="isShowExamine" :list-item="queryItem" @backListFormDetail="backList" />
  42. <HomeReturn v-if="isShowReturn" :list-item="queryItem" @backListFormDetail="backList" />
  43. </Popu>
  44. </template-page>
  45. </template>
  46. <script>
  47. import TemplatePage from '@/components/template/template-page-1.vue'
  48. import Popu from '@/components/template/popu.vue'
  49. import add_callback_mixin from '@/components/template/add_callback_mixin.js'
  50. import {
  51. getOrderList,
  52. applyHome,
  53. withdrawHome,
  54. deleteHome,
  55. editDateHome,
  56. abandonHome,
  57. getEnginCountList,
  58. v2EnginOrderHomeList,
  59. v2EnginOrderHomeCountList,
  60. v2EnginOrderHomeListExport
  61. } from '@/api/supply/engin'
  62. import { getSalesmanList, getTypeList } from '@/api/common'
  63. import HomeDetail from '@/views/supply/engin/components/home_detail'
  64. import HomeForm from '@/views/supply/engin/components/home_form'
  65. import HomeExamine from '@/views/supply/engin/components/home_examine'
  66. import HomeReturn from '@/views/supply/engin/components/home_return'
  67. import EditDateDialog from '@/components/Common/edit-date-dialog'
  68. import { getNoRebateWalletList } from '@/api/policy_list'
  69. let that
  70. export default {
  71. mixins: [add_callback_mixin],
  72. components: {
  73. HomeDetail,
  74. HomeForm,
  75. HomeExamine,
  76. HomeReturn,
  77. EditDateDialog,
  78. TemplatePage,
  79. Popu
  80. },
  81. filters: {
  82. statusFilter(val) {
  83. const obj = that.statusList.find(o => o.value === val)
  84. return obj ? obj.label : ''
  85. },
  86. typeFilter(val) {
  87. const MAP = {
  88. TRADE: '商用',
  89. HOME: '家用'
  90. }
  91. return MAP[val]
  92. }
  93. },
  94. data() {
  95. return {
  96. orderStatusParam: '',
  97. workerState: [
  98. // {
  99. // label: '全部',
  100. // value: ''
  101. // },
  102. // {
  103. // label: '初审不通过',
  104. // value: 'FAIL_ONE'
  105. // },
  106. // {
  107. // label: '驳回',
  108. // value: 'REJECT'
  109. // },
  110. // {
  111. // label: '已确认未复核',
  112. // value: 'OK_ONE_AND_CONFIRM'
  113. // },
  114. // {
  115. // label: '弃审',
  116. // value: 'ABANDON'
  117. // },
  118. {
  119. label: '保存',
  120. value: 'SAVE'
  121. },
  122. // {
  123. // label: '关闭',
  124. // value: 'CLOSE'
  125. // },
  126. {
  127. label: '待审核',
  128. value: 'WAIT'
  129. },
  130. {
  131. label: '审核通过',
  132. value: 'OK'
  133. }
  134. // {
  135. // label: '初审不通过',
  136. // value: 'FAIL'
  137. // },
  138. // {
  139. // label: '初审通过',
  140. // value: 'OK_ONE'
  141. // }
  142. ],
  143. // 事件组合
  144. optionsEvensGroup: [
  145. [
  146. [
  147. {
  148. name: '新增',
  149. click: this.addOn(() => {
  150. this.toForm()
  151. }),
  152. isRole: this.$checkBtnRole('add', this.$route.meta.roles)
  153. }
  154. ]
  155. ],
  156. [
  157. [
  158. {
  159. name: '批量删除',
  160. click: async () => {
  161. if (this.recordSelected.length === 0) {
  162. this.$message.error('请选择需要删除的数据')
  163. return
  164. }
  165. this.batchDelete()
  166. },
  167. isRole: this.$checkBtnRole('del', this.$route.meta.roles)
  168. }
  169. ]
  170. ]
  171. ],
  172. // 表格属性
  173. tableAttributes: {
  174. // 启用勾选列
  175. selectColumn: true
  176. },
  177. // 表格事件
  178. tableEvents: {
  179. 'selection-change': this.selectionChange
  180. },
  181. recordSelected: [],
  182. currentPage: 1, // 当前页码
  183. pageSize: 10, // 每页数量
  184. listTotal: 0, // 列表总数
  185. dataList: null, // 列表数据
  186. listLoading: false, // 列表加载loading
  187. screenForm: {
  188. // 筛选表单数据
  189. status: [],
  190. orderNum: '',
  191. enginNum: '',
  192. loginNum: '',
  193. refTradeCategory: '',
  194. date: [],
  195. saleType: '',
  196. createMan: '',
  197. examineMan: '',
  198. salesMan: '',
  199. refUseUnit: '',
  200. materialOldNumber: '',
  201. specification: '',
  202. customerKeyword: '',
  203. refRegionWork: '',
  204. remark: '',
  205. geLiInerNote: '',
  206. refFactoryNo: '',
  207. refBuyUnitName: '',
  208. refPromiseProvide: '',
  209. isDirectTransfer: null,
  210. orderTime: [],
  211. saleTypeId: '',
  212. customerWalletId: ''
  213. },
  214. statusList: [
  215. { label: '已保存', value: 'SAVE' },
  216. { label: '待审核', value: 'WAIT' },
  217. { label: '审核通过', value: 'OK' }
  218. // // { label: '审核驳回', value: 'FAIL' },,
  219. // { label: '已关闭', value: 'CLOSE' },
  220. ],
  221. salesmanList: [],
  222. transfer: [
  223. { label: '是', value: true },
  224. { label: '否', value: false }
  225. ],
  226. multipleSelection: [],
  227. queryItem: {},
  228. isShowDetail: false,
  229. isShowForm: false,
  230. isShowExamine: false,
  231. isShowReturn: false,
  232. editId: null,
  233. isShowEditDateDialog: false,
  234. dateForm: {
  235. date: ''
  236. },
  237. isCollapse: true,
  238. salesTypeList: [],
  239. NoRebateWalletList: [],
  240. typeList: [],
  241. numSum: {
  242. totalC: 0,
  243. amountC: 0
  244. }
  245. }
  246. },
  247. computed: {
  248. exParams() {
  249. const ids = this.multipleSelection.map(item => {
  250. return item.enginOrderNo
  251. })
  252. return {
  253. examineStatus: this.screenForm.status.join(','),
  254. enginOrderNo: ids && ids.length ? ids.join(',') : this.screenForm.orderNum,
  255. refProjectNo: this.screenForm.enginNum,
  256. refEnginRecordNo: this.screenForm.loginNum,
  257. refTradeCategory: this.screenForm.refTradeCategory,
  258. startCreateTime: this.screenForm.date ? this.screenForm.date[0] : '',
  259. endCreateTime: this.screenForm.date ? this.screenForm.date[1] : '',
  260. startOrderTime: this.screenForm.orderTime ? this.screenForm.orderTime[0] : '',
  261. endOrderTime: this.screenForm.orderTime ? this.screenForm.orderTime[1] : '',
  262. saleTypeId: this.screenForm.saleType,
  263. createName: this.screenForm.createMan,
  264. confirmName: this.screenForm.examineMan,
  265. serviceId: this.screenForm.salesMan,
  266. refUseUnit: this.screenForm.refUseUnit,
  267. materialOldNumber: this.screenForm.materialOldNumber,
  268. specification: this.screenForm.specification,
  269. customerKeyword: this.screenForm.customerKeyword,
  270. refRegionWork: this.screenForm.refRegionWork,
  271. remark: this.screenForm.remark,
  272. geLiInerNote: this.screenForm.geLiInerNote,
  273. refFactoryNo: this.screenForm.refFactoryNo,
  274. refBuyUnitName: this.screenForm.refBuyUnitName,
  275. refPromiseProvide: this.screenForm.refPromiseProvide,
  276. isDirectTransfer: this.screenForm.isDirectTransfer,
  277. enginOrderType: 'HOME' // TRADE=商用 HOME=家用
  278. }
  279. },
  280. isCustomer() {
  281. return this.$store.getters.customerId && this.$store.getters.customerNumber
  282. }
  283. },
  284. beforeCreate() {
  285. that = this
  286. },
  287. created() {
  288. // this.getSalesTypeList()
  289. // this.getSalesmanList()
  290. // this.getList()
  291. },
  292. methods: {
  293. handleOrderStatusParam(value, index) {
  294. this.orderStatusParam = value
  295. this.$refs.pageRef.refreshList()
  296. },
  297. // 列表请求函数
  298. // getList: v2EnginOrderHomeList,
  299. async getList(...p) {
  300. this.$refs.pageRef.showTable = false
  301. try {
  302. let res = await v2EnginOrderHomeCountList(...p)
  303. this.numSum.totalC = res.data.totalC
  304. this.numSum.amountC = res.data.amountC
  305. } catch (error) {
  306. // console.log(error)
  307. }
  308. let params = {}
  309. if (this.orderStatusParam === '') {
  310. params = {
  311. moduleId: p[0].moduleId,
  312. orderBy: p[0].orderBy,
  313. pageNum: p[0].pageNum,
  314. pageSize: p[0].pageSize,
  315. params: [...p[0].params]
  316. }
  317. } else {
  318. params = {
  319. moduleId: p[0].moduleId,
  320. orderBy: p[0].orderBy,
  321. pageNum: p[0].pageNum,
  322. pageSize: p[0].pageSize,
  323. params: [{ param: 'a.examine_status', compare: '=', value: this.orderStatusParam }, ...p[0].params]
  324. }
  325. }
  326. return v2EnginOrderHomeList(params)
  327. },
  328. // 列表导出函数
  329. exportList: v2EnginOrderHomeListExport,
  330. // 表格列解析渲染数据更改
  331. columnParsing(item, defaultData) {
  332. return defaultData
  333. },
  334. // 监听勾选变化
  335. selectionChange(data) {
  336. this.recordSelected = data
  337. },
  338. fieldBeansHook(val) {
  339. val.map(item => {
  340. if (~['examine_status'].indexOf(item.colName)) {
  341. item.isQuery = false
  342. }
  343. })
  344. if (this.isCustomer !== '') {
  345. let res = val.filter(
  346. v => v.jname !== 'refPowerCategory' && v.jname !== 'geLiInerNote' && v.jname !== 'geLiNote'
  347. )
  348. return res
  349. } else {
  350. return val
  351. }
  352. },
  353. operation() {
  354. return (h, { row, index, column }) => {
  355. return (
  356. <div class="operation-btns">
  357. {row.examineStatus == '保存' ? (
  358. <el-popconfirm
  359. onOnConfirm={async () => {
  360. this.handleSubmit(row.parentId, row)
  361. }}
  362. title="是否确定需要申请该项内容?"
  363. >
  364. <el-button slot="reference" size="mini" type="text">
  365. 申请
  366. </el-button>
  367. </el-popconfirm>
  368. ) : (
  369. ''
  370. )}
  371. {row.examineStatus == '待审核' ? (
  372. <el-popconfirm
  373. onOnConfirm={async () => {
  374. this.handleWithdraw(row.parentId, row)
  375. }}
  376. title="是否确定需要撤回该项内容?"
  377. >
  378. <el-button slot="reference" size="mini" type="text">
  379. 撤回
  380. </el-button>
  381. </el-popconfirm>
  382. ) : (
  383. ''
  384. )}
  385. {this.$checkBtnRole('examine', this.$route.meta.roles) && row.examineStatus === '审核通过' ? (
  386. <el-popconfirm
  387. onOnConfirm={async () => {
  388. this.handleAbandon(row.parentId, row)
  389. }}
  390. title="是否确定需要弃审该项内容?"
  391. >
  392. <el-button slot="reference" size="mini" type="text">
  393. 弃审
  394. </el-button>
  395. </el-popconfirm>
  396. ) : (
  397. ''
  398. )}
  399. {this.$checkBtnRole('edit', this.$route.meta.roles) &&
  400. (row.examineStatus === '保存' || row.examineStatus === '审核不通过') ? (
  401. <el-button
  402. size="mini"
  403. type="text"
  404. onClick={async () => {
  405. this.toForm(row)
  406. }}
  407. >
  408. 编辑
  409. </el-button>
  410. ) : (
  411. ''
  412. )}
  413. {this.$checkBtnRole('examine', this.$route.meta.roles) && row.examineStatus === '待审核' ? (
  414. <el-button
  415. size="mini"
  416. type="text"
  417. onClick={async () => {
  418. this.toExamine(row)
  419. }}
  420. >
  421. 审批
  422. </el-button>
  423. ) : (
  424. ''
  425. )}
  426. {this.$checkBtnRole('examine', this.$route.meta.roles) && row.examineStatus !== '审核不通过' ? (
  427. <el-button
  428. size="mini"
  429. type="text"
  430. onClick={async () => {
  431. this.toReturn(row)
  432. }}
  433. >
  434. 退订
  435. </el-button>
  436. ) : (
  437. ''
  438. )}
  439. <el-button
  440. size="mini"
  441. type="text"
  442. onClick={async () => {
  443. this.toDetail(row)
  444. }}
  445. >
  446. 详情
  447. </el-button>
  448. {this.$checkBtnRole('del', this.$route.meta.roles) && row.examineStatus !== '审核通过' ? (
  449. <el-popconfirm
  450. onOnConfirm={async () => {
  451. this.handleDelete(row.parentId, row)
  452. }}
  453. title="是否确定需要删除该项内容?"
  454. >
  455. <el-button slot="reference" size="mini" type="text">
  456. 删除
  457. </el-button>
  458. </el-popconfirm>
  459. ) : (
  460. ''
  461. )}
  462. </div>
  463. )
  464. }
  465. },
  466. // 获取业务员列表
  467. getSalesmanList() {
  468. getSalesmanList({
  469. pageNum: 1,
  470. pageSize: -1,
  471. isCustomer: 0,
  472. status: true
  473. }).then(res => {
  474. this.salesmanList = res.data.records
  475. })
  476. getNoRebateWalletList({
  477. walletName: ''
  478. }).then(res => {
  479. console.log(res)
  480. this.NoRebateWalletList = res.data
  481. console.log(this.NoRebateWalletList)
  482. })
  483. getTypeList({ pageNum: 1, pageSize: -1 }).then(res => {
  484. this.typeList = res.data.records
  485. console.log(this.typeList)
  486. })
  487. },
  488. // 获取销售类型列表
  489. getSalesTypeList() {
  490. getTypeList({
  491. pageNum: 1,
  492. pageSize: -1
  493. }).then(res => {
  494. this.salesTypeList = res.data.records
  495. })
  496. },
  497. // 查询列表
  498. // getList() {
  499. // this.listLoading = true
  500. // const params = {
  501. // pageNum: this.currentPage,
  502. // pageSize: this.pageSize,
  503. // examineStatus: this.screenForm.status.join(','),
  504. // enginOrderNo: this.screenForm.orderNum,
  505. // refProjectNo: this.screenForm.enginNum,
  506. // refEnginRecordNo: this.screenForm.loginNum,
  507. // refTradeCategory: this.screenForm.refTradeCategory,
  508. // startCreateTime: this.screenForm.date ? this.screenForm.date[0] : '',
  509. // endCreateTime: this.screenForm.date ? this.screenForm.date[1] : '',
  510. // startOrderTime: this.screenForm.orderTime ? this.screenForm.orderTime[0] : '',
  511. // endOrderTime: this.screenForm.orderTime ? this.screenForm.orderTime[1] : '',
  512. // createName: this.screenForm.createMan,
  513. // confirmName: this.screenForm.examineMan,
  514. // serviceId: this.screenForm.salesMan,
  515. // refUseUnit: this.screenForm.refUseUnit,
  516. // materialOldNumber: this.screenForm.materialOldNumber,
  517. // specification: this.screenForm.specification,
  518. // customerKeyword: this.screenForm.customerKeyword,
  519. // refRegionWork: this.screenForm.refRegionWork,
  520. // remark: this.screenForm.remark,
  521. // geLiInerNote: this.screenForm.geLiInerNote,
  522. // saleTypeId: this.screenForm.saleTypeId,
  523. // customerWalletId: this.screenForm.customerWalletId,
  524. // refFactoryNo: this.screenForm.refFactoryNo,
  525. // refBuyUnitName: this.screenForm.refBuyUnitName,
  526. // isDirectTransfer: this.screenForm.isDirectTransfer,
  527. // refPromiseProvide: this.screenForm.refPromiseProvide,
  528. // enginOrderType: 'HOME' // TRADE=商用 HOME=家用
  529. // }
  530. // getOrderList(params).then(res => {
  531. // res.data.records.forEach(item => {
  532. // item.sums1 = ['qty', 'directTransferQty', 'hasSendQty']
  533. // item.sums2 = ['price', 'totalAmount', 'payAmount', 'discAmount']
  534. // })
  535. // this.dataList = res.data.records
  536. // this.listTotal = res.data.total
  537. // this.listLoading = false
  538. // })
  539. // getEnginCountList({
  540. // examineStatus: this.screenForm.status.join(','),
  541. // enginOrderNo: this.screenForm.orderNum,
  542. // refProjectNo: this.screenForm.enginNum,
  543. // refEnginRecordNo: this.screenForm.loginNum,
  544. // refTradeCategory: this.screenForm.refTradeCategory,
  545. // startCreateTime: this.screenForm.date ? this.screenForm.date[0] : '',
  546. // endCreateTime: this.screenForm.date ? this.screenForm.date[1] : '',
  547. // startOrderTime: this.screenForm.orderTime ? this.screenForm.orderTime[0] : '',
  548. // endOrderTime: this.screenForm.orderTime ? this.screenForm.orderTime[1] : '',
  549. // createName: this.screenForm.createMan,
  550. // confirmName: this.screenForm.examineMan,
  551. // serviceId: this.screenForm.salesMan,
  552. // refUseUnit: this.screenForm.refUseUnit,
  553. // materialOldNumber: this.screenForm.materialOldNumber,
  554. // specification: this.screenForm.specification,
  555. // customerKeyword: this.screenForm.customerKeyword,
  556. // refRegionWork: this.screenForm.refRegionWork,
  557. // remark: this.screenForm.remark,
  558. // geLiInerNote: this.screenForm.geLiInerNote,
  559. // saleTypeId: this.screenForm.saleTypeId,
  560. // customerWalletId: this.screenForm.customerWalletId,
  561. // refFactoryNo: this.screenForm.refFactoryNo,
  562. // refBuyUnitName: this.screenForm.refBuyUnitName,
  563. // isDirectTransfer: this.screenForm.isDirectTransfer,
  564. // refPromiseProvide: this.screenForm.refPromiseProvide,
  565. // enginOrderType: 'HOME' // TRADE=商用 HOME=家用
  566. // }).then(res => {
  567. // if (res.data) {
  568. // this.numSum = res.data
  569. // }
  570. // })
  571. // },
  572. // 提交筛选表单
  573. submitScreenForm() {
  574. this.currentPage = 1
  575. this.getList()
  576. },
  577. // 重置筛选表单
  578. resetScreenForm() {
  579. this.$refs.screenForm.resetFields()
  580. this.currentPage = 1
  581. this.getList()
  582. },
  583. // 更改每页数量
  584. handleSizeChange(val) {
  585. this.pageSize = val
  586. this.currentPage = 1
  587. this.getList()
  588. },
  589. // 更改当前页
  590. handleCurrentChange(val) {
  591. this.currentPage = val
  592. this.getList()
  593. },
  594. // 进入表单
  595. toForm(item) {
  596. this.queryItem = item
  597. this.isShowForm = true
  598. },
  599. // 进入审批
  600. toExamine(item) {
  601. this.queryItem = item
  602. this.isShowExamine = true
  603. },
  604. // 进入详情
  605. toDetail(item) {
  606. this.queryItem = item
  607. this.isShowDetail = true
  608. },
  609. // 进入退订
  610. toReturn(item) {
  611. if (item.refundableQty <= 0) {
  612. return this.$errorMsg('可退数量为0')
  613. }
  614. this.queryItem = item
  615. this.isShowReturn = true
  616. },
  617. backList() {
  618. this.queryItem = {}
  619. this.isShowDetail = false
  620. this.isShowForm = false
  621. this.isShowExamine = false
  622. this.isShowReturn = false
  623. this.$refs.pageRef.refreshList()
  624. },
  625. // 申请
  626. handleSubmit(id, row) {
  627. this.$confirm('发货时将暂扣工程押金,请确保钱包余额充足', '温馨提示').then(() => {
  628. applyHome({ id, refEnginRecordNo: row.refEnginRecordNo }).then(res => {
  629. this.$successMsg()
  630. // this.getList()
  631. this.$refs.pageRef.refreshList()
  632. })
  633. })
  634. },
  635. // 撤回
  636. handleWithdraw(id, row) {
  637. withdrawHome({ id, refEnginRecordNo: row.refEnginRecordNo }).then(res => {
  638. this.$successMsg()
  639. // this.getList()
  640. this.$refs.pageRef.refreshList()
  641. })
  642. },
  643. // 弃审
  644. handleAbandon(id, row) {
  645. abandonHome({ id, refEnginRecordNo: row.refEnginRecordNo }).then(res => {
  646. this.$successMsg()
  647. // this.getList()
  648. this.$refs.pageRef.refreshList()
  649. })
  650. },
  651. // 删除
  652. handleDelete(id, row) {
  653. deleteHome({ ids: id }).then(res => {
  654. this.$successMsg()
  655. // this.getList()
  656. this.$refs.pageRef.refreshList()
  657. })
  658. },
  659. // 批量删除
  660. batchDelete() {
  661. this.$confirm('此操作将永久删除, 是否继续?', '提示', {
  662. confirmButtonText: '确定',
  663. cancelButtonText: '取消',
  664. type: 'warning'
  665. })
  666. .then(() => {
  667. const ids = this.recordSelected.map(item => {
  668. return item.parentId
  669. })
  670. deleteHome({ ids: ids.join(',') }).then(res => {
  671. this.$successMsg()
  672. // this.getList()
  673. this.$refs.pageRef.refreshList()
  674. })
  675. })
  676. .catch(() => {})
  677. },
  678. handleSelectionChange(val) {
  679. this.multipleSelection = val
  680. },
  681. // 打开 修改订单日期
  682. editDate(item) {
  683. this.editId = item.parentId
  684. this.dateForm.date = item.orderDate.slice(0, 10)
  685. this.isShowEditDateDialog = true
  686. },
  687. // 提交 修改订单日期
  688. submitDateForm() {
  689. editDateHome({
  690. enginOrderId: this.editId,
  691. orderDate: this.dateForm.date + ' 00:00:00',
  692. refEnginRecordNo: this.screenForm.loginNum
  693. }).then(res => {
  694. this.isShowEditDateDialog = false
  695. this.getList()
  696. this.$successMsg('修改成功')
  697. })
  698. }
  699. }
  700. }
  701. </script>
  702. <style lang="scss" scoped>
  703. .worker {
  704. display: flex;
  705. justify-content: space-between;
  706. .worker_left {
  707. font-size: 12px;
  708. font-weight: 400;
  709. text-align: left;
  710. color: #666;
  711. line-height: 28px;
  712. margin-right: 10px;
  713. }
  714. .worker_right {
  715. flex: 1;
  716. ::v-deep .el-button {
  717. margin: 0 10px 10px 0px;
  718. }
  719. }
  720. }
  721. .ulStyle {
  722. list-style: none;
  723. margin: 0;
  724. padding: 10px 0;
  725. background-color: #ffffff;
  726. z-index: 1;
  727. }
  728. .title {
  729. display: inline-block;
  730. font-weight: 700;
  731. margin-right: 20px;
  732. }
  733. .num {
  734. padding-left: 6px;
  735. font-weight: 400;
  736. }
  737. </style>