tranManagementReceivingFeedback.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688
  1. //收货反馈
  2. <template>
  3. <div>
  4. <BaseHeaderLayout :leftSpan="8">
  5. <template slot="left"> </template>
  6. <!-- 接单开始 -->
  7. <template slot="right">
  8. <span style="width: 142px; display: inline-block; color: #8890b1"
  9. >状态:</span
  10. >
  11. <ws-select
  12. v-model="searchTypeText"
  13. placeholder=""
  14. class="typeselect"
  15. @change="selecttaskType"
  16. :value="searchType"
  17. >
  18. <ws-option
  19. v-for="item in taskTypeList"
  20. :key="item.value"
  21. :label="item.value"
  22. :value="item.value"
  23. style="color: #8890b1"
  24. />
  25. </ws-select>
  26. <span style="width: 142px; display: inline-block; color: #8890b1"
  27. >类型:</span
  28. >
  29. <ws-select
  30. v-model="tranTypeKeyText"
  31. placeholder=""
  32. class="typeselect"
  33. @change="selecttranType"
  34. :value="tranTypeKey"
  35. >
  36. <ws-option
  37. v-for="item in tranTypeList"
  38. :key="item.value"
  39. :label="item.value"
  40. :value="item.value"
  41. style="color: #8890b1"
  42. />
  43. </ws-select>
  44. <div>
  45. <span style="display: inline-block; width: 70px; color: #8890b1"
  46. >接单日期:</span
  47. >
  48. </div>
  49. <el-date-picker
  50. v-model="inOutDate"
  51. type="daterange"
  52. align="right"
  53. unlink-panels
  54. range-separator="至"
  55. start-placeholder="开始日期"
  56. end-placeholder="结束日期"
  57. >
  58. </el-date-picker>
  59. <ws-input
  60. v-model="searchKeyWord"
  61. placeholder="可按发货人、收货人、任务编号查找"
  62. clearable
  63. maxlength="500"
  64. type="input"
  65. class="findValue"
  66. ></ws-input>
  67. <ws-button class="find" type="primary" @click="find()"
  68. ><img
  69. width="16"
  70. height="16"
  71. style="
  72. vertical-align: text-top;
  73. position: relative;
  74. top: 0px;
  75. left: -8px;
  76. "
  77. src="../../../public/img/sousuo.png"
  78. alt=""
  79. /></ws-button>
  80. </template>
  81. </BaseHeaderLayout>
  82. <div>
  83. <el-table
  84. class="wenzi"
  85. :data="warehouseList.records"
  86. style="width: 100%"
  87. height="780"
  88. >
  89. <el-table-column type="index" label="序号" width="80">
  90. <template scope="scope">
  91. <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
  92. <span v-else>{{ scope.$index + 1 }}</span>
  93. </template>
  94. </el-table-column>
  95. <el-table-column class="table_td" prop="processNo" label="运输任务编号/合同编号" width="150">
  96. <template scope="scope">
  97. <span v-if='scope.row.processNo'>{{scope.row.processNo}}</span>
  98. <span v-else>{{scope.row.contractNo}}</span>
  99. </template>
  100. </el-table-column>
  101. <el-table-column prop="tranType" label="运输方式"> </el-table-column>
  102. <el-table-column class="table_td" prop="goodsName" label="货名">
  103. </el-table-column>
  104. <el-table-column class="table_td" label="重量(吨)" prop="weight">
  105. </el-table-column>
  106. <el-table-column class="table_td" label="发货" prop="send" width="300">
  107. <template scope="scope">
  108. <span style='white-space :pre-wrap;' v-html="scope.row.send"></span>
  109. </template>
  110. </el-table-column>
  111. <el-table-column class="table_td" label="收货" prop="receive" width="300">
  112. <template scope="scope">
  113. <span style='white-space :pre-wrap;' v-html="scope.row.receive"></span>
  114. </template>
  115. </el-table-column>
  116. <el-table-column
  117. class="table_td"
  118. label="运输周期"
  119. prop="tranCycle"
  120. width="160"
  121. >
  122. <template scope="scope">
  123. {{ scope.row.deliveryDateStart }} ~ {{ scope.row.deliveryDateEnd }}
  124. </template>
  125. </el-table-column>
  126. <el-table-column prop="status" label="状态">
  127. <template slot-scope="scope">
  128. <el-popover
  129. placement="left"
  130. :width="285"
  131. trigger="click"
  132. visible-arrow="false"
  133. @show="history(scope.row)"
  134. >
  135. <template>
  136. <span slot="reference">
  137. <span
  138. v-if="scope.row.receivingStatus == '待执行'"
  139. class="executory"
  140. ></span>
  141. <span
  142. v-if="scope.row.receivingStatus == '执行中'"
  143. class="inExecution"
  144. ></span>
  145. <span
  146. v-if="scope.row.receivingStatus == '已完货'"
  147. class="done"
  148. ></span
  149. >{{ scope.row.receivingStatus }}
  150. </span>
  151. </template>
  152. <div>
  153. <p style="margin-top: 0; padding-left: 10px">历史记录</p>
  154. <div v-for="(item, index) in historyList" class="flex">
  155. <div class="vertical-text vertical-text-left">
  156. {{ item.updateDate }}
  157. </div>
  158. <div>
  159. <div class="vertical-circle"></div>
  160. <div
  161. v-if="index != historyList.length - 1"
  162. class="vertical-line"
  163. ></div>
  164. </div>
  165. <div class="vertical-text">
  166. {{ item.operateUser }}<br />{{ item.dealMsg }}
  167. </div>
  168. </div>
  169. </div>
  170. </el-popover>
  171. <img
  172. width="17"
  173. height="18"
  174. style="vertical-align: text-top; position: relative; top: -1px"
  175. src="../../../public/img/edit.png"
  176. @click="editClick(scope.row)"
  177. alt=""
  178. />
  179. </template>
  180. </el-table-column>
  181. <el-table-column class="table_td" label="接单时间" prop="createDate" width="90">
  182. </el-table-column>
  183. <el-table-column prop="seller" label="操作" width="160">
  184. <template slot-scope="scope">
  185. <template v-if="scope.row.receivingStatus != '已完货'">
  186. <div class="record" @click="trainSee(scope.row)">查看</div>
  187. <div class="adjustment" @click="feedback(scope.row)">反馈</div>
  188. </template>
  189. <template v-else>
  190. <div class="record1" @click="trainSee(scope.row)">查看</div>
  191. </template>
  192. </template>
  193. </el-table-column>
  194. </el-table>
  195. <div>
  196. <!-- 分页 -->
  197. <el-pagination
  198. @size-change="handleSizeChange"
  199. @current-change="handleCurrentChange"
  200. :current-page="currentPage"
  201. :page-size="deptCircularPage.pageSize"
  202. layout="total, sizes, prev, pager, next, jumper"
  203. :total="deptBudgetTotal"
  204. >
  205. </el-pagination>
  206. </div>
  207. </div>
  208. </div>
  209. </template>
  210. <script>
  211. import { shippingList, stateRec } from '@/model/transport/index'
  212. import { downloadFile } from '@/utils/batchDown'
  213. import Pagination from '@/components/Pagination'
  214. import WsUpload from '@/components/WsUpload'
  215. import { dayjs, fmoney, EventBus } from 'base-core-lib'
  216. export default {
  217. name: 'viewSpareMoney',
  218. components: {
  219. WsUpload,
  220. Pagination,
  221. },
  222. watch: {
  223. vesselId(val) {
  224. this.getList()
  225. },
  226. isShow(val) {
  227. this.showType = val
  228. },
  229. },
  230. data() {
  231. return {
  232. //弹出框
  233. dialogViewSpareMoney: false,
  234. dialogApproveFormVisible: false,
  235. // 船舶类型
  236. monetaryKey: null,
  237. // 表格显示数据
  238. tableDate: [],
  239. // 是否显示
  240. showType: true,
  241. // 年
  242. year: '',
  243. currentPage: 1,
  244. pageSize: 10,
  245. feedbackFlag: 4,
  246. searchType: 1,
  247. searchTypeText: '执行中',
  248. tranTypeKey:5,
  249. tranTypeKeyText: '全部',
  250. searchKeyWord: '',
  251. contractType: 2,
  252. taskTypeList: [
  253. { value: '执行中', type: 4 },
  254. { value: '已完货', type: 5 },
  255. { value: '全部任务', type: 6 },
  256. ],
  257. tranTypeList: [
  258. { value: '汽运', type: 1 },
  259. { value: '火运', type: 2 },
  260. { value: '船运', type: 3 },
  261. { value: '他运', type: 4 },
  262. { value: '全部', type: 5 },
  263. ],
  264. // 提交类型
  265. submitType: true,
  266. size: 10,
  267. primary: '1',
  268. spanArr: [],
  269. warehouseName: '',
  270. deptBudgetTotal: 0,
  271. compId: localStorage.getItem('ws-pf_compId'),
  272. deptCircularPage: {},
  273. warehouseList: [],
  274. deptBudgetList: {},
  275. historyList: [],
  276. value2: '',
  277. inOutDate: [],
  278. pickerOptions: [],
  279. pickerBeginDateBefore: {
  280. disabledDate: (time) => {
  281. return time.getTime() > Date.now()
  282. },
  283. },
  284. accessoryTFs: false,
  285. }
  286. },
  287. mounted() {
  288. this.getList()
  289. },
  290. methods: {
  291. //接口
  292. getList() {
  293. shippingList({
  294. compId: localStorage.getItem('ws-pf_compId'),
  295. currentPage: this.currentPage,
  296. pageSize: this.pageSize,
  297. tranTypeKey:this.tranTypeKey,
  298. feedbackFlag: this.feedbackFlag,
  299. startDate: this.startDate,
  300. endDate: this.endDate,
  301. searchKeyWord: this.searchKeyWord,
  302. })
  303. .toPromise()
  304. .then((response) => {
  305. this.warehouseList = response
  306. // this.deptCircularPage.currentPage = response.current
  307. // this.deptCircularPage.pageSize = response.size
  308. this.deptBudgetTotal = response.total
  309. })
  310. },
  311. // statusquery(status){
  312. // if (status == 1) {
  313. // this.primary = 1
  314. // } else if (status == 2) {
  315. // this.primary = 2
  316. // } else {
  317. // this.primary = 3
  318. // }
  319. // this.feedbackFlag = status
  320. // this.getList()
  321. // },
  322. delivery(item) {
  323. this.$router.push({
  324. path: 'warehouseManagementDelivery',
  325. query: {
  326. baseId: item.warehouseId,
  327. positionId: item.binNumberId,
  328. warehouseName: item.warehouseName,
  329. binNumber: item.binNumber,
  330. capacity: item.capacity,
  331. },
  332. })
  333. },
  334. getSpanArr(data) {
  335. let that = this
  336. //页面展示的数据,不一定是全部的数据,所以每次都清空之前存储的 保证遍历的数据是最新的数据。以免造成数据渲染混乱
  337. that.spanArr = []
  338. that.pos = 0
  339. // //遍历数据
  340. data.forEach((item, index) => {
  341. //判断是否是第一项
  342. if (index === 0) {
  343. this.spanArr.push(1)
  344. this.pos = 0
  345. } else {
  346. //不是第一项时,就根据标识去存储
  347. if (data[index].warehouseNumViewList.length > 1) {
  348. 查找到符合条件的数据时每次要把之前存储的数据 + 1
  349. this.spanArr[this.pos] = data[index].warehouseNumViewList.length
  350. this.spanArr.push(0)
  351. } else {
  352. // 没有符合的数据时,要记住当前的index
  353. this.spanArr.push(1)
  354. this.pos = index
  355. }
  356. }
  357. })
  358. },
  359. //查看
  360. trainSee(row) {
  361. if (row.tranType == '汽运') {
  362. this.$router.push({
  363. path: 'tranManagementReceivingloadingLook',
  364. query: {
  365. id: row.id,
  366. },
  367. })
  368. } else if (row.tranType == '船运') {
  369. this.$router.push({
  370. path: 'tranManagementUnShippingFeedbackLook',
  371. query: {
  372. id: row.id,
  373. },
  374. })
  375. }
  376. else if (row.tranType == '火运') {
  377. this.$router.push({
  378. path: 'tranManagementFireReceivingFeedbackLook',
  379. query: {
  380. id: row.id,
  381. },
  382. })
  383. }else if (row.tranType == '他运') {
  384. this.$router.push({
  385. path: 'tranManagementthirdpartnarReceivingLook',
  386. query: {
  387. id: row.id,
  388. },
  389. })
  390. }
  391. },
  392. //反馈
  393. feedback(row) {
  394. if (row.tranType == '汽运') {
  395. this.$router.push({
  396. path: 'tranManagementReceivingloading',
  397. query: {
  398. id: row.id,
  399. },
  400. })
  401. }
  402. if (row.tranType == '火运') {
  403. this.$router.push({
  404. path: 'tranManagementFireReceivingFeedback',
  405. query: {
  406. id: row.id,
  407. },
  408. })
  409. } else if (row.tranType == '船运') {
  410. this.$router.push({
  411. path: 'tranManagementUnShippingFeedback',
  412. query: {
  413. id: row.id,
  414. },
  415. })
  416. }else if (row.tranType == '他运') {
  417. this.$router.push({
  418. path: 'tranManagementthirdpartnarReceiving',
  419. query: {
  420. id: row.id,
  421. },
  422. })
  423. }
  424. },
  425. dateFormat(fmt, date) {
  426. let ret
  427. const opt = {
  428. 'Y+': date.getFullYear().toString(), // 年
  429. 'm+': (date.getMonth() + 1).toString(), // 月
  430. 'd+': date.getDate().toString(), // 日
  431. 'H+': date.getHours().toString(), // 时
  432. // "M+": date.getMinutes().toString(), // 分
  433. // "S+": date.getSeconds().toString() // 秒
  434. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  435. }
  436. for (let k in opt) {
  437. ret = new RegExp('(' + k + ')').exec(fmt)
  438. if (ret) {
  439. fmt = fmt.replace(
  440. ret[1],
  441. ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
  442. )
  443. }
  444. }
  445. return fmt
  446. },
  447. handleClose() {
  448. this.accessoryTFs = false
  449. },
  450. handleSizeChange(val) {
  451. console.log(`每页 ${val} 条`)
  452. this.pageSize = val
  453. this.getList()
  454. },
  455. handleCurrentChange(val) {
  456. this.currentPage = val
  457. console.log(`当前页: ${val}`)
  458. this.getList()
  459. },
  460. editClick(row) {
  461. var status = ''
  462. if (row.receivingStatus == '待执行' || row.receivingStatus == '已完货') {
  463. status = '执行中'
  464. } else if (row.receivingStatus == '执行中') {
  465. status = '已完货'
  466. }
  467. //cancelButtonClass: "btn-custom-cancel"
  468. this.$confirm(`是否将状态改为${status}`, {
  469. confirmButtonText: '确定',
  470. cancelButtonText: '取消',
  471. type: 'warning',
  472. })
  473. .then(() => {
  474. stateRec({ id: row.id })
  475. .toPromise()
  476. .then((response) => {
  477. this.$notify.success({
  478. title: '成功',
  479. message: '状态修改成功',
  480. })
  481. this.getList()
  482. })
  483. .catch((response) => {
  484. // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  485. })
  486. })
  487. .catch(() => {
  488. return false
  489. })
  490. },
  491. selecttaskType(e) {
  492. for (var i = 0; i < this.taskTypeList.length; i++) {
  493. if (this.taskTypeList[i].value == e) {
  494. this.feedbackFlag = this.taskTypeList[i].type
  495. }
  496. }
  497. this.getList()
  498. },
  499. selecttranType(e) {
  500. for (var i = 0; i < this.tranTypeList.length; i++) {
  501. if (this.tranTypeList[i].value == e) {
  502. this.tranTypeKey = this.tranTypeList[i].type
  503. }
  504. }
  505. this.getList()
  506. },
  507. fujian(row) {
  508. if (
  509. row.receiveAttachmentPath === null ||
  510. row.receiveAttachmentPath === ''
  511. ) {
  512. EventBus.$emit(
  513. 'warning',
  514. this.$t('system.noticeCircular.NoInformation')
  515. )
  516. } else {
  517. this.accessoryTFs = true
  518. }
  519. this.appendixIdss = row.receiveAttachmentPath
  520. },
  521. handleExamine(row) {
  522. this.$router.push({
  523. name: 'salesContractExamine',
  524. query: { id: row.id },
  525. })
  526. },
  527. // 关闭 dialog时 处理文件url 初始化upload组件
  528. handleCloe() {
  529. this.dialogViewSpareMoney = false
  530. },
  531. history(row) {
  532. billoperatehis({ id: row.id })
  533. .toPromise()
  534. .then((response) => {
  535. this.historyList = response
  536. })
  537. },
  538. find() {
  539. if (this.inOutDate != null) {
  540. if (this.inOutDate.length > 0) {
  541. this.startDate = this.dateFormat('YYYY-mm-dd', this.inOutDate[0])
  542. this.endDate = this.dateFormat('YYYY-mm-dd', this.inOutDate[1])
  543. } else {
  544. this.startDate = ''
  545. this.endDate = ''
  546. }
  547. } else {
  548. this.startDate = ''
  549. this.endDate = ''
  550. }
  551. this.currentPage = 1
  552. this.getList()
  553. },
  554. },
  555. }
  556. </script>
  557. <style lang="scss" scoped>
  558. .connert {
  559. width: 90%;
  560. margin: 0 auto;
  561. }
  562. .vertical-text-left {
  563. width: 62px;
  564. text-align: right;
  565. }
  566. .el-button--primary {
  567. background-color: #5878e8;
  568. border-color: #5878e8;
  569. }
  570. .el-button--default {
  571. color: #8890b1;
  572. border-color: #e8eaf1;
  573. }
  574. /deep/.base_header_layout .grid-content.right .find.el-button--primary {
  575. width: 30px;
  576. margin-left: 0;
  577. border-top-left-radius: 0px;
  578. border-bottom-left-radius: 0px;
  579. }
  580. /deep/.findValue .el-input__inner {
  581. border-top-right-radius: 0px;
  582. border-bottom-right-radius: 0px;
  583. }
  584. .completed.el-button--default {
  585. border-color: #5878e8;
  586. background-color: #f6f7fc;
  587. color: #5878e8;
  588. }
  589. .putstorage.el-button--default,
  590. .deliverystorage.el-button--default {
  591. border-color: #8890b1;
  592. background-color: #fff;
  593. color: #8890b1;
  594. }
  595. /deep/.el-table td,
  596. /deep/.el-table th.is-leaf {
  597. border-right: 1px solid #e9ecf7;
  598. text-align: center;
  599. }
  600. /deep/.el-table tr td:first-child,
  601. /deep/.el-table tr th.is-leaf:first-child {
  602. border-left: 1px solid #e9ecf7;
  603. }
  604. .record,
  605. .record1,
  606. .adjustment {
  607. display: inline-block;
  608. color: #5878e8;
  609. padding: 0 4px !important;
  610. position: relative;
  611. font-size: 14px;
  612. }
  613. .record:after {
  614. position: absolute;
  615. content: '';
  616. display: block;
  617. top: 5px;
  618. right: -2px;
  619. width: 1px;
  620. height: 12px;
  621. background: #e9ecf7;
  622. }
  623. .el-row {
  624. height: 60px;
  625. }
  626. .base_header_layout .grid-content {
  627. margin-top: 80px;
  628. }
  629. .el-input--small .el-input__inner {
  630. margin-left: 20px;
  631. }
  632. .el-range-editor--small.el-input__inner {
  633. height: 32px;
  634. margin: 0 10px;
  635. }
  636. //状态样式
  637. .executory,
  638. .inExecution,
  639. .done {
  640. width: 6px;
  641. height: 6px;
  642. display: inline-block;
  643. border-radius: 50%;
  644. position: relative;
  645. top: -1px;
  646. font-size: 14px;
  647. }
  648. .executory {
  649. background: #ff9f24;
  650. }
  651. .inExecution {
  652. background: #5878e8;
  653. }
  654. .done {
  655. background: #50cad4;
  656. }
  657. // .record, .adjustment {
  658. // display: inline-block;
  659. // color: #5878e8;
  660. // padding: 0 4px !important;
  661. // position: relative;
  662. // font-size: 14px;
  663. // }
  664. /deep/.el-pagination {
  665. text-align: center;
  666. white-space: nowrap;
  667. padding: 2px 5px;
  668. color: #303133;
  669. font-weight: 700;
  670. margin-bottom: 20px;
  671. }
  672. .el-select {
  673. width: 30%;
  674. margin-right: 10px;
  675. }
  676. /deep/.typeselect .el-input__inner {
  677. color: #8890b1;
  678. }
  679. </style>