tranManagementReceivingloading.vue 19 KB

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