tranManagementReceivingloading.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631
  1. // 汽车卸车
  2. <template>
  3. <div class="container">
  4. <el-row>
  5. <el-col :span="20">
  6. <h2 class="bg-left title">汽运卸车反馈</h2>
  7. </el-col>
  8. <el-col :span="4" class="bg-right">
  9. <el-button class="bg-bottom" type="primary" size="small" @click="revert()">
  10. <img
  11. width="6"
  12. height="10"
  13. style="vertical-align: bottom; margin-right: 3px"
  14. src="../../../public/img/lujing.png"
  15. alt
  16. />返回
  17. </el-button>
  18. </el-col>
  19. </el-row>
  20. <div class="center">
  21. <ws-form ref="deptBudgetList" :model="deptBudgetList" :rules="rules">
  22. <div class="basicInformation">
  23. <div class="small-title" style="font-size: 16px">任务详情</div>
  24. <ws-info-table>
  25. <!-- 任务编号 -->
  26. <ws-form-item label="任务编号" span="1" prop="processNo">{{ deptBudgetList.processNo }}</ws-form-item>
  27. <!-- 货名 -->
  28. <ws-form-item label="货名" span="1">{{ deptBudgetList.goodsName }}</ws-form-item>
  29. <!--重量(吨)-->
  30. <ws-form-item
  31. label="重量(吨)"
  32. span="1"
  33. prop="tare"
  34. class="readonly"
  35. >{{ deptBudgetList.weight }}</ws-form-item>
  36. <!--发货地址-->
  37. <ws-form-item label="发货地址" span="1" prop="netWeight">
  38. {{ deptBudgetList.sendPrivate }}{{ deptBudgetList.sendCity
  39. }}{{ deptBudgetList.sendArea
  40. }}{{ deptBudgetList.sendDetailedAddress }}
  41. </ws-form-item>
  42. <!--发货人-->
  43. <ws-form-item label="发货人" span="1" prop="agent">{{ deptBudgetList.sender }}</ws-form-item>
  44. <!--发货人电话-->
  45. <ws-form-item label="发货人电话" span="1" prop="agent">{{ deptBudgetList.senderPhone }}</ws-form-item>
  46. <!--收货地址-->
  47. <ws-form-item label="收货地址" span="1" prop="netWeight">
  48. {{ deptBudgetList.receivePrivate }}{{ deptBudgetList.receiveCity
  49. }}{{ deptBudgetList.receiveArea
  50. }}{{ deptBudgetList.receiveDetailedAddress }}
  51. </ws-form-item>
  52. <!--收货人-->
  53. <ws-form-item label="收货人" span="1" prop="receiver">{{ deptBudgetList.receiver }}</ws-form-item>
  54. <!--收货人电话-->
  55. <ws-form-item
  56. label="收货人电话"
  57. span="1"
  58. prop="receiverPhone"
  59. >{{ deptBudgetList.receiverPhone }}</ws-form-item>
  60. <!--发货日期-->
  61. <ws-form-item
  62. label="发货日期"
  63. span="1"
  64. prop="inOutDate"
  65. class="deliverydate"
  66. >{{ deptBudgetList.deliveryDateStart }}</ws-form-item>
  67. <!--最晚发货日期-->
  68. <ws-form-item
  69. label="最晚发货日期"
  70. span="1"
  71. prop="inOutDate"
  72. class="deliverydate"
  73. >{{ deptBudgetList.deliveryDateEnd }}</ws-form-item>
  74. <!--合同编号-->
  75. <ws-form-item label="合同编号" span="1" prop="contractNo">{{ deptBudgetList.contractNo }}</ws-form-item>
  76. <ws-form-item label="运输方式" span="1" prop="contractNo">{{ deptBudgetList.contractNo }}</ws-form-item>
  77. </ws-info-table>
  78. <div class="small-title" style="font-size: 16px">卸车详情</div>
  79. <div
  80. class="driver position liaison"
  81. v-for="(item, index) in deptBudgetList.tranCarInfoList"
  82. >
  83. <ws-info-table>
  84. <div class="catNos" v-show="item.temporaryDriverFlag == 0">司机-{{index+1}}</div>
  85. <div class="catNos catNosCor" v-show="item.temporaryDriverFlag != 0">司机-{{index+1}}(临)</div>
  86. <!--姓名-->
  87. <ws-form-item label="姓名:" span="1" prop="driver">
  88. <span v-show="item.temporaryDriverFlag == 0">{{ item.driver }}</span>
  89. </ws-form-item>
  90. <!--电话-->
  91. <ws-form-item label="电话:" span="1" prop="driverPhone">
  92. <!-- <ws-input
  93. v-show="item.temporaryDriverFlag != 0"
  94. v-model="item.driverPhone"
  95. maxlength="20"
  96. size="small"
  97. />-->
  98. <span v-show="item.temporaryDriverFlag == 0">{{ item.driverPhone }}</span>
  99. </ws-form-item>
  100. <!--车牌号-->
  101. <ws-form-item label="车牌号:" span="1" prop="carNo">
  102. <!-- <ws-input
  103. v-show="item.temporaryDriverFlag != 0"
  104. v-model="item.carNo"
  105. maxlength="20"
  106. size="small"
  107. />-->
  108. <span v-show="item.temporaryDriverFlag == 0">{{ item.carNo }}</span>
  109. </ws-form-item>
  110. <!--装车净重-->
  111. <ws-form-item label="装车(吨):" span="1" prop="loadNetWeight">
  112. <!-- <ws-input
  113. v-model="item.loadNetWeight"
  114. placeholder="请输入装车(吨)"
  115. maxlength="20"
  116. size="small"
  117. />-->
  118. {{item.loadNetWeight}}
  119. </ws-form-item>
  120. <!--卸车净重(吨)-->
  121. <ws-form-item label="卸车净重(吨):" span="1" prop="unloadNetWeight">
  122. <ws-input
  123. v-model="item.unloadNetWeight"
  124. placeholder="请输入卸车净重"
  125. maxlength="20"
  126. size="small"
  127. />
  128. </ws-form-item>
  129. <!--磅单-->
  130. <ws-form-item label="磅单:" span="1" prop="loadPoundImg">
  131. <template slot-scope="scope">
  132. <el-upload
  133. action="https://www.zthymaoyi.com/upload/admin"
  134. :show-file-list="false"
  135. :on-success="
  136. (res, file) => {
  137. uploadSuccessHandle1(index, res, file)
  138. }
  139. "
  140. class="avatar-uploader"
  141. accept=".jpg, .jpeg, .png, .gif"
  142. ><img
  143. width="18"
  144. height="20"
  145. style="
  146. vertical-align: text-top;
  147. position: relative;
  148. "
  149. src="../../../public/img/fujian.png"
  150. alt=""
  151. />
  152. </el-upload>
  153. <!-- <div v-show="item.temporaryDriverFlag == 0 && item.signStatus == '未上传'" class="signStatus">
  154. {{ item.signStatus }}
  155. </div>
  156. <div v-show="item.temporaryDriverFlag == 0 && item.signStatus == '已上传'" class="signStatus1">
  157. {{ item.signStatus }}
  158. </div> -->
  159. </template>
  160. </ws-form-item>
  161. </ws-info-table>
  162. </div>
  163. <div
  164. style="text-align: right; color: #8890b1; font-size: 16px"
  165. >合计{{ total }}/{{ deptBudgetList.weight }}</div>
  166. <div style="text-align: right; padding: 10px">
  167. <el-button class="bg-bottom-up" type="primary" size="small" @click="submit()">提交</el-button>
  168. </div>
  169. </div>
  170. </ws-form>
  171. </div>
  172. </div>
  173. </template>
  174. <script>
  175. import Pagination from '@/components/Pagination'
  176. import WsUpload from '@/components/WsUpload'
  177. import { seeCat, packList, feedback,getbank } from '@/model/transport/index'
  178. // import { dayjs, fmoney, EventBus } from 'base-core-lib'
  179. import { dayjs, EventBus } from 'base-core-lib'
  180. export default {
  181. name: 'viewSpareMoney',
  182. components: {
  183. WsUpload,
  184. Pagination
  185. },
  186. watch: {
  187. isShow(val) {
  188. this.showType = val
  189. }
  190. },
  191. data() {
  192. return {
  193. // 是否显示
  194. showType: true,
  195. deptBudgetTotal: 0,
  196. currentPage: 1,
  197. pageSize: 10,
  198. searchType: 1,
  199. startDate: null,
  200. endDate: null,
  201. carList: [],
  202. // 提交类型
  203. readonly: true,
  204. appendixIdsAdd: '',
  205. onChange: {},
  206. gradeList: [],
  207. rules: {
  208. netWeight: [
  209. {
  210. required: true,
  211. type: 'number',
  212. message: '请输入活动名称',
  213. trigger: 'blur'
  214. }
  215. ]
  216. },
  217. size: 10,
  218. compId: sessionStorage.getItem('ws-pf_compId'),
  219. deptCircularPage: {},
  220. packtypeList: {},
  221. date: {
  222. year: dayjs().format('YYYY'),
  223. month: dayjs().format('MM')
  224. },
  225. contractList: [],
  226. deptBudgetList: {
  227. tranCarInfoList: []
  228. },
  229. historyList: [],
  230. pickerBeginDateBefore: {
  231. disabledDate: time => {
  232. return time.getTime() > Date.now()
  233. }
  234. },
  235. accessoryTFs: false
  236. }
  237. },
  238. activated() {
  239. this.deptBudgetList.id = this.$route.query.id
  240. this.getList()
  241. },
  242. computed: {
  243. total: function() {
  244. var maxStorage = 0
  245. for (var i = 0; i < this.deptBudgetList.tranCarInfoList.length; i++) {
  246. maxStorage += Number(this.deptBudgetList.tranCarInfoList[i].unloadNetWeight)
  247. }
  248. return maxStorage
  249. }
  250. },
  251. mounted() {
  252. this.deptBudgetList.id = this.$route.query.id
  253. this.getList()
  254. },
  255. methods: {
  256. //返回按钮
  257. revert() {
  258. this.$router.push({ path: 'tranManagementReceivingFeedback' })
  259. },
  260. del(index) {
  261. if (this.deptBudgetList.tranCarInfoList.length > 1) {
  262. this.deptBudgetList.tranCarInfoList.splice(index, 1)
  263. }
  264. },
  265. uploadSuccessHandle1(index, e, fileList) {
  266. const that = this
  267. getbank({ bankImg: e.url })
  268. .toPromise()
  269. .then((response) => {
  270. for (var i = 0; i < this.freightspace1.length; i++) {
  271. if (i == index) {
  272. this.freightspace1[i].payeeAddressUrl = e.url
  273. this.freightspace1[i].bankCard = response.bankNo
  274. this.freightspace1[i].bankDeposit = response.bankName
  275. this.freightspace1[i].bankDepositBranchList =
  276. response.bankNameZhihang
  277. }
  278. }
  279. })
  280. },
  281. selectwaterContent() {},
  282. //提交按钮
  283. submit() {
  284. for (var i = 0; i < this.freightspace.length; i++) {
  285. if (this.freightspace[i].unloadNetWeight == null) {
  286. this.$message({
  287. message: '卸重不能为空!',
  288. type: 'warning'
  289. })
  290. return
  291. }
  292. }
  293. this.$confirm(
  294. `所有车辆完成卸车任务后,请及时修改任务状态,确定提交卸车信息?`,
  295. {
  296. cancelButtonText: '取消',
  297. confirmButtonText: '确定',
  298. type: 'warning'
  299. }
  300. )
  301. .then(() => {
  302. this.$refs.deptBudgetList.validate(valid => {
  303. if (valid) {
  304. this.tranCarInfoList = this.freightspace
  305. this.tranCarInfoList.driver = this.deptBudgetList.driver
  306. this.tranCarInfoList.driverPhone = this.deptBudgetList.driverPhone
  307. this.tranCarInfoList.carNo = this.deptBudgetList.carNo
  308. this.tranCarInfoList.loadNetWeight = this.deptBudgetList.loadNetWeight
  309. this.tranCarInfoList.tranType = this.tranType
  310. this.tranCarInfoList.loadPoundImg = this.deptBudgetList.loadPoundImg
  311. this.tranCarInfoList.unloadNetWeight = this.deptBudgetList.unloadNetWeight
  312. for (var i = 0; i < this.tranCarInfoList.length; i++) {
  313. this.tranCarInfoList[i].id = this.freightspace[i].id
  314. if (this.tranCarInfoList[i].temporaryDriverFlag != 0) {
  315. this.tranCarInfoList[i].temporaryDriverFlag = 1
  316. this.tranCarInfoList[i].tranType = this.tranType
  317. }
  318. }
  319. var tranProcessInfo = {}
  320. tranProcessInfo.id = this.deptBudgetList.id
  321. tranProcessInfo.infoId = this.deptBudgetList.infoId
  322. tranProcessInfo.tranCarInfoList = this.tranCarInfoList
  323. feedback(tranProcessInfo)
  324. .toPromise()
  325. .then(response => {
  326. this.$message.success('提交成功')
  327. this.deptBudgetList = {}
  328. this.freightspace = {}
  329. this.selectedOptions = ''
  330. this.$router.push({
  331. path: 'tranManagementReceivingFeedback'
  332. })
  333. })
  334. } else {
  335. // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  336. return false
  337. }
  338. })
  339. })
  340. .catch(() => {
  341. return false
  342. })
  343. },
  344. handleClose() {
  345. this.accessoryTFs = false
  346. },
  347. getList() {
  348. seeCat({ id: this.deptBudgetList.id })
  349. .toPromise()
  350. .then(response => {
  351. this.deptBudgetList = response
  352. this.freightspace = response.tranCarInfoList
  353. for (var i = 0; i < this.freightspace.length; i++) {
  354. if (!this.freightspace[i].loadNetWeight) {
  355. this.freightspace[i].loadNetWeight = 0
  356. }
  357. }
  358. })
  359. },
  360. carchange(val, index) {
  361. for (var i = 0; i < this.carList.length; i++) {
  362. if (this.carList[i].driverName == val) {
  363. this.deptBudgetList.tranCarInfoList[index].driverPhone = this.carList[
  364. i
  365. ].driverPhone
  366. arrange({ id: this.carList[i].id })
  367. .toPromise()
  368. .then(response => {
  369. console.log(this, response)
  370. this.deptBudgetList.tranCarInfoList[index].carNo =
  371. response.carNumber
  372. if (response.carLoad != null) {
  373. this.deptBudgetList.tranCarInfoList[index].loadWeight =
  374. response.carLoad
  375. } else {
  376. this.deptBudgetList.tranCarInfoList[index].loadWeight = 0
  377. }
  378. this.deptBudgetList.tranCarInfoList[index].carModel =
  379. response.carModel
  380. this.deptBudgetList.tranCarInfoList[index].carLength =
  381. response.carLength
  382. this.deptBudgetList.tranCarInfoList[index].carLengthKey =
  383. response.carLengthKey
  384. this.deptBudgetList.tranCarInfoList[index].carModelKey =
  385. response.carModelKey
  386. })
  387. }
  388. }
  389. }
  390. },
  391. phonechange(val, index) {
  392. for (var i = 0; i < this.carList.length; i++) {
  393. if (this.carList[i].driverPhone == val) {
  394. this.deptBudgetList.tranCarInfoList[index].driver = this.carList[
  395. i
  396. ].driver
  397. arrange({ id: this.carList[i].id })
  398. .toPromise()
  399. .then(response => {
  400. console.log(this, response)
  401. this.deptBudgetList.tranCarInfoList[index].carNo =
  402. response.carNumber
  403. if (response.carLoad != null) {
  404. this.deptBudgetList.tranCarInfoList[index].loadWeight =
  405. response.carLoad
  406. } else {
  407. this.deptBudgetList.tranCarInfoList[index].loadWeight = 0
  408. }
  409. this.deptBudgetList.tranCarInfoList[index].carModel =
  410. response.carModel
  411. this.deptBudgetList.tranCarInfoList[index].carLength =
  412. response.carLength
  413. this.deptBudgetList.tranCarInfoList[index].carLengthKey =
  414. response.carLengthKey
  415. this.deptBudgetList.tranCarInfoList[index].carModelKey =
  416. response.carModelKey
  417. })
  418. }
  419. }
  420. },
  421. selecttaskType(e) {
  422. for (var i = 0; i < this.taskTypeList.length; i++) {
  423. if (this.taskTypeList[i].value == e) {
  424. this.searchType = this.taskTypeList[i].type
  425. }
  426. }
  427. },
  428. approve() {},
  429. listQuery() {}
  430. }
  431. </script>
  432. <style lang="scss" scoped>
  433. /deep/.basicInformation {
  434. .ws-info-table {
  435. border: none;
  436. }
  437. .el-form-item {
  438. width: 33.3333%;
  439. border: none;
  440. height: 50px;
  441. .el-form-item__label {
  442. background: transparent;
  443. border: none;
  444. }
  445. .el-form-item__content {
  446. border: none;
  447. }
  448. }
  449. }
  450. .title {
  451. position: relative;
  452. padding-left: 10px;
  453. }
  454. .title::before {
  455. content: '';
  456. display: inline-block;
  457. width: 5px;
  458. height: 30px;
  459. background: #5473e8;
  460. position: absolute;
  461. left: 0;
  462. }
  463. .el-form {
  464. padding: 0 10%;
  465. }
  466. .el-button--primary {
  467. background-color: #5878e8;
  468. border-color: #5878e8;
  469. }
  470. .el-col {
  471. background: #f6f7fc;
  472. }
  473. .bg-right {
  474. text-align: right;
  475. padding: 16px 20px;
  476. }
  477. .center {
  478. width: 90%;
  479. margin: 0 auto;
  480. }
  481. //表格文字
  482. /deep/.ws-info-table .el-form-item .el-form-item__label {
  483. text-align: left;
  484. font-size: 14px;
  485. font-weight: 400;
  486. color: #8890b1;
  487. line-height: 16px;
  488. }
  489. //蓝标
  490. .small-title {
  491. position: relative;
  492. padding: 10px;
  493. font-weight: 600;
  494. }
  495. .small-title::before {
  496. position: absolute;
  497. content: '';
  498. display: block;
  499. background: #5473e8;
  500. width: 4px;
  501. height: 14px;
  502. left: 0px;
  503. top: 13px;
  504. padding: 4px 2px;
  505. }
  506. .position {
  507. position: relative;
  508. }
  509. .position .zaizhong {
  510. width: 16%;
  511. }
  512. //减号
  513. .del {
  514. position: absolute;
  515. // right: -38px;
  516. top: 9px;
  517. cursor: pointer;
  518. right: 0;
  519. display: inline-block;
  520. font-size: 20px;
  521. width: 20px;
  522. height: 10px;
  523. line-height: 0px;
  524. }
  525. .driver .el-form-item {
  526. width: 16.63%;
  527. }
  528. /deep/.ws-info-table .el-form-item .el-form-item__content {
  529. background: #f5f7fa;
  530. border-radius: 4px;
  531. color: #8890b1;
  532. font-size: 14px;
  533. }
  534. /deep/.driver .ws-info-table .el-form-item .el-form-item__label {
  535. width: 72px;
  536. }
  537. /deep/.liaison .ws-info-table .el-form-item {
  538. width: 16.66%;
  539. color: #8890b1;
  540. font-size: 14px;
  541. }
  542. /deep/.ws-info-table .el-form-item {
  543. border: none;
  544. height: 50px;
  545. }
  546. /deep/.liaison .ws-info-table .el-form-item .el-form-item__label {
  547. width: 40%;
  548. border: 0px solid #d8dce6;
  549. background: #f5f7fa;
  550. text-align: center;
  551. }
  552. /deep/.liaison {
  553. background: #f5f7fa;
  554. border-radius: 4px;
  555. border: 0px solid #d8dce6;
  556. }
  557. /deep/.liaison .ws-info-table .el-form-item .el-form-item__content {
  558. border: none;
  559. background: #f5f7fa;
  560. }
  561. .catNos {
  562. width: 100%;
  563. height: 30px;
  564. margin-top: 10px;
  565. margin-left: 20px;
  566. font-size: 14px;
  567. }
  568. /deep/.liaison .ws-info-table .el-form-item .el-form-item__content {
  569. // border: 0px solid #d8dce6;
  570. border-radius: 0px;
  571. border-left: none;
  572. border-bottom: none;
  573. border-top: none;
  574. }
  575. /deep/.liaison .ws-info-table {
  576. background: #f6f7fc;
  577. border-radius: 4px;
  578. border: 1px solid #d8dce6;
  579. margin-top: 20px;
  580. }
  581. //送达/未送达
  582. .noservice,
  583. .service {
  584. display: inline-block;
  585. border-radius: 4px;
  586. border: 1px solid #d8dce6;
  587. padding: 2px;
  588. font-size: 12px;
  589. }
  590. .noservice {
  591. background: #c4cada;
  592. color: #ffffff;
  593. }
  594. .service {
  595. background: #e5f1f7;
  596. color: #50cad4;
  597. }
  598. //添加司机
  599. .add {
  600. width: 100px;
  601. height: 34px;
  602. background: #f6f7fb;
  603. border-radius: 17px;
  604. color: #5473e8;
  605. font-size: 14px;
  606. border: none;
  607. }
  608. .add img {
  609. display: inline-block;
  610. margin-top: 3px;
  611. margin-left: -12px;
  612. }
  613. .add .spans {
  614. display: table-caption;
  615. width: 56px;
  616. height: 20px;
  617. line-height: 18px;
  618. }
  619. .container {
  620. overflow: scroll;
  621. height: 93vh;
  622. }
  623. </style>