tranManagementReceivingFeedback.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570
  1. //收获反馈
  2. <template>
  3. <div>
  4. <BaseHeaderLayout :leftSpan="13">
  5. <template slot="left">
  6. <ws-button class="but" @click="statusquery(1)">
  7. 执行中</ws-button
  8. >
  9. <ws-button class="but" @click="statusquery(2)">已完成</ws-button>
  10. <ws-button class="but" @click="statusquery()">全部任务</ws-button>
  11. </template>
  12. <!-- 接单开始 -->
  13. <template slot="right">
  14. <div>
  15. <span style="display: inline-block; width: 239px;color: #8890B1;">接单日期</span>
  16. </div>
  17. <el-date-picker
  18. v-model="deptBudgetList.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%; margin-top: 20px"
  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="运输方式" width="80">
  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">
  73. </el-table-column>
  74. <el-table-column class="table_td" label="收货" prop="receive">
  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. searchType: 1,
  205. searchTypeText: '未完成',
  206. searchKeyWord: '',
  207. contractType: 2,
  208. // 提交类型
  209. submitType: true,
  210. size: 10,
  211. spanArr: [],
  212. warehouseName: '',
  213. deptBudgetTotal: 0,
  214. compId: sessionStorage.getItem('ws-pf_compId'),
  215. deptCircularPage: {},
  216. warehouseList: [],
  217. deptBudgetList: {},
  218. historyList: [],
  219. value2:'',
  220. pickerOptions:[],
  221. pickerBeginDateBefore: {
  222. disabledDate: (time) => {
  223. return time.getTime() > Date.now()
  224. },
  225. },
  226. accessoryTFs: false,
  227. }
  228. },
  229. mounted(){
  230. this.getList()
  231. },
  232. methods: {
  233. //接口
  234. getList() {
  235. console.log(765)
  236. shippingList({
  237. compId: sessionStorage.getItem('ws-pf_compId'),
  238. currentPage: this.currentPage,
  239. pageSize: this.pageSize,
  240. contractType: this.contractType,
  241. searchType: this.searchType,
  242. })
  243. .toPromise()
  244. .then((response) => {
  245. this.warehouseList = response
  246. // this.deptCircularPage.currentPage = response.current
  247. // this.deptCircularPage.pageSize = response.size
  248. this.deptBudgetTotal = response.total
  249. })
  250. },
  251. statusquery(status){
  252. this.searchType = status
  253. this.getList()
  254. },
  255. delivery(item) {
  256. this.$router.push({
  257. path: 'warehouseManagementDelivery',
  258. query: {
  259. baseId: item.warehouseId,
  260. positionId: item.binNumberId,
  261. warehouseName: item.warehouseName,
  262. binNumber: item.binNumber,
  263. capacity: item.capacity,
  264. },
  265. })
  266. },
  267. getSpanArr(data) {
  268. let that = this
  269. //页面展示的数据,不一定是全部的数据,所以每次都清空之前存储的 保证遍历的数据是最新的数据。以免造成数据渲染混乱
  270. that.spanArr = []
  271. that.pos = 0
  272. // //遍历数据
  273. data.forEach((item, index) => {
  274. //判断是否是第一项
  275. if (index === 0) {
  276. this.spanArr.push(1)
  277. this.pos = 0
  278. } else {
  279. //不是第一项时,就根据标识去存储
  280. if (data[index].warehouseNumViewList.length > 1) {
  281. 查找到符合条件的数据时每次要把之前存储的数据+1
  282. this.spanArr[this.pos] = data[index].warehouseNumViewList.length
  283. this.spanArr.push(0)
  284. } else {
  285. // 没有符合的数据时,要记住当前的index
  286. this.spanArr.push(1)
  287. this.pos = index
  288. }
  289. }
  290. })
  291. },
  292. //查看
  293. trainSee(row) {
  294. if (row.tranType == '汽运') {
  295. this.$router.push({
  296. path: 'tranManagementReceivingloadingLook',
  297. query: {
  298. id: row.id,
  299. },
  300. })
  301. }
  302. },
  303. //反馈
  304. feedback(row) {
  305. this.$router.push({
  306. path: 'tranManagementReceivingloading',
  307. query: {
  308. id: row.id,
  309. },
  310. })
  311. },
  312. dateFormat(fmt, date) {
  313. let ret
  314. const opt = {
  315. 'Y+': date.getFullYear().toString(), // 年
  316. 'm+': (date.getMonth() + 1).toString(), // 月
  317. 'd+': date.getDate().toString(), // 日
  318. 'H+': date.getHours().toString(), // 时
  319. // "M+": date.getMinutes().toString(), // 分
  320. // "S+": date.getSeconds().toString() // 秒
  321. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  322. }
  323. for (let k in opt) {
  324. ret = new RegExp('(' + k + ')').exec(fmt)
  325. if (ret) {
  326. fmt = fmt.replace(
  327. ret[1],
  328. ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
  329. )
  330. }
  331. }
  332. return fmt
  333. },
  334. handleClose() {
  335. this.accessoryTFs = false
  336. },
  337. handleSizeChange(val) {
  338. console.log(`每页 ${val} 条`)
  339. this.pageSize = val
  340. this.getList()
  341. },
  342. handleCurrentChange(val) {
  343. this.currentPage = val
  344. console.log(`当前页: ${val}`)
  345. this.getList()
  346. },
  347. editClick(row) {
  348. var status = ''
  349. if (row.status == '待执行' || row.status == '已完成') {
  350. status = '执行中'
  351. } else if (row.status == '执行中') {
  352. status = '已完成'
  353. }
  354. //cancelButtonClass: "btn-custom-cancel"
  355. this.$confirm(`是否将状态改为${status}`, {
  356. confirmButtonText: '确定',
  357. cancelButtonText: '取消',
  358. type: 'warning',
  359. })
  360. .then(() => {
  361. state({ id: row.id })
  362. .toPromise()
  363. .then((response) => {
  364. this.$notify.success({
  365. title: '成功',
  366. message: '状态修改成功',
  367. })
  368. this.getList()
  369. })
  370. .catch((response) => {
  371. // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  372. })
  373. })
  374. .catch(() => {
  375. return false
  376. })
  377. },
  378. selecttaskType(e) {
  379. for (var i = 0; i < this.taskTypeList.length; i++) {
  380. if (this.taskTypeList[i].value == e) {
  381. this.searchType = this.taskTypeList[i].type
  382. }
  383. }
  384. },
  385. fujian(row) {
  386. if (
  387. row.receiveAttachmentPath === null ||
  388. row.receiveAttachmentPath === ''
  389. ) {
  390. EventBus.$emit(
  391. 'warning',
  392. this.$t('system.noticeCircular.NoInformation')
  393. )
  394. } else {
  395. this.accessoryTFs = true
  396. }
  397. this.appendixIdss = row.receiveAttachmentPath
  398. },
  399. handleExamine(row) {
  400. this.$router.push({
  401. name: 'salesContractExamine',
  402. query: { id: row.id },
  403. })
  404. },
  405. // 关闭 dialog时 处理文件url 初始化upload组件
  406. handleCloe() {
  407. this.dialogViewSpareMoney = false
  408. },
  409. history(row) {
  410. billoperatehis({ id: row.id })
  411. .toPromise()
  412. .then((response) => {
  413. this.historyList = response
  414. })
  415. },
  416. find() {
  417. this.currentPage = 1
  418. this.getList()
  419. },
  420. async exportlist() {
  421. const { data } = await export1(
  422. {
  423. compId: sessionStorage.getItem('ws-pf_compId'),
  424. contractType: this.contractType,
  425. currentPage: this.currentPage,
  426. pageSize: this.pageSize,
  427. searchType: this.searchType,
  428. searchKeyWord: this.searchKeyWord,
  429. startDate: this.startDate,
  430. endDate: this.endDate,
  431. },
  432. {},
  433. { responseType: 'blob' }
  434. ).toPromise()
  435. downloadFile({
  436. res: data,
  437. fileName: `${
  438. this.date.year + (this.date.month ? `-${this.date.month}` : '')
  439. }_采购合同`,
  440. type: 'xls',
  441. })
  442. },
  443. },
  444. }
  445. </script>
  446. <style lang="scss" scoped>
  447. .connert {
  448. width: 90%;
  449. margin: 0 auto;
  450. }
  451. .vertical-text-left {
  452. width: 62px;
  453. text-align: right;
  454. }
  455. .el-button--primary {
  456. background-color: #5878e8;
  457. border-color: #5878e8;
  458. }
  459. .el-button--default {
  460. color: #8890b1;
  461. border-color: #e8eaf1;
  462. }
  463. /deep/.base_header_layout .grid-content.right .find.el-button--primary {
  464. width: 30px;
  465. margin-left: 0;
  466. border-top-left-radius: 0px;
  467. border-bottom-left-radius: 0px;
  468. }
  469. /deep/.findValue .el-input__inner {
  470. border-top-right-radius: 0px;
  471. border-bottom-right-radius: 0px;
  472. }
  473. .completed.el-button--default {
  474. border-color: #5878e8;
  475. background-color: #f6f7fc;
  476. color: #5878e8;
  477. }
  478. .putstorage.el-button--default,
  479. .deliverystorage.el-button--default {
  480. border-color: #8890b1;
  481. background-color: #fff;
  482. color: #8890b1;
  483. }
  484. /deep/.el-table td,
  485. /deep/.el-table th.is-leaf {
  486. border-right: 1px solid #e9ecf7;
  487. text-align: center;
  488. }
  489. /deep/.el-table tr td:first-child,
  490. /deep/.el-table tr th.is-leaf:first-child {
  491. border-left: 1px solid #e9ecf7;
  492. }
  493. .record,
  494. .adjustment {
  495. display: inline-block;
  496. color: #5878e8;
  497. padding: 0 4px !important;
  498. position: relative;
  499. }
  500. .record:after {
  501. position: absolute;
  502. content: '';
  503. display: block;
  504. top: 5px;
  505. right: -2px;
  506. width: 1px;
  507. height: 12px;
  508. background: #e9ecf7;
  509. }
  510. .el-row{
  511. height: 150px;
  512. }
  513. .base_header_layout .grid-content{
  514. margin-top: 80px;
  515. }
  516. .but{
  517. margin-top: 150px;
  518. margin-left: 110px;
  519. }
  520. .el-input--small .el-input__inner{
  521. margin-left: 20px;
  522. }
  523. .el-range-editor--small.el-input__inner {
  524. height: 32px;
  525. margin-left: -20%;
  526. }
  527. //状态样式
  528. .executory,
  529. .inExecution,
  530. .done {
  531. width: 6px;
  532. height: 6px;
  533. display: inline-block;
  534. border-radius: 50%;
  535. position: relative;
  536. top: -1px;
  537. font-size: 14px;
  538. }
  539. .executory {
  540. background: #ff9f24;
  541. }
  542. .inExecution {
  543. background: #5878e8;
  544. }
  545. .done {
  546. background: #50cad4;
  547. }
  548. .record, .adjustment {
  549. display: inline-block;
  550. color: #5878e8;
  551. padding: 0 4px !important;
  552. position: relative;
  553. font-size: 14px;
  554. }
  555. </style>