home_list.vue 23 KB

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