tranManagementReceivingloading.vue 18 KB

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