index.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713
  1. <template>
  2. <el-dialog
  3. title="消息"
  4. :visible.sync="showMessages"
  5. :append-to-body="true"
  6. width="50%"
  7. :show-close="false"
  8. :close-on-click-modal="false"
  9. >
  10. <el-radio-group v-model="type" size="mini" @change="checkFn">
  11. <el-radio-button :label="0">系统通知</el-radio-button>
  12. <el-radio-button :label="1">文件下发</el-radio-button>
  13. <el-radio-button :label="2">返利确认单</el-radio-button>
  14. <el-radio-button :label="3">物流通知</el-radio-button>
  15. <el-radio-button :label="4">到货通知</el-radio-button>
  16. <el-radio-button :label="5">货满订单</el-radio-button>
  17. </el-radio-group>
  18. <!-- 系统通知 -->
  19. <div v-show="type === 0" class="table">
  20. <el-table
  21. ref="table"
  22. v-loading="listLoading"
  23. class="cql"
  24. :data="dataList"
  25. element-loading-text="Loading"
  26. border
  27. fit
  28. highlight-current-row
  29. stripe
  30. >
  31. <el-table-column align="center" type="index" min-width="160" show-overflow-tooltip />
  32. <el-table-column align="center" label="标题" prop="title" min-width="160" show-overflow-tooltip />
  33. <el-table-column align="center" label="来源" prop="source" min-width="160" show-overflow-tooltip />
  34. <el-table-column align="center" label="时间" prop="issueTime" min-width="160" show-overflow-tooltip />
  35. <el-table-column align="center" label="是否已读" prop="isTopRead" min-width="160" show-overflow-tooltip >
  36. <template slot-scope="scope">
  37. {{scope.row.isTopRead ? '已读':'未读'}}
  38. </template>
  39. </el-table-column>
  40. <el-table-column align="center" label="操作" min-width="160" show-overflow-tooltip>
  41. <template slot-scope="scope">
  42. <el-button :style="{
  43. color: scope.row.readFlag ? '#c0c4cc' : ''
  44. }" type="text" class="textColor" @click="lookInDialog(scope.row.id)">查看</el-button>
  45. </template>
  46. </el-table-column>
  47. </el-table>
  48. </div>
  49. <!-- 文件下发 -->
  50. <div v-show="type === 1" class="table">
  51. <el-table
  52. ref="table"
  53. v-loading="listLoading"
  54. :data="fileList"
  55. element-loading-text="Loading"
  56. border
  57. fit
  58. highlight-current-row
  59. stripe
  60. >
  61. <el-table-column align="center" type="index" min-width="160" show-overflow-tooltip />
  62. <el-table-column align="center" label="标题" prop="title" min-width="160" show-overflow-tooltip />
  63. <el-table-column align="center" label="来源" prop="operatorNickName" min-width="160" show-overflow-tooltip />
  64. <el-table-column align="center" label="时间" prop="createTime" min-width="160" show-overflow-tooltip />
  65. <el-table-column align="center" label="操作" min-width="160" show-overflow-tooltip>
  66. <template slot-scope="scope">
  67. <el-button type="text" class="textColor" @click="downloadFn(scope.row.id)">下载</el-button>
  68. </template>
  69. </el-table-column>
  70. </el-table>
  71. </div>
  72. <!-- 返利确认单 -->
  73. <div v-show="type === 2" class="table">
  74. <el-table
  75. ref="table"
  76. v-loading="listLoading"
  77. :data="rebateList"
  78. element-loading-text="Loading"
  79. border
  80. fit
  81. highlight-current-row
  82. stripe
  83. >
  84. <el-table-column align="center" type="index" min-width="160" show-overflow-tooltip />
  85. <el-table-column align="center" label="经销商名称" prop="customerName" min-width="160" show-overflow-tooltip />
  86. <el-table-column align="center" label="确认人" prop="examineBy" min-width="160" show-overflow-tooltip />
  87. <el-table-column align="center" label="确认时间" prop="examineTime" min-width="160" show-overflow-tooltip />
  88. <el-table-column align="center" label="操作" min-width="160" show-overflow-tooltip>
  89. <template slot-scope="scope">
  90. <el-button type="text" class="textColor" @click="secondFn(scope.row.rebateOrderId)">{{
  91. isCustomer ? '确认' : '复核'
  92. }}</el-button>
  93. </template>
  94. </el-table-column>
  95. </el-table>
  96. </div>
  97. <!-- 物流通知 -->
  98. <div v-show="type === 3" class="table">
  99. <el-form ref="invoiceOrderForm" :model="invoiceOrderForm" label-width="120px" label-position="left" size="mini">
  100. <el-row :gutter="20">
  101. <el-col :xs="24" :sm="12" :lg="8">
  102. <el-form-item prop="invoiceId" label="发货单">
  103. <el-input v-model="invoiceOrderForm.invoiceId" placeholder="请输入发货单" />
  104. </el-form-item>
  105. </el-col>
  106. <el-col
  107. :xs="24"
  108. :sm="12"
  109. :lg="8"
  110. ><el-form-item prop="time" label="发货单时间">
  111. <el-date-picker
  112. v-model="invoiceOrderForm.time"
  113. style="width: 100%"
  114. type="daterange"
  115. value-format="yyyy-MM-dd HH:mm:ss"
  116. range-separator="至"
  117. start-placeholder="开始日期"
  118. end-placeholder="结束日期"
  119. /></el-form-item></el-col>
  120. <el-col
  121. :xs="24"
  122. :sm="12"
  123. :lg="8"
  124. ><el-form-item prop="userName" label="收货客户">
  125. <el-input v-model="invoiceOrderForm.userName" placeholder="请输入收货客户" /> </el-form-item></el-col>
  126. <el-col
  127. :xs="24"
  128. :sm="12"
  129. :lg="8"
  130. ><el-form-item prop="address" label="收货地址">
  131. <el-input v-model="invoiceOrderForm.address" placeholder="请输入收货地址" /> </el-form-item></el-col>
  132. <el-col
  133. :xs="24"
  134. :sm="12"
  135. :lg="8"
  136. ><el-form-item prop="remark" label="内容"> <el-input v-model="invoiceOrderForm.remark" placeholder="请输入内容" /> </el-form-item></el-col>
  137. <el-col :xs="24" :sm="12" :lg="8" style="text-align: right;">
  138. <el-button size="mini" @click="handleReset($event,'invoiceOrde')">重置</el-button>
  139. <el-button size="mini" type="primary" @click="currentPage = 1,getListInvoiceOrder()">查询</el-button>
  140. </el-col>
  141. </el-row>
  142. </el-form>
  143. <el-table
  144. ref="table"
  145. v-loading="listLoading"
  146. :data="invoiceOrderList"
  147. element-loading-text="Loading"
  148. border
  149. fit
  150. highlight-current-row
  151. stripe
  152. >
  153. <el-table-column align="center" type="index" min-width="160" show-overflow-tooltip />
  154. <el-table-column align="center" label="发货单" prop="id" min-width="160" show-overflow-tooltip>
  155. <template slot-scope="scope">
  156. <el-link v-if="!isCustomer" type="primary" :underline="false" @click="handleJump(scope.row.id)">{{
  157. scope.row.id
  158. }}</el-link>
  159. <template v-else>{{ scope.row.id }}</template>
  160. </template>
  161. </el-table-column>
  162. <el-table-column align="center" label="内容" prop="orderTrackStatus" min-width="160" show-overflow-tooltip />
  163. <el-table-column align="center" label="时间" prop="orderTrackTime" min-width="160" show-overflow-tooltip />
  164. <el-table-column align="center" label="收货地址" prop="address" min-width="160" show-overflow-tooltip>
  165. <template slot-scope="scope">
  166. {{ scope.row.address ? scope.row.address : '——' }}
  167. </template>
  168. </el-table-column>
  169. <el-table-column align="center" label="收货客户" prop="receivingName" min-width="160" show-overflow-tooltip>
  170. <template slot-scope="scope">{{ scope.row.receivingName ? scope.row.receivingName : '——' }}</template>
  171. </el-table-column>
  172. <el-table-column align="center" label="操作" min-width="80" show-overflow-tooltip fixed="right">
  173. <template slot-scope="scope">
  174. <el-button type="text" class="textColor" @click="handLogistics(scope.row)">查看</el-button>
  175. </template>
  176. </el-table-column>
  177. </el-table>
  178. </div>
  179. <!-- 到货通知 -->
  180. <div v-show="type == 4" class="table">
  181. <div class="mymain-container">
  182. <el-form ref="form" label-width="80px" label-position="left" size="mini">
  183. <el-row>
  184. <el-col>
  185. <el-form-item prop="specification" label="规格型号">
  186. <div style="display: flex">
  187. <el-input v-model="specification" clearable style="margin-right: 10px" placeholder="请输入规格型号" />
  188. <el-button @click="handleReset">重置</el-button>
  189. <el-button type="primary" size="mini" @click="currentPage = 1,getArrivalNotice()">查询</el-button>
  190. </div>
  191. </el-form-item>
  192. </el-col>
  193. </el-row>
  194. </el-form>
  195. <div class="table">
  196. <el-table
  197. ref="table"
  198. v-loading="listLoading"
  199. :data="arrivalNoticeList"
  200. element-loading-text="Loading"
  201. border
  202. fit
  203. highlight-current-row
  204. stripe
  205. >
  206. <el-table-column
  207. property="materialOldNumber"
  208. align="left"
  209. min-width="120"
  210. label="产品编号"
  211. show-overflow-tooltip
  212. />
  213. <el-table-column
  214. property="materialNumber"
  215. align="left"
  216. min-width="100"
  217. label="物料编码"
  218. show-overflow-tooltip
  219. />
  220. <el-table-column
  221. property="materialName"
  222. align="left"
  223. min-width="250"
  224. label="产品名称"
  225. show-overflow-tooltip
  226. />
  227. <el-table-column
  228. property="specification"
  229. align="left"
  230. min-width="350"
  231. label="规格型号"
  232. show-overflow-tooltip
  233. />
  234. <el-table-column property="stockName" align="left" min-width="100" label="到货仓库" show-overflow-tooltip />
  235. <el-table-column
  236. property="updateTime"
  237. align="left"
  238. min-width="200"
  239. label="到货通知时间"
  240. show-overflow-tooltip
  241. />
  242. </el-table>
  243. </div>
  244. </div>
  245. </div>
  246. <!-- 订单满货通知 -->
  247. <div v-show="type == 5" class="table">
  248. <div class="mymain-container">
  249. <el-form ref="form" label-width="80px" label-position="left" size="mini">
  250. <el-row>
  251. <el-col :span="8">
  252. <el-form-item prop="stockOrderNo" label="订单号">
  253. <div style="display: flex">
  254. <el-input v-model="stockOrderNo" clearable style="margin-right: 10px" placeholder="请输入订单号" />
  255. </div>
  256. </el-form-item>
  257. </el-col>
  258. <el-col :span="8">
  259. <el-form-item prop="stockOrderSpecification" label="机型">
  260. <div style="display: flex">
  261. <el-input v-model="stockOrderSpecification" clearable style="margin-right: 10px" placeholder="请输入机型" />
  262. </div>
  263. </el-form-item>
  264. </el-col>
  265. <el-col :span="8">
  266. <el-form-item prop="stockTimes" label="日期">
  267. <el-date-picker
  268. v-model="stockTimes"
  269. style="width: 100%;"
  270. type="daterange"
  271. value-format="yyyy-MM-dd HH:mm:ss"
  272. range-separator="至"
  273. start-placeholder="开始日期"
  274. end-placeholder="结束日期"
  275. />
  276. </el-form-item>
  277. </el-col>
  278. <el-col :span="24">
  279. <div style="float: right;"> <el-button size="mini" @click="handleReset($event, 'stockCost')">重置</el-button>
  280. <el-button type="primary" size="mini" @click="currentPage = 1,getStockCostList()">查询</el-button></div>
  281. </el-col>
  282. </el-row>
  283. </el-form>
  284. <div class="table">
  285. <el-table
  286. ref="table"
  287. v-loading="listLoading"
  288. :data="stockCostList"
  289. element-loading-text="Loading"
  290. border
  291. fit
  292. highlight-current-row
  293. stripe
  294. >
  295. <el-table-column
  296. type="index"
  297. align="left"
  298. min-width="50"
  299. label="序号"
  300. />
  301. <el-table-column
  302. property="orderId"
  303. align="left"
  304. min-width="150"
  305. label="订单号"
  306. show-overflow-tooltip
  307. >
  308. <template slot-scope="scope">
  309. <el-link type="primary" :underline="false" @click="handleToDaily(scope.row.orderId)">{{
  310. scope.row.orderId
  311. }}</el-link>
  312. </template>
  313. </el-table-column>
  314. <el-table-column
  315. property="specification"
  316. align="left"
  317. min-width="250"
  318. label="机型"
  319. show-overflow-tooltip
  320. />
  321. <el-table-column
  322. property="full"
  323. align="left"
  324. min-width="120"
  325. label="是否已生成仓租"
  326. show-overflow-tooltip
  327. >
  328. <template slot-scope="scope">
  329. {{ scope.row.full =='YES'? '是': '否' }}
  330. </template>
  331. </el-table-column>
  332. <el-table-column
  333. property="fullTime"
  334. align="left"
  335. min-width="150"
  336. label="货满日期"
  337. show-overflow-tooltip
  338. />
  339. <el-table-column property="fullNum" align="left" min-width="80" label="计算天数" show-overflow-tooltip />
  340. <el-table-column align="center" label="操作" min-width="80" show-overflow-tooltip fixed="right">
  341. <template slot-scope="scope">
  342. <el-button type="text" class="textColor" @click="handleToDaily(scope.row.orderId)">查看</el-button>
  343. </template>
  344. </el-table-column>
  345. </el-table>
  346. </div>
  347. </div>
  348. </div>
  349. <!-- 分页 -->
  350. <div class="fr">
  351. <el-pagination
  352. :current-page="currentPage"
  353. :page-sizes="[10, 20, 30, 50]"
  354. :page-size="10"
  355. layout="total, sizes, prev, pager, next, jumper"
  356. :total="listTotal"
  357. @size-change="handleSizeChange"
  358. @current-change="handleCurrentChange"
  359. />
  360. </div>
  361. <!-- 内层弹窗 -->
  362. <el-dialog width="40%" title="消息标题" :visible.sync="inDialog" append-to-body>
  363. <div class="detail-container">
  364. <div class="title">{{ detailData.title }}</div>
  365. <div class="text">
  366. 发布人:{{ detailData.issueNickName }}<el-divider direction="vertical" />发布时间:{{ detailData.issueTime }}
  367. </div>
  368. <el-divider />
  369. <div class="content">{{ detailData.content }}</div>
  370. <el-divider v-if="detailData.files && detailData.files.length > 0" />
  371. <div v-if="detailData.files && detailData.files.length > 0" class="file">
  372. <div>附件:</div>
  373. <div class="file-list">
  374. <div v-for="(item, index) in detailData.files" :key="index" class="item">
  375. <el-image
  376. v-if="checkFileType(item.url) == 'image'"
  377. class="img"
  378. :src="imageURL + item.url"
  379. :preview-src-list="[imageURL + item.url]"
  380. />
  381. <div v-else class="box2" @click="openLink(item.url)">
  382. <img v-if="checkFileType(item.url) == 'word'" src="@/assets/common/word.png">
  383. <img v-if="checkFileType(item.url) == 'excel'" src="@/assets/common/excel.png">
  384. <img v-if="checkFileType(item.url) == 'ppt'" src="@/assets/common/ppt.png">
  385. <img v-if="checkFileType(item.url) == 'pdf'" src="@/assets/common/pdf.png">
  386. <div class="name ellipsis-3">{{ item.name }}</div>
  387. </div>
  388. </div>
  389. </div>
  390. </div>
  391. </div>
  392. <div slot="footer" class="dialog-footer">
  393. <el-button size="mini" type="primary" @click="confirmCheck(detailData.noticeId)">确认接收</el-button>
  394. <el-button size="mini" @click="inDialog = false">关 闭</el-button>
  395. </div>
  396. </el-dialog>
  397. <el-dialog
  398. title="物流信息"
  399. :visible.sync="visible"
  400. width="60%"
  401. append-to-body
  402. :close-on-click-modal="false"
  403. @close="onClose"
  404. >
  405. <el-timeline v-if="logisticsDetail.length" class="logistics" :reverse="false">
  406. <el-timeline-item
  407. v-for="(item, index) in logisticsDetail"
  408. :key="index"
  409. placement="top"
  410. type="success"
  411. :stock-timestamp="item.time"
  412. >
  413. <el-row :gutter="20">
  414. <el-col class="logistics-title"> {{ item.status }} </el-col>
  415. <el-col>
  416. <div class="flex">
  417. <div>{{ item.context }}</div>
  418. <!-- <div>{{ item.createTime }}</div> -->
  419. </div>
  420. </el-col>
  421. </el-row>
  422. </el-timeline-item>
  423. </el-timeline>
  424. <div v-else class="tip">暂无物流信息</div>
  425. </el-dialog>
  426. <div slot="footer" class="dialog-footer">
  427. <el-button type="primary" size="mini" @click="closeFn">关闭</el-button>
  428. </div>
  429. </el-dialog>
  430. </template>
  431. <script>
  432. import { mapGetters } from 'vuex'
  433. import {
  434. getNoticeList,
  435. getComListList,
  436. getComListDownload,
  437. getNoticeDetail,
  438. confirmCheck,
  439. getRebateOrderList,
  440. getListInvoiceOrder,
  441. getStockCostList
  442. } from '@/api/dashboard'
  443. import { getArrivalNotice } from '@/api/stock'
  444. import { getListOrderTrack } from '@/api/supply/pickup'
  445. import { getFileUrl } from '@/api/common'
  446. export default {
  447. // eslint-disable-next-line vue/require-prop-types
  448. props: ['mesType'],
  449. data() {
  450. return {
  451. imageURL: this.$imageUrl,
  452. type: 0,
  453. currentPage: 1,
  454. pageSize: 10,
  455. listTotal: 0,
  456. dataList: [],
  457. listLoading: false,
  458. fileList: [],
  459. inDialog: false,
  460. detailData: [],
  461. rebateList: [],
  462. stockCostList: [],
  463. invoiceOrderList: [],
  464. visible: false,
  465. orderId: '',
  466. logisticsDetail: [],
  467. arrivalNoticeList: [],
  468. specification: '',
  469. stockOrderNo: '',
  470. stockTimes: [],
  471. stockOrderSpecification: '',
  472. invoiceOrderForm: {
  473. time: [],
  474. invoiceId: '',
  475. address: '',
  476. startTime: '',
  477. endTime: '',
  478. remark: '',
  479. userName: ''
  480. },
  481. fnArr: ['getDataList', 'getFileList', 'getRebateList', 'getListInvoiceOrder', 'getArrivalNotice', 'getStockCostList']
  482. }
  483. },
  484. computed: {
  485. ...mapGetters(['showMessages', 'isCustomer'])
  486. },
  487. watch: {
  488. mesType(newValue, oldValue) {
  489. if (!oldValue) {
  490. this.type = newValue
  491. this[this.fnArr[newValue]]()
  492. }
  493. this.$emit('reset')
  494. }
  495. },
  496. created() {
  497. this[this.fnArr[this.type]]()
  498. },
  499. methods: {
  500. checkFn(i) {
  501. this.listTotal = 0
  502. this.pageSize = 10
  503. this.currentPage = 1
  504. this.listLoading = false
  505. this.fnArr[i] && this[this.fnArr[i]]()
  506. },
  507. // 获取文件列表数据
  508. async getFileList() {
  509. const data = {
  510. needDown: true,
  511. pageSize: this.pageSize,
  512. pageNo: this.currentPage
  513. }
  514. const res = await getComListList(data)
  515. this.fileList = res.data.records
  516. this.listTotal = res.data.total
  517. },
  518. // 获取返利确认单数据
  519. async getRebateList() {
  520. const data = {
  521. pageSize: this.pageSize,
  522. pageNum: this.currentPage,
  523. isSecondExamine: false
  524. }
  525. const res = await getRebateOrderList(data)
  526. this.rebateList = res.data.records
  527. this.listTotal = res.data.total
  528. },
  529. // 获取列表数据
  530. async getDataList() {
  531. const data = {
  532. pageSize: this.pageSize,
  533. pageNum: this.currentPage,
  534. readFlag: false
  535. }
  536. const res = await getNoticeList(data)
  537. this.dataList = res.data.records
  538. this.listTotal = res.data.total
  539. },
  540. // 获取物流列表
  541. async getListInvoiceOrder() {
  542. const time = this.invoiceOrderForm.time || []
  543. const data = {
  544. pageSize: this.pageSize,
  545. pageNum: this.currentPage,
  546. ...this.invoiceOrderForm,
  547. startTime: time.length ? time[0] : '',
  548. endTime: time.length ? time[1] : ''
  549. }
  550. const res = await getListInvoiceOrder(data)
  551. this.invoiceOrderList = res.data.records
  552. this.listTotal = res.data.total
  553. },
  554. async getArrivalNotice() {
  555. const data = {
  556. pageSize: this.pageSize,
  557. pageNum: this.currentPage,
  558. specification: this.specification
  559. }
  560. const res = await getArrivalNotice(data)
  561. this.arrivalNoticeList = res.data.records
  562. this.listTotal = res.data.total
  563. },
  564. // 订单满货通知
  565. async getStockCostList() {
  566. const time = this.stockTimes || []
  567. const data = {
  568. pageSize: this.pageSize,
  569. pageNum: this.currentPage,
  570. materialName: '',
  571. materialNumber: '',
  572. materialOldNumber: '',
  573. specification: this.stockOrderSpecification,
  574. orderId: this.stockOrderNo,
  575. endTime: time.length ? time[0] : '',
  576. startTime: time.length ? time[1] : ''
  577. }
  578. const res = await getStockCostList(data)
  579. this.stockCostList = res.data.records
  580. this.listTotal = res.data.total
  581. },
  582. handleReset(e, type) {
  583. this.pageSize = 10
  584. this.pageNum = 1
  585. if (type === 'invoiceOrde') {
  586. this.$refs.invoiceOrderForm.resetFields()
  587. this.getListInvoiceOrder()
  588. } else if (type === 'stockCost') {
  589. this.stockOrderNo = ''
  590. this.stockOrderSpecification = ''
  591. this.stockTimes = []
  592. this.getStockCostList()
  593. } else {
  594. this.specification = ''
  595. this.getArrivalNotice()
  596. }
  597. },
  598. // 更改每页数量
  599. handleSizeChange(val) {
  600. this.pageSize = val
  601. this.currentPage = 1
  602. this[this.fnArr[this.type]]()
  603. },
  604. // 更改当前页
  605. handleCurrentChange(val) {
  606. this.currentPage = val
  607. this[this.fnArr[this.type]]()
  608. },
  609. openLink(url) {
  610. getFileUrl({ key: url }).then(res => {
  611. window.open(res.data)
  612. })
  613. },
  614. // 复核
  615. secondFn(id) {
  616. this.$router.push({
  617. path: '/finance/rebate_list',
  618. query: {
  619. id
  620. }
  621. })
  622. this.type = 0
  623. this.$emit('reset')
  624. this.$store.commit('user/showMessage', 'no')
  625. },
  626. // 确认查收
  627. confirmCheck(id) {
  628. confirmCheck({ noticeIds: id }).then(res => {
  629. this.$successMsg('查收成功')
  630. this.inDialog = false
  631. this[this.fnArr[this.type]]()
  632. })
  633. },
  634. // 检查文件类型
  635. checkFileType(url) {
  636. if (!url) return ''
  637. const fileSuffix = url.substring(url.lastIndexOf('.') + 1)
  638. if (['jpg', 'jpeg', 'png'].includes(fileSuffix)) {
  639. return 'image'
  640. } else if (['doc', 'docx', 'dot', 'wps', 'wpt'].includes(fileSuffix)) {
  641. return 'word'
  642. } else if (['xls', 'xlsx', 'xlt', 'et', 'ett'].includes(fileSuffix)) {
  643. return 'excel'
  644. } else if (['ppt', 'pptx', 'dps', 'dpt', 'pot', 'pps'].includes(fileSuffix)) {
  645. return 'ppt'
  646. } else if (['pdf'].includes(fileSuffix)) {
  647. return 'pdf'
  648. } else {
  649. return ''
  650. }
  651. },
  652. // 查看
  653. async lookInDialog(id) {
  654. const res = await getNoticeDetail({ id, isTopRead: true })
  655. this.detailData = res.data
  656. this.inDialog = true
  657. this.getDataList()
  658. },
  659. // 下载
  660. async downloadFn(id) {
  661. const res = await getComListDownload({ id })
  662. if (res.data) {
  663. window.open(this.imageURL + res.data)
  664. }
  665. },
  666. // 关闭
  667. closeFn() {
  668. this.type = 0
  669. this.$emit('reset')
  670. this.$store.commit('user/showMessage', 'no')
  671. },
  672. handLogistics(row) {
  673. getListOrderTrack({ orderId: row.id }).then(res => {
  674. this.logisticsDetail = res.data
  675. })
  676. this.orderId = row.id
  677. this.visible = true
  678. },
  679. onClose() {
  680. this.logisticsDetail = []
  681. this.orderId = ''
  682. this.visible = false
  683. },
  684. handleJump(id) {
  685. // this.$router.push({ path: `/supply/pickup/sum_list?id=${id}` })
  686. this.$router.push({name: 'exwarehouseSum_list', query:{id}})
  687. this.type = 0
  688. this.$emit('reset')
  689. this.$store.commit('user/showMessage', 'no')
  690. },
  691. handleToDaily(orderId) {
  692. // this.$router.push({ path: `/basic_data/dailyWarehouseRent?orderId=${orderId}` })
  693. this.$router.push({ name: 'dailyWarehouseRent', query:{orderId}})
  694. this.type = 0
  695. this.$emit('reset')
  696. this.$store.commit('user/showMessage', 'no')
  697. }
  698. }
  699. }
  700. </script>
  701. <style lang="scss" scoped>
  702. ::v-deep .el-form-item--mini .el-form-item__content, ::v-deep .el-form-item--mini .el-form-item__label{
  703. line-height: 27px;
  704. }
  705. ::v-deep .el-range-editor--mini .el-range-separator {
  706. line-height: 27px;
  707. }
  708. </style>