waybillReporting.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645
  1. // 运单上报
  2. <template>
  3. <div class="center">
  4. <div class="center_css">
  5. <div class="top_css">
  6. <el-row>
  7. <el-col :span="14">
  8. <el-button type="primary" @click="postponeSubmission" style="margin-right:10px">暂缓上报</el-button>
  9. <el-button type="primary" @click="batchSubmission" style="margin-right:10px">批量上报</el-button>
  10. <el-date-picker v-model="value1" value-format="yyyy-MM-dd" @change="dateChange" type="daterange"
  11. range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
  12. </el-date-picker>
  13. </el-col>
  14. <el-col :span="10">
  15. <div class="screen">
  16. <el-input class='find' v-model="searchkeyWord" placeholder="可按订单号、姓名、账号查找" @keyup.enter.native="find"
  17. clearable @change="find" />
  18. <el-button class="search" @click="find"><img width="16" height="16" style="margin-left: -8px"
  19. src="../../../public/img/sousuo.png"></el-button><span class="count_css">共{{ deptBudgetTotal
  20. }}条</span>
  21. </div>
  22. </el-col>
  23. </el-row>
  24. <el-row>
  25. <el-col>
  26. <div class="search_btn">
  27. <div :class="search == 1 ? 'search' : 'searchNo'" class="search_item search_block" @click="searchBtn(1)">
  28. 待上报
  29. </div>
  30. <div :class="search == 2 ? 'search' : 'searchNo'" class="search_item" @click="searchBtn(2)">
  31. 审核中
  32. </div>
  33. <div :class="search == 3 ? 'search' : 'searchNo'" class="search_item" @click="searchBtn(3)">
  34. 已通过
  35. </div>
  36. <div :class="search == 4 ? 'search' : 'searchNo'" class="search_item" @click="searchBtn(4)">
  37. 暂缓中
  38. </div>
  39. <div :class="search == '' ? 'search' : 'searchNo'" class="search_item" @click="searchBtn('')">
  40. 全部
  41. </div>
  42. </div>
  43. </el-col>
  44. </el-row>
  45. </div>
  46. <el-table @selection-change="handleSelectionChange" :data="tableData"
  47. style="width: 98%; margin: 0 auto; border-radius: 10px" height="58vh" border highlight-current-row>
  48. <el-table-column type="selection" width="55" :selectable="selectInit">
  49. </el-table-column>
  50. <el-table-column type="index" label="序号" width="50">
  51. <template scope="scope">
  52. <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
  53. <span v-else>{{ scope.$index + 1 }}</span>
  54. </template>
  55. </el-table-column>
  56. <el-table-column prop="orderNo" label="订单编号" min-width="155" />
  57. <el-table-column prop="cargoOwner" label="发运人" />
  58. <el-table-column prop="cargoOwnerPhone" label="发运人账号" />
  59. <el-table-column prop="driverName" label="承运人" />
  60. <el-table-column prop="driverPhone" label="承运人账号" />
  61. <el-table-column prop="orderEndDate" label="订单完结时间" min-width="110" />
  62. <el-table-column prop="escalationStatus" label="状态">
  63. <template slot-scope="scope1">
  64. <span>{{ scope1.row.escalationStatus }}</span>
  65. <el-tooltip class="item" effect="dark" :content="scope1.row.escalationFailureReason" placement="top"
  66. v-if="scope1.row.escalationStatus == '未通过'">
  67. <img src="../../../public/img/wenhao.png" alt="" class="ask_css" />
  68. </el-tooltip>
  69. </template>
  70. </el-table-column>
  71. <el-table-column label="操作" min-width="200">
  72. <template slot-scope="scope">
  73. <el-link target="_blank" @click="look(scope.row)" type="primary" :underline="false">查看</el-link>
  74. <el-divider direction="vertical" />
  75. <el-link target="_blank" type="primary" :underline="false" @click="submission(scope.row)"
  76. :disabled="scope.row.escalationStatus != '未上报' && scope.row.escalationStatus != '未通过' && scope.row.escalationStatus != '暂缓中'">
  77. 上报</el-link>
  78. </template>
  79. </el-table-column>
  80. </el-table>
  81. </div>
  82. <el-pagination :current-page="currentPage" style="text-align: center; margin-top: 10px"
  83. :page-size="deptCircularPage.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal"
  84. @size-change="handleSizeChange" @current-change="handleCurrentChange" />
  85. <el-drawer title="运单信息" :visible.sync="rightSee">
  86. <div class="right_css">
  87. <div class="right_item">订单编号:{{ orderData.orderNo }}</div>
  88. <div class="right_title">发货时间</div>
  89. <div class="right_item">{{ orderData.hyCarrierInfo.loadingDate }}</div>
  90. <div class="right_title" v-if="orderData.hyCarrierInfo.unloadingDate">收货时间</div>
  91. <div class="right_item">{{ orderData.hyCarrierInfo.unloadingDate }}</div>
  92. <div class="right_title">托运方</div>
  93. <div class="right_item">{{ orderData.cargoOwner ? orderData.cargoOwner : orderData.compName }}</div>
  94. <div class="right_title">托运方证件号或信用代码</div>
  95. <div class="right_item" v-if="orderData.cargoOwnerIdCard">{{ orderData.cargoOwnerIdCard }}</div>
  96. <div class="right_item" v-else>{{ orderData.hyCompanyInfo ? orderData.hyCompanyInfo.unifiedSocialCreditCode :
  97. "暂无"
  98. }}
  99. </div>
  100. <div class="right_title">收货联系人</div>
  101. <div class="right_item">{{ orderData.publishTaskInfo.receiver }}</div>
  102. <div class="right_title">收货方证件号或信用代码</div>
  103. <div class="right_item">{{ orderData.publishTaskInfo.receiverIdcard ? orderData.publishTaskInfo.receiverIdcard :
  104. orderData.publishTaskInfo.receiverCreditCode
  105. }}</div>
  106. <div class="right_title">运费</div>
  107. <div class="right_item">{{ orderData.freight }}</div>
  108. <div class="right_title">车牌号</div>
  109. <div class="right_item">{{ orderData.carNumber }}</div>
  110. <div class="right_title">车牌颜色</div>
  111. <div class="right_item">{{ orderData.carNumberColour }}</div>
  112. <div class="right_title">发货地址</div>
  113. <div class="right_item">
  114. {{ orderData.sendPrivate }}{{ orderData.sendCity }}{{ orderData.sendArea }}{{
  115. orderData.sendDetailedAddress
  116. }}
  117. </div>
  118. <div class="right_title">收货地址</div>
  119. <div class="right_item">
  120. {{ orderData.unloadPrivate }}{{ orderData.unloadCity }}{{ orderData.unloadArea }}{{
  121. orderData.unloadDetailedAddress
  122. }}
  123. </div>
  124. <div class="right_title">司机姓名</div>
  125. <div class="right_item">{{ orderData.driverName }}</div>
  126. <div class="right_title">司机身份证号</div>
  127. <div class="right_item">{{ orderData.driverIdCard }}</div>
  128. <div class="right_title">货物类别</div>
  129. <div class="right_item">{{ orderData.goodsType }}</div>
  130. <div class="right_title">货名</div>
  131. <div class="right_item">{{ orderData.goodsName }}</div>
  132. <div class="right_title">重量(kg)</div>
  133. <div class="right_item">{{ orderData.hyCarrierInfo.unloadingWeight }}</div>
  134. <div class="right_btn">
  135. <el-button @click="rightSee = false">关闭</el-button>
  136. </div>
  137. </div>
  138. </el-drawer>
  139. </div>
  140. </template>
  141. <script>
  142. import {
  143. waybillGetList,
  144. waybillGetInfo,
  145. deferEscalation,
  146. batchEscalation
  147. } from '@/api/parkReportManagement'
  148. export default {
  149. data() {
  150. return {
  151. tableData: [],
  152. // 分页
  153. searchkeyWord: '',
  154. currentPage: 1,
  155. pageSize: 10,
  156. deptBudgetTotal: 0,
  157. deptCircularPage: {},
  158. search: '',
  159. modification: [],
  160. orderData: {
  161. publishTaskInfo: {},
  162. hyCarrierInfo: {},
  163. hyCargoOwnerInfo: {},
  164. hyCompanyInfo: {}
  165. },
  166. value1: '',
  167. status: '',
  168. disabled: false,
  169. rejectInfo: false,
  170. //侧边查看
  171. rightSee: false,
  172. //筛选时间
  173. startDate: '',
  174. endDate: '',
  175. }
  176. },
  177. mounted() {
  178. this.getList()
  179. },
  180. methods: {
  181. handleSelectionChange(val) {
  182. this.modification = val;
  183. },
  184. dateChange(e) {
  185. this.startDate = e[0]
  186. this.endDate = e[1]
  187. this.getList()
  188. },
  189. //上报
  190. submission(row) {
  191. this.modification.push(row)
  192. this.batchSubmission()
  193. },
  194. //暂缓上报
  195. postponeSubmission() {
  196. if (this.modification.length > 0) {
  197. this.$confirm('确定暂缓上报选中的条目?', '提示', {
  198. confirmButtonText: '确定',
  199. cancelButtonText: '取消',
  200. type: 'warning'
  201. })
  202. .then(() => {
  203. deferEscalation({ orderInfoList: this.modification })
  204. .then(response => {
  205. if (response.code == 200) {
  206. this.$notify({
  207. title: '成功',
  208. message: '操作成功!',
  209. type: 'success'
  210. })
  211. this.modification = []
  212. this.getList()
  213. }
  214. })
  215. })
  216. } else {
  217. this.$message.error('至少选中一条可上报的条目!')
  218. }
  219. },
  220. //批量上报
  221. batchSubmission() {
  222. var that = this
  223. if (this.modification.length > 0) {
  224. this.$confirm('确定批量上报运单信息?', '提示', {
  225. confirmButtonText: '确定',
  226. cancelButtonText: '取消',
  227. type: 'warning'
  228. })
  229. .then(() => {
  230. batchEscalation({ orderInfoList: this.modification })
  231. .then(response => {
  232. if (response.code == 200) {
  233. that.$notify({
  234. title: '成功',
  235. message: '上报成功!',
  236. type: 'success'
  237. })
  238. // this.modification =
  239. }
  240. that.getList()
  241. that.modification = []
  242. }).catch(() => {
  243. that.modification = []
  244. });
  245. })
  246. } else {
  247. this.$message.error('至少选中一条可上报的条目!')
  248. }
  249. },
  250. selectInit(row) {
  251. if (row.status == '审核中' || row.status == '已通过') {
  252. return false
  253. } else {
  254. return true
  255. }
  256. },
  257. getList() {
  258. this.listLoading = true;
  259. let _obj = {};
  260. _obj.currentPage = this.currentPage;
  261. _obj.pageSize = this.pageSize;
  262. _obj.searchKeyWord = this.searchkeyWord;
  263. _obj.searchType = this.search;
  264. _obj.startDate = this.startDate
  265. _obj.endDate = this.endDate
  266. waybillGetList(_obj)
  267. .then((response) => {
  268. this.tableData = response.data.records;
  269. for (let i = 0; i < this.tableData.length; i++) {
  270. this.tableData[i].iconShow = true;
  271. }
  272. this.deptBudgetTotal = response.data.total;
  273. this.listLoading = false;
  274. })
  275. .catch(() => {
  276. this.listLoading = false;
  277. });
  278. },
  279. searchBtn(num) {
  280. this.search = num;
  281. this.getList();
  282. },
  283. find() {
  284. this.currentPage = 1
  285. this.getList()
  286. },
  287. look(row) {
  288. this.loading = true
  289. this.rightSee = true
  290. waybillGetInfo({
  291. id: row.id
  292. }).then(response => {
  293. this.orderData = response.data
  294. this.listLoading = false
  295. })
  296. .catch(() => {
  297. this.listLoading = false
  298. })
  299. },
  300. handleSizeChange(val) {
  301. console.log(`每页 ${val} 条`)
  302. this.pageSize = val
  303. this.getList()
  304. },
  305. handleCurrentChange(val) {
  306. this.currentPage = val
  307. console.log(`当前页: ${val}`)
  308. this.getList()
  309. }
  310. }
  311. }
  312. </script>
  313. <style lang="scss" scoped>
  314. .center {
  315. padding: 10px 20px;
  316. background: #f5f6f7;
  317. min-height: calc(100vh - 50px);
  318. .top_css {
  319. padding: 10px;
  320. .search_btn {
  321. height: 80px;
  322. background: linear-gradient(#fafbfb, #ffffff);
  323. display: flex;
  324. margin-top: 20px;
  325. .search_block {
  326. margin-left: 20px;
  327. }
  328. .search_item {
  329. text-align: center;
  330. font-size: 14px;
  331. font-weight: 600;
  332. line-height: 40px;
  333. width: 112px;
  334. height: 40px;
  335. background: #f7f8f9;
  336. cursor: pointer;
  337. margin-top: 30px;
  338. }
  339. .searchNo {
  340. color: #323233;
  341. }
  342. .search {
  343. color: #2f53eb;
  344. background: #ffffff;
  345. }
  346. }
  347. }
  348. .ask_css {
  349. position: absolute;
  350. margin: 3px 0 0 10px;
  351. }
  352. .center_css {
  353. background: #ffffff;
  354. border-radius: 1px;
  355. margin-top: 10px;
  356. padding-bottom: 10px;
  357. }
  358. .screen {
  359. display: flex;
  360. .search {
  361. width: 40px;
  362. height: 40px;
  363. background: #2f53eb;
  364. border-radius: 0px 2px 2px 0px;
  365. border: 1px solid #DCDFE6;
  366. margin-left: -1px;
  367. }
  368. .count_css {
  369. width: 80px;
  370. text-align: center;
  371. line-height: 40px;
  372. color: #666666;
  373. }
  374. }
  375. .el-button {
  376. padding: 10px 20px !important;
  377. }
  378. .center_css {
  379. ::v-deep .el-table th,
  380. ::v-deep .el-table td {
  381. text-align: center;
  382. }
  383. .fujian {
  384. font-size: 24px;
  385. color: #409eff;
  386. }
  387. .warning {
  388. font-size: 14px;
  389. color: #ed1d1d;
  390. }
  391. }
  392. }
  393. .el-button--primary {
  394. color: #FFF;
  395. background-color: #2f53eb;
  396. border-color: #2f53eb;
  397. }
  398. .car_css {
  399. width: 50%;
  400. display: inline-block;
  401. text-align: center;
  402. margin-top: 30px;
  403. position: relative;
  404. .status_css {
  405. background: #3AC602;
  406. width: 50px;
  407. height: 17px;
  408. position: absolute;
  409. top: 0px;
  410. right: 15px;
  411. border-radius: 3px;
  412. }
  413. .carno_css {
  414. padding: 1px 5px;
  415. background-color: #F5F6F7;
  416. color: #666666;
  417. border-radius: 12px;
  418. text-align: center;
  419. width: 100px;
  420. margin: 10px auto 0;
  421. }
  422. .carborder_css {
  423. border: 1px solid #F0F1F2;
  424. margin: 15px auto 0;
  425. width: 90%;
  426. }
  427. }
  428. .tips {
  429. color: #999999;
  430. font-size: 14px;
  431. }
  432. .car_item {
  433. width: 200px;
  434. height: 160px;
  435. border-radius: 5px;
  436. }
  437. .user {
  438. margin-bottom: 20px;
  439. .id_css {
  440. font-size: 14px;
  441. }
  442. .id_css,
  443. .name_css {
  444. margin: 5px 0;
  445. color: #0D0D0D;
  446. }
  447. .pay_name {
  448. color: #9D9D9D;
  449. font-size: 14px;
  450. }
  451. .name_css {
  452. font-size: 16px;
  453. }
  454. .user_item {
  455. margin: 25px 0;
  456. width: 450px;
  457. height: 300px;
  458. }
  459. .border_css {
  460. width: 100%;
  461. border: 1px solid #F0F1F2;
  462. }
  463. }
  464. ::v-deep .el-table--border .el-table__header th {
  465. background: #f7f8f9;
  466. }
  467. .btn_css {
  468. color: #409EFF;
  469. cursor: pointer
  470. }
  471. .btn_css1 {
  472. margin-left: -20px;
  473. }
  474. .sign {
  475. font-size: 14px;
  476. color: red;
  477. }
  478. .form_css {
  479. width: 100%;
  480. margin: 20px auto 20px;
  481. ::v-deep .el-checkbox {
  482. width: 40%;
  483. height: 30px;
  484. }
  485. // ::v-deep .el-dialog__body{
  486. // padding: 10px 20px;
  487. // }
  488. ::v-deep .el-dialog__title {
  489. font-size: 16px;
  490. }
  491. ::v-deep .el-textarea__inner {
  492. background: #F0F1F2;
  493. }
  494. .form_btn {
  495. text-align: right;
  496. margin-top: 10px;
  497. }
  498. }
  499. //发送信息
  500. .Info_css {
  501. .Info_title {
  502. color: #323233;
  503. font-size: 16px;
  504. }
  505. .Info_item {
  506. margin: 20px 0;
  507. }
  508. .Info_btn {
  509. text-align: right;
  510. margin-top: 10px;
  511. }
  512. }
  513. //附件
  514. .file {
  515. .fujian_css {
  516. width: 631px;
  517. display: flex;
  518. margin: 0 auto;
  519. text-align: center;
  520. line-height: 32px;
  521. border: 1px solid #F0F1F2;
  522. border-right: 0px;
  523. border-radius: 2px 0px 0px 2px;
  524. .fujian_item {
  525. cursor: pointer;
  526. width: 90px;
  527. height: 32px;
  528. border-right: 1px solid #F0F1F2;
  529. }
  530. .file_btn {
  531. color: #2F53EB;
  532. background-color: #CFDBFE;
  533. }
  534. }
  535. .file_img {
  536. width: 525px;
  537. height: 332px;
  538. margin: 20px auto;
  539. }
  540. .img_css {
  541. width: 525px;
  542. height: 332px;
  543. }
  544. .btn {
  545. width: 400px;
  546. margin: 0 auto;
  547. }
  548. }
  549. .right_css {
  550. // overflow-y: auto !important;
  551. // min-height: 1266px;
  552. padding: 0 20px;
  553. .right_title {
  554. color: #9D9D9D;
  555. font-size: 14px;
  556. margin-bottom: 4px;
  557. }
  558. .title_name {
  559. margin-bottom: 10px;
  560. }
  561. .right_item {
  562. color: #0D0D0D;
  563. font-size: 14px;
  564. margin-bottom: 10px;
  565. }
  566. .right_btn {
  567. text-align: center;
  568. margin: 10px 0;
  569. }
  570. .img_css {
  571. width: 100px;
  572. height: 80px;
  573. margin-right: 5px;
  574. }
  575. .right_img {
  576. width: 200px;
  577. height: 120px;
  578. margin-top: 10px;
  579. }
  580. }
  581. .find::v-deep input.el-input__inner {
  582. border-radius: 0;
  583. }
  584. ::v-deep .el-drawer.rtl {
  585. overflow: auto;
  586. }
  587. </style>