index.vue 25 KB

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