tranManagementReceivingFeedback.vue 15 KB

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