tranManagementShippingArrangemen.vue 38 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480
  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. >
  15. <img
  16. width="6"
  17. height="10"
  18. style="vertical-align: bottom; margin-right: 3px"
  19. src="../../../public/img/lujing.png"
  20. alt
  21. />返回
  22. </el-button>
  23. </el-col>
  24. </el-row>
  25. <div class="center">
  26. <ws-form
  27. ref="deptBudgetList"
  28. :model="deptBudgetList"
  29. :rules="rules"
  30. class="position"
  31. >
  32. <div class="basicInformation">
  33. <div class="small-title" style="font-size: 16px">任务详情</div>
  34. <ws-info-table>
  35. <ws-form-item label="任务编号" span="1" prop="processNo">{{
  36. deptBudgetList.processNo
  37. }}</ws-form-item>
  38. <ws-form-item label="货名" span="1" prop="goodsName">{{
  39. deptBudgetList.goodsName
  40. }}</ws-form-item>
  41. <ws-form-item label="重量(吨)" span="1" prop="weight">{{
  42. deptBudgetList.weight
  43. }}</ws-form-item>
  44. <ws-form-item
  45. label="发货地址"
  46. span="1"
  47. prop="sendDetailedAddress"
  48. >{{deptBudgetList.sendPrivate}}{{deptBudgetList.sendCity}}{{deptBudgetList.sendArea}}{{ deptBudgetList.sendDetailedAddress }}</ws-form-item
  49. >
  50. <ws-form-item label="发货人" span="1" prop="sender">{{
  51. deptBudgetList.sender
  52. }}</ws-form-item>
  53. <ws-form-item label="发货人电话" span="1" prop="senderPhone">{{
  54. deptBudgetList.senderPhone
  55. }}</ws-form-item>
  56. <ws-form-item
  57. label="收货地址"
  58. span="1"
  59. prop="receiveDetailedAddress"
  60. >{{deptBudgetList.receivePrivate}}{{deptBudgetList.receiveCity}}{{deptBudgetList.receiveArea}}{{ deptBudgetList.receiveDetailedAddress }}</ws-form-item
  61. >
  62. <ws-form-item label="收货人" span="1" prop="receiver">{{
  63. deptBudgetList.receiver
  64. }}</ws-form-item>
  65. <ws-form-item label="收货人电话" span="1" prop="receiverPhone">{{
  66. deptBudgetList.receiverPhone
  67. }}</ws-form-item>
  68. <ws-form-item label="发货日期" span="1" prop="deliveryDateStart">{{
  69. deptBudgetList.deliveryDateStart
  70. }}</ws-form-item>
  71. <ws-form-item
  72. label="最晚到货日期"
  73. span="1"
  74. prop="deliveryDateEnd"
  75. >{{ deptBudgetList.deliveryDateEnd }}</ws-form-item
  76. >
  77. <ws-form-item label="合同编号" span="1" prop="contractNo">{{
  78. deptBudgetList.contractNo
  79. }}</ws-form-item>
  80. </ws-info-table>
  81. <div class="small-title" style="font-size: 16px">联络员及航次</div>
  82. <div class="myTest">
  83. <!--当前运输总价-->
  84. <el-form-item label="当前运输总价(元/吨):" span="1" prop="tranPrice" >
  85. <el-input
  86. v-model="deptBudgetList.tranPrice"
  87. maxlength="70"
  88. disabled
  89. size="small"
  90. style="width:70px"
  91. />
  92. </el-form-item>
  93. <!--审核中的运输总价-->
  94. <el-form-item label="审核中的运输总价(元/吨):" span="1" prop="tranPriceIng">
  95. <el-input
  96. v-if="deptBudgetList.priceStatus=='审核中'"
  97. :disabled="readonly"
  98. v-model="deptBudgetList.tranPriceIng"
  99. maxlength="70"
  100. size="small"
  101. style="width:70px"
  102. />
  103. <el-input
  104. v-else
  105. v-model="deptBudgetList.tranPriceIng"
  106. maxlength="70"
  107. size="small"
  108. style="width:70px"
  109. />
  110. </el-form-item>
  111. <div style="">
  112. <el-button
  113. v-if="deptBudgetList.priceStatus=='审核中'"
  114. type="primary"
  115. v-hasPermission="`tranManager.transportationInfo.ship`"
  116. size="small"
  117. @click="examine()"
  118. >审核中</el-button
  119. >
  120. <el-button
  121. v-else
  122. type="primary"
  123. size="small"
  124. @click="priceSubmit()"
  125. >提交</el-button
  126. >
  127. </div>
  128. </div>
  129. <div
  130. class="position siji"
  131. v-for="(item, index) in deptBudgetList.tranCarInfoList"
  132. :key="index"
  133. >
  134. <div class="zhong" v-show="index==0">
  135. <ws-form-item label="姓名" span="1" prop="driver">
  136. <el-select
  137. v-if="item.id != null"
  138. :disabled="readonly"
  139. v-model="item.driver"
  140. placeholder="请选择姓名"
  141. filterable
  142. clearable
  143. @change="selectstaff"
  144. size="small"
  145. >
  146. <el-option
  147. v-for="item in options"
  148. :key="item.value"
  149. :label="item.staffName"
  150. :value="item.staffName"
  151. />
  152. </el-select>
  153. <el-select
  154. v-else
  155. v-model="item.driver"
  156. placeholder="请选择姓名"
  157. filterable
  158. clearable
  159. @change="selectstaff"
  160. size="small"
  161. >
  162. <el-option
  163. v-for="item in options"
  164. :key="item.value"
  165. :label="item.staffName"
  166. :value="item.staffName"
  167. />
  168. </el-select>
  169. </ws-form-item>
  170. <ws-form-item
  171. label="电话"
  172. span="1"
  173. prop="driverPhone"
  174. class="biao"
  175. >
  176. <ws-input
  177. v-if="item.id != null"
  178. :disabled="readonly"
  179. :readonly="true"
  180. v-model="item.driverPhone"
  181. placeholder="请输入电话"
  182. maxlength="20"
  183. size="small"
  184. class="ys"
  185. />
  186. <ws-input
  187. v-else
  188. :readonly="true"
  189. v-model="item.driverPhone"
  190. placeholder="请输入电话"
  191. maxlength="20"
  192. size="small"
  193. class="ys"
  194. />
  195. </ws-form-item>
  196. <ws-form-item
  197. label="发船日期"
  198. span="1"
  199. prop="sendDateStart"
  200. class="biao2"
  201. >
  202. <ws-date-picker
  203. v-if="item.id != null"
  204. :disabled="readonly"
  205. v-model="item.sendDateStart"
  206. type="date"
  207. placeholder="请选择发船日期"
  208. value-format="yyyy-MM-dd"
  209. class="small"
  210. />
  211. <ws-date-picker
  212. v-else
  213. v-model="item.sendDateStart"
  214. type="date"
  215. placeholder="请选择发船日期"
  216. value-format="yyyy-MM-dd"
  217. class="small"
  218. />
  219. </ws-form-item>
  220. <ws-form-item
  221. label="预计到港日期"
  222. span="1"
  223. prop="receiveDateEnd"
  224. class="biao3"
  225. >
  226. <ws-date-picker
  227. v-if="item.id != null"
  228. :disabled="readonly"
  229. v-model="item.receiveDateEnd"
  230. type="date"
  231. placeholder="请选择发货日期"
  232. value-format="yyyy-MM-dd"
  233. class="small"
  234. />
  235. <ws-date-picker
  236. v-else
  237. v-model="item.receiveDateEnd"
  238. type="date"
  239. placeholder="请选择发货日期"
  240. value-format="yyyy-MM-dd"
  241. class="small"
  242. />
  243. </ws-form-item>
  244. <ws-form-item label="航次" span="1" prop="shipNo" class="biao4">
  245. <ws-input
  246. v-model="item.shipNo"
  247. placeholder="请选择航次"
  248. maxlength="100"
  249. size="small"
  250. class="ys"
  251. ></ws-input>
  252. </ws-form-item>
  253. <ws-form-item label="船名" span="1" prop="shipName" class>
  254. <ws-input
  255. v-model="item.shipName"
  256. placeholder="请输入船名"
  257. maxlength="100"
  258. size="small"
  259. class="ys"
  260. ></ws-input>
  261. </ws-form-item>
  262. <ws-form-item label="类型" span="1" prop="shipType" class="biao5">
  263. <ws-select
  264. v-model="item.shipType"
  265. placeholder="请输入"
  266. class="ys"
  267. v-if="item.id != null"
  268. :disabled="readonly"
  269. >
  270. <ws-option
  271. v-for="items in shipType"
  272. :key="items.constKey"
  273. :label="items.constValue"
  274. :value="items.constValue"
  275. />
  276. </ws-select>
  277. <ws-select
  278. v-model="item.shipType"
  279. placeholder="请输入"
  280. class="ys"
  281. v-else
  282. >
  283. <ws-option
  284. v-for="items in shipType"
  285. :key="items.constKey"
  286. :label="items.constValue"
  287. :value="items.constValue"
  288. />
  289. </ws-select>
  290. </ws-form-item>
  291. <ws-form-item
  292. label="数量"
  293. span="1"
  294. prop="boxNumber"
  295. class="biao6"
  296. v-show="item.shipType == '集装箱'"
  297. >
  298. <ws-input
  299. v-if="item.id != null"
  300. :disabled="readonly"
  301. v-model="item.boxNumber"
  302. placeholder="请输入数量"
  303. class="ys"
  304. ></ws-input>
  305. <ws-input
  306. v-else
  307. v-model="item.boxNumber"
  308. placeholder="请输入数量"
  309. class="ys"
  310. ></ws-input>
  311. </ws-form-item>
  312. <ws-form-item
  313. label="仓位号"
  314. span="1"
  315. prop="binNumber"
  316. v-show="item.shipType == '散船'"
  317. class="biao6"
  318. >
  319. <ws-input
  320. v-if="item.id != null"
  321. :disabled="readonly"
  322. v-model="item.binNumber"
  323. placeholder="请输入仓位号"
  324. maxlength="100"
  325. size="small"
  326. style="width: 110px"
  327. ></ws-input>
  328. <ws-input
  329. v-else
  330. v-model="item.binNumber"
  331. placeholder="请输入仓位号"
  332. maxlength="100"
  333. size="small"
  334. style="width: 110px"
  335. ></ws-input>
  336. </ws-form-item>
  337. <ws-form-item
  338. label="重量(吨)"
  339. span="1"
  340. prop="positionWeight"
  341. v-show="item.shipType == '散船'"
  342. class="biao7"
  343. >
  344. <ws-input
  345. v-if="item.id != null"
  346. :disabled="readonly"
  347. v-model="item.positionWeight"
  348. placeholder="请输入重量"
  349. maxlength="100"
  350. size="small"
  351. class="ys"
  352. ></ws-input>
  353. <ws-input
  354. v-else
  355. v-model="item.positionWeight"
  356. placeholder="请输入重量"
  357. maxlength="100"
  358. size="small"
  359. class="ys"
  360. ></ws-input>
  361. </ws-form-item>
  362. </div>
  363. <div class="zhong-other" v-show="index!=0">
  364. <ws-form-item
  365. label="仓位号"
  366. span="1"
  367. prop="binNumber"
  368. v-show="item.shipType == '散船'"
  369. class="item"
  370. >
  371. <ws-input
  372. v-if="item.id != null"
  373. :disabled="readonly"
  374. v-model="item.binNumber"
  375. placeholder="请输入仓位号"
  376. maxlength="100"
  377. size="small"
  378. style="width: 110px"
  379. ></ws-input>
  380. <ws-input
  381. v-else
  382. v-model="item.binNumber"
  383. placeholder="请输入仓位号"
  384. maxlength="100"
  385. size="small"
  386. style="width: 110px"
  387. ></ws-input>
  388. </ws-form-item>
  389. <ws-form-item
  390. label="重量(吨)"
  391. span="1"
  392. prop="positionWeight"
  393. v-show="item.shipType == '散船'"
  394. class="item"
  395. >
  396. <ws-input
  397. v-if="item.id != null"
  398. :disabled="readonly"
  399. v-model="item.positionWeight"
  400. placeholder="请输入重量"
  401. maxlength="100"
  402. size="small"
  403. style="width: 110px"
  404. ></ws-input>
  405. <ws-input
  406. v-else
  407. v-model="item.positionWeight"
  408. placeholder="请输入重量"
  409. maxlength="100"
  410. size="small"
  411. style="width: 110px"
  412. ></ws-input>
  413. </ws-form-item>
  414. </div>
  415. <span
  416. v-if="(item.status == '未装车'&& item.shipType == '散船') || item.status == null"
  417. width="22"
  418. height="22"
  419. class="del"
  420. @click="del(index, item)"
  421. src="../../../public/img/del.png"
  422. alt=""
  423. >×</span>
  424. </div>
  425. <div style="text-align: right; color: #8890b1; font-size: 16px; margin-right: -40%" v-show="deptBudgetList.tranCarInfoList[0].shipType == '散船'">
  426. 共{{ total }}/{{ deptBudgetList.weight }}
  427. </div>
  428. <el-button
  429. class="add bg-bottom"
  430. type="primary"
  431. size="small"
  432. @click="add"
  433. v-show="deptBudgetList.tranCarInfoList[0].shipType == '散船'"
  434. >
  435. <img width="22" height="22" src="../../../public/img/add.png" alt />
  436. <div class="spans">添加仓位</div>
  437. </el-button>
  438. </div>
  439. </ws-form>
  440. <div style="text-align: right; padding: 10px">
  441. <el-button
  442. class="bg-bottom-up"
  443. type="primary"
  444. size="small"
  445. @click="submit()"
  446. >提交</el-button
  447. >
  448. </div>
  449. </div>
  450. </div>
  451. </template>
  452. <script>
  453. import { shippingLook, packList, dispatchCat ,delhaulagestage,setUpTranPrice} from '@/model/transport/index'
  454. import { getstaff } from '@/model/warehouse/index'
  455. import Pagination from '@/components/Pagination'
  456. import WsUpload from '@/components/WsUpload'
  457. import { dayjs } from 'base-core-lib'
  458. export default {
  459. name: 'viewSpareMoney',
  460. components: {
  461. WsUpload,
  462. Pagination,
  463. },
  464. watch: {
  465. vesselId(val) {
  466. this.getList()
  467. },
  468. isShow(val) {
  469. this.showType = val
  470. },
  471. },
  472. data() {
  473. return {
  474. //弹出框
  475. dialogViewSpareMoney: false,
  476. dialogApproveFormVisible: false,
  477. // 船舶类型
  478. monetaryKey: null,
  479. // 表格显示数据
  480. tableDate: [],
  481. // 是否显示
  482. showType: true,
  483. // 年
  484. year: '',
  485. item: [],
  486. shipType: [],
  487. tranType: 3,
  488. deptBudgetTotal: 0,
  489. currentPage: 1,
  490. pageSize: 10,
  491. searchType: 1,
  492. searchKeyWord: '',
  493. contractType: 2,
  494. startDate: null,
  495. endDate: null,
  496. goodnameList: {},
  497. // 提交类型
  498. submitType: true,
  499. storageType: [],
  500. readonly: true,
  501. appendixIdsAdd: '',
  502. uploadSuccess: {},
  503. onChange: {},
  504. selectedOptions: [],
  505. options: [],
  506. tranCarInfoList: {},
  507. staffList: [],
  508. gradeList: [],
  509. rules: {
  510. netWeight: [
  511. {
  512. required: true,
  513. type: 'number',
  514. message: '请输入活动名称',
  515. trigger: 'blur',
  516. },
  517. ],
  518. },
  519. arr: [],
  520. freightspace: [
  521. // {
  522. // impurity:'',
  523. // },
  524. ],
  525. size: 10,
  526. compId: sessionStorage.getItem('ws-pf_compId'),
  527. deptCircularPage: {},
  528. packtypeList: {},
  529. date: {
  530. year: dayjs().format('YYYY'),
  531. month: dayjs().format('MM'),
  532. },
  533. contractList: [],
  534. deptBudgetList: {
  535. warehouseInOutDetail: {},
  536. },
  537. historyList: [],
  538. pickerBeginDateBefore: {
  539. disabledDate: (time) => {
  540. return time.getTime() > Date.now()
  541. },
  542. },
  543. accessoryTFs: false,
  544. }
  545. },
  546. mounted() {
  547. this.getList()
  548. },
  549. activated() {
  550. this.loaddata()
  551. this.getList()
  552. },
  553. computed: {
  554. totalStorage: function () {
  555. var maxStorage = 0
  556. for (var i = 0; i < this.freightspace.length; i++) {
  557. maxStorage += Number(this.freightspace[i].maxStorage)
  558. }
  559. return maxStorage
  560. },
  561. total: function () {
  562. if (this.deptBudgetList.tranCarInfoList.length > 0) {
  563. var maxStorage = 0
  564. for (var i = 0; i < this.deptBudgetList.tranCarInfoList.length; i++) {
  565. maxStorage += Number(
  566. this.deptBudgetList.tranCarInfoList[i].positionWeight
  567. )
  568. }
  569. return maxStorage
  570. }
  571. },
  572. },
  573. methods: {
  574. getList() {
  575. getstaff({ compId: sessionStorage.getItem('ws-pf_compId') })
  576. .toPromise()
  577. .then((response) => {
  578. this.options = response
  579. this.staffList = response
  580. })
  581. //类型
  582. packList({ constId: 'TRAN4' })
  583. .toPromise()
  584. .then((response) => {
  585. this.shipType = response
  586. })
  587. },
  588. dataFilter(val) {
  589. this.deptBudgetList.personCharge = val
  590. if (val) {
  591. console.log(val)
  592. this.options = this.staffList.filter((item) => {
  593. if (
  594. !!~item.staffName.indexOf(val) ||
  595. !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
  596. ) {
  597. return true
  598. }
  599. })
  600. } else {
  601. this.options = this.staffList
  602. }
  603. },
  604. selectstaff(e) {
  605. for (var i = 0; i < this.staffList.length; i++) {
  606. if (this.staffList[i].staffName == e) {
  607. this.deptBudgetList.driverPhone = this.staffList[i].staffMobilePhone
  608. this.deptBudgetList.tranCarInfoList[0].driverPhone =
  609. this.staffList[i].staffMobilePhone
  610. this.deptBudgetList.personChargeKey = this.staffList[i].staffId
  611. }
  612. }
  613. },
  614. loaddata() {
  615. shippingLook({ id: this.$route.query.id })
  616. .toPromise()
  617. .then((response) => {
  618. this.deptBudgetList = response
  619. if (response.tranCarInfoList.length > 0) {
  620. if(response.tranCarInfoList[0].shipType =='集装箱') {
  621. this.deptBudgetList.tranCarInfoList=[this.deptBudgetList.tranCarInfoList[0]]
  622. }
  623. // for (
  624. // var i = 0;
  625. // i < this.deptBudgetList.tranCarInfoList.length;
  626. // i++
  627. // ) {
  628. // var num = this.deptBudgetList.tranCarInfoList[
  629. // i
  630. // ].positionWeight.split(',')
  631. // for (var j = 0; j < num.length; j++) {
  632. // var num2 = num[j].split('/')
  633. // this.freightspace.push({
  634. // impurity: num2[i],
  635. // positionWeight: num2[num2.length - 1]
  636. // })
  637. // }
  638. // }
  639. } else {
  640. this.deptBudgetList.tranCarInfoList = [
  641. {
  642. driver: '',
  643. driverPhone: '',
  644. sendDateStart: '',
  645. receiveDateEnd: '',
  646. shipNo: '',
  647. shipName: '',
  648. shipType: '',
  649. boxNumber: '',
  650. positionWeight: '',
  651. binNumber: '',
  652. tranType: '3',
  653. },
  654. ]
  655. }
  656. })
  657. },
  658. //返回按钮
  659. revert() {
  660. this.freightspace = []
  661. this.$router.go(-1)
  662. },
  663. del(index, row) {
  664. if(row.status == null){
  665. if (this.deptBudgetList.tranCarInfoList.length > 1) {
  666. this.deptBudgetList.tranCarInfoList.splice(index, 1)
  667. }
  668. }else{
  669. this.$confirm('船次信息删除后不可恢复,是否确定删除?', '提示', {
  670. confirmButtonText: '确定',
  671. cancelButtonText: '取消',
  672. type: 'warning',
  673. }).then(() => {
  674. delhaulagestage({ id: row.id })
  675. .toPromise()
  676. .then((response) => {
  677. this.$message.success('删除成功')
  678. if (this.deptBudgetList.tranCarInfoList.length > 1) {
  679. this.deptBudgetList.tranCarInfoList.splice(index, 1)
  680. }
  681. })
  682. })
  683. }
  684. },
  685. add() {
  686. if(!this.deptBudgetList.tranPrice){
  687. this.$message({
  688. message: '请设置运输总价!',
  689. type: 'warning',
  690. })
  691. }
  692. else{
  693. this.deptBudgetList.tranCarInfoList.push({
  694. driver: this.deptBudgetList.tranCarInfoList[0].driver,
  695. driverPhone: this.deptBudgetList.tranCarInfoList[0].driverPhone,
  696. sendDateStart: this.deptBudgetList.tranCarInfoList[0].sendDateStart,
  697. receiveDateEnd: this.deptBudgetList.tranCarInfoList[0].receiveDateEnd,
  698. shipNo: this.deptBudgetList.tranCarInfoList[0].shipNo,
  699. shipName: this.deptBudgetList.tranCarInfoList[0].shipName,
  700. shipType: this.deptBudgetList.tranCarInfoList[0].shipType,
  701. binNumber: '',
  702. positionWeight: '',
  703. tranType: '3',
  704. })
  705. }
  706. },
  707. selectdriver() {},
  708. handleChange(value) {
  709. this.selectedOptions = value
  710. },
  711. returnsales() {
  712. this.deptBudgetList = {}
  713. this.freightspace = []
  714. this.selectedOptions = ''
  715. this.$router.push({ path: 'tranManagementShipping' })
  716. },
  717. //审核
  718. examine(){
  719. this.$prompt('运输单价审核', {
  720. cancelButtonText: '取消',
  721. confirmButtonText: '确定',
  722. }).then(({ value }) => {
  723. var tranProcessInfo = {}
  724. tranProcessInfo.reviewer = sessionStorage.getItem('ws-pf_roleName') +
  725. sessionStorage.getItem('ws-pf_staffName')
  726. tranProcessInfo.id = this.deptBudgetList.id
  727. tranProcessInfo.flag = "2"
  728. tranProcessInfo.tranPriceIng = value
  729. tranProcessInfo.tranTypeKey = 3
  730. setUpTranPrice(tranProcessInfo)
  731. .toPromise()
  732. .then((response) => {
  733. this.$message.success('审核成功')
  734. this.getList()
  735. });
  736. }).catch(() => {
  737. this.$message.warning(
  738. '取消审核'
  739. );
  740. });
  741. },
  742. priceSubmit(){
  743. this.$confirm(`运输单价将发送给决策人审核,确定提交?`, {
  744. cancelButtonText: '取消',
  745. confirmButtonText: '确定',
  746. type: 'warning',
  747. })
  748. .then(() => {
  749. var tranProcessInfo = {}
  750. tranProcessInfo.id = this.deptBudgetList.id
  751. tranProcessInfo.flag = "1"
  752. tranProcessInfo.tranPriceIng = this.deptBudgetList.tranPriceIng
  753. tranProcessInfo.tranTypeKey = 3
  754. setUpTranPrice(tranProcessInfo)
  755. .toPromise()
  756. .then((response) => {
  757. this.$message.success('提交成功')
  758. this.getList()
  759. })
  760. })
  761. .catch(() => {
  762. return false
  763. })
  764. },
  765. //提交按钮
  766. submit() {
  767. for (var i = 0; i < this.deptBudgetList.tranCarInfoList.length; i++) {
  768. if (!this.deptBudgetList.tranCarInfoList[i].driver) {
  769. this.$message({
  770. message: '名字不为空',
  771. type: 'warning',
  772. })
  773. return
  774. }
  775. if (!this.deptBudgetList.tranCarInfoList[i].driverPhone) {
  776. this.$message({
  777. message: '电话号不为空',
  778. type: 'warning',
  779. })
  780. return
  781. }
  782. if (!this.deptBudgetList.tranCarInfoList[i].sendDateStart) {
  783. this.$message({
  784. message: '发船时间不能为空',
  785. type: 'warning',
  786. })
  787. return
  788. }
  789. if (!this.deptBudgetList.tranCarInfoList[i].receiveDateEnd) {
  790. this.$message({
  791. message: '预计到港时间不能为空',
  792. type: 'warning',
  793. })
  794. return
  795. }
  796. if (!this.deptBudgetList.tranCarInfoList[i].shipName) {
  797. this.$message({
  798. message: '船名不能为空',
  799. type: 'warning',
  800. })
  801. return
  802. }
  803. if (!this.deptBudgetList.tranCarInfoList[i].shipNo) {
  804. this.$message({
  805. message: '航次不能为空',
  806. type: 'warning',
  807. })
  808. return
  809. }
  810. if (this.deptBudgetList.tranCarInfoList[i].shipType == '集装箱') {
  811. if (!this.deptBudgetList.tranCarInfoList[i].boxNumber) {
  812. this.$message({
  813. message: '数量不能为空',
  814. type: 'warning',
  815. })
  816. return
  817. }
  818. }
  819. if (!this.deptBudgetList.tranCarInfoList[i].shipType) {
  820. this.$message({
  821. message: '类型不能为空',
  822. type: 'warning',
  823. })
  824. return
  825. }
  826. // console.log(this.freightspace,"仓位号")
  827. if (this.deptBudgetList.tranCarInfoList[i].shipType == '散船') {
  828. if (!this.deptBudgetList.tranCarInfoList[i].binNumber) {
  829. this.$message({
  830. message: '仓位号不能为空',
  831. type: 'warning',
  832. })
  833. return
  834. }
  835. if (!this.deptBudgetList.tranCarInfoList[i].positionWeight) {
  836. this.$message({
  837. message: '重量不能为空',
  838. type: 'warning',
  839. })
  840. return
  841. }
  842. }
  843. if (
  844. new Date(
  845. this.deptBudgetList.tranCarInfoList[0].sendDateStart
  846. ).getTime() >
  847. new Date(
  848. this.deptBudgetList.tranCarInfoList[0].receiveDateEnd
  849. ).getTime()
  850. ) {
  851. this.$message({
  852. message: '发船时间不能大于最晚到到港时间!',
  853. type: 'warning',
  854. })
  855. return
  856. }
  857. }
  858. this.$confirm(`提交成功后,任务将下发给相关人员,是否确定提交?`, {
  859. cancelButtonText: '取消',
  860. confirmButtonText: '确定',
  861. type: 'warning',
  862. })
  863. .then(() => {
  864. this.$refs.deptBudgetList.validate((valid) => {
  865. if (valid) {
  866. this.deptBudgetList.totalStorage = this.totalStorage
  867. var tranCarInfo = {}
  868. tranCarInfo.id = this.deptBudgetList.id
  869. tranCarInfo.infoId = this.deptBudgetList.infoId
  870. tranCarInfo.tranCarInfoList = this.deptBudgetList.tranCarInfoList
  871. dispatchCat(tranCarInfo)
  872. .toPromise()
  873. .then((response) => {
  874. this.$message.success('提交成功')
  875. this.deptBudgetList = {}
  876. this.freightspace = {}
  877. this.selectedOptions = ''
  878. this.$router.go(-1)
  879. })
  880. } else {
  881. // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  882. return false
  883. }
  884. })
  885. })
  886. .catch(() => {
  887. return false
  888. })
  889. },
  890. handleClose() {
  891. this.accessoryTFs = false
  892. },
  893. handleSizeChange(val) {
  894. console.log(`每页 ${val} 条`)
  895. this.pageSize = val
  896. this.getList()
  897. },
  898. handleCurrentChange(val) {
  899. this.currentPage = val
  900. console.log(`当前页: ${val}`)
  901. this.getList()
  902. },
  903. selecttaskType(e) {
  904. for (var i = 0; i < this.taskTypeList.length; i++) {
  905. if (this.taskTypeList[i].value == e) {
  906. this.searchType = this.taskTypeList[i].type
  907. }
  908. }
  909. },
  910. // approve() {},
  911. // listQuery() {}
  912. },
  913. }
  914. </script>
  915. <style lang="scss" scoped>
  916. .position {
  917. position: relative;
  918. }
  919. .el-button--primary {
  920. background-color: #5878e8;
  921. border-color: #5878e8;
  922. }
  923. .el-col {
  924. background: #f6f7fc;
  925. }
  926. .bg-right {
  927. text-align: right;
  928. padding: 16px 20px;
  929. }
  930. .center {
  931. margin: 0 auto;
  932. }
  933. //表格文字
  934. /deep/.ws-info-table .el-form-item .el-form-item__label {
  935. text-align: left;
  936. font-size: 14px;
  937. font-weight: 400;
  938. color: #8890b1;
  939. line-height: 16px;
  940. }
  941. //蓝标
  942. .small-title {
  943. position: relative;
  944. padding: 10px;
  945. font-weight: 600;
  946. margin-left: 27px;
  947. }
  948. .position .zaizhong {
  949. width: 16%;
  950. }
  951. .bot {
  952. width: 30%;
  953. }
  954. //去边框
  955. /deep/.el-form-item {
  956. border-right: 0px;
  957. border-bottom: 0px;
  958. }
  959. /deep/.ws-info-table {
  960. border-left: 0px;
  961. border-top: 0px;
  962. }
  963. .ws-info-table .el-form-item .el-form-item__content {
  964. border-right: 0px;
  965. border-bottom: 0px;
  966. border-left: 0px;
  967. border-top: 0px;
  968. }
  969. /deep/.ws-info-table .el-form-item {
  970. border-right: 0px;
  971. border-bottom: 0px;
  972. border-left: 0px;
  973. border-top: 0px;
  974. }
  975. /deep/.ws-info-table .el-form-item .el-form-item__content {
  976. background: #f5f7fa;
  977. border-radius: 4px;
  978. font-family: PingFangSC-Regular, PingFang SC;
  979. margin-bottom: 5px;
  980. // background-color: #fff;
  981. font-size: 14px;
  982. font-weight: 400;
  983. color: #8890b1;
  984. line-height: 16px;
  985. }
  986. /deep/.ws-info-table .el-form-item .el-form-item__label {
  987. background-color: #fff;
  988. font-size: 14px;
  989. font-family: PingFangSC-Regular, PingFang SC;
  990. font-weight: 400;
  991. color: #8890b1;
  992. line-height: 16px;
  993. }
  994. //下表格样式
  995. .position.siji {
  996. background: white;
  997. border-radius: 4px;
  998. /* border: 1px solid #d8dce6; */
  999. // width: 1219px;
  1000. }
  1001. /deep/.zi {
  1002. width: 64px;
  1003. height: 22px;
  1004. font-size: 16px;
  1005. font-family: PingFangSC-Semibold, PingFang SC;
  1006. font-weight: 600;
  1007. color: #323233;
  1008. line-height: 22px;
  1009. }
  1010. //表格文字
  1011. /deep/.ws-info-table .el-form-item .el-form-item__label {
  1012. text-align: left;
  1013. font-size: 14px;
  1014. font-weight: 400;
  1015. color: #8890b1;
  1016. line-height: 16px;
  1017. }
  1018. //小标题文字
  1019. .small-title::before {
  1020. position: absolute;
  1021. content: '';
  1022. display: block;
  1023. background: #5473e8;
  1024. width: 4px;
  1025. height: 14px;
  1026. left: 0px;
  1027. top: 13px;
  1028. padding: 4px 2px;
  1029. }
  1030. /deep/.basicInformation {
  1031. .el-form-item {
  1032. // width: 25%;
  1033. .el-form-item__label {
  1034. background: transparent;
  1035. border: none;
  1036. }
  1037. .el-form-item__content {
  1038. // border: none;
  1039. }
  1040. }
  1041. }
  1042. //添加仓位样式
  1043. .add {
  1044. width: 100px;
  1045. height: 34px;
  1046. background: #f6f7fb;
  1047. border-radius: 17px;
  1048. color: #5473e8;
  1049. font-size: 14px;
  1050. border: none;
  1051. margin-top: 8px;
  1052. }
  1053. .add img {
  1054. display: inline-block;
  1055. margin-top: 3px;
  1056. margin-left: -12px;
  1057. }
  1058. .add .spans {
  1059. display: table-caption;
  1060. width: 56px;
  1061. height: 20px;
  1062. line-height: 18px;
  1063. }
  1064. /deep/.xia {
  1065. width: 715px;
  1066. height: 54px;
  1067. border-radius: 4px;
  1068. border: 1px solid #d8dce6;
  1069. margin-top: 10px;
  1070. background: #f6f7fc;
  1071. border-radius: 4px;
  1072. margin-left: 24px;
  1073. }
  1074. .basicInformation .ws-info-table {
  1075. border: none;
  1076. width: 100%;
  1077. margin: 0 auto;
  1078. }
  1079. /deep/.el-select .el-input__inner {
  1080. border: 1px solid #ccc !important;
  1081. padding: 0 15px !important;
  1082. font-size: 12px !important;
  1083. // width: 125px;
  1084. }
  1085. .zhong {
  1086. background: #f6f7fc;
  1087. border-radius: 4px;
  1088. border: 1px solid #d8dce6;
  1089. width: 100%;
  1090. }
  1091. /deep/.zhong .el-form-item{
  1092. width: 20%;
  1093. }
  1094. .bg-left {
  1095. padding-left: 30px;
  1096. }
  1097. /deep/.el-input--prefix .el-input__inner {
  1098. padding-left: 30px;
  1099. width: 150px;
  1100. }
  1101. .ys {
  1102. // margin-left: 300px;
  1103. width: 100px;
  1104. }
  1105. .biao {
  1106. margin-left: 240px;
  1107. margin-top: -57px;
  1108. }
  1109. .biao2 {
  1110. margin-left: 441px;
  1111. margin-top: -59px;
  1112. }
  1113. .biao3 {
  1114. margin-left: 722px;
  1115. margin-top: -60px;
  1116. }
  1117. .biao4 {
  1118. margin-left: 1016px;
  1119. margin-top: -60px;
  1120. }
  1121. .biao5 {
  1122. margin-left: 200px;
  1123. margin-top: -57px;
  1124. }
  1125. .biao6 {
  1126. margin-left: 450px;
  1127. margin-top: -57px;
  1128. }
  1129. .biao7 {
  1130. margin-left: 700px;
  1131. margin-top: -57px;
  1132. }
  1133. /deep/.totalStorage .el-input__inner {
  1134. color: #afb5cb;
  1135. background: #f5f7fa;
  1136. }
  1137. .small-title {
  1138. position: relative;
  1139. padding: 10px;
  1140. font-weight: 600;
  1141. }
  1142. .small-title::before {
  1143. position: absolute;
  1144. content: '';
  1145. display: block;
  1146. background: #5473e8;
  1147. width: 4px;
  1148. height: 14px;
  1149. left: 0px;
  1150. top: 13px;
  1151. }
  1152. .del {
  1153. // position: absolute;
  1154. // right: -38px;
  1155. top: 9px;
  1156. cursor: pointer;
  1157. right: 0;
  1158. display: inline-block;
  1159. font-size: 20px;
  1160. width: 16px;
  1161. height: 10px;
  1162. line-height: 0px;
  1163. margin-top: 10px;
  1164. margin-left: 17px;
  1165. }
  1166. .amap-page-container {
  1167. width: 300px;
  1168. height: 300px;
  1169. }
  1170. /deep/.ws-info-table .el-form-item {
  1171. border-right: 1px solid transparent;
  1172. border-bottom: 1px solid transparent;
  1173. width: 33.3333%;
  1174. }
  1175. .readonly {
  1176. position: relative;
  1177. }
  1178. .readonly:after {
  1179. content: '*';
  1180. color: #ff2727;
  1181. position: absolute;
  1182. right: 8px;
  1183. z-index: 10;
  1184. top: 21%;
  1185. font-size: 20px;
  1186. }
  1187. .title {
  1188. position: relative;
  1189. }
  1190. .title::before {
  1191. content: '';
  1192. display: inline-block;
  1193. width: 5px;
  1194. height: 30px;
  1195. background: #5473e8;
  1196. position: absolute;
  1197. left: 0;
  1198. }
  1199. .el-button--primary {
  1200. background-color: #5878e8;
  1201. border-color: #5878e8;
  1202. }
  1203. .el-col {
  1204. background: #f6f7fc;
  1205. }
  1206. /deep/.ws-info-table .el-form-item .el-form-item__content {
  1207. background: #f5f7fa;
  1208. border-radius: 4px;
  1209. // border: 1px solid #d8dce6;
  1210. margin-bottom: 5px;
  1211. font-size: 14px;
  1212. font-weight: 400;
  1213. color: #8890b1;
  1214. line-height: 16px;
  1215. padding: 0 25px;
  1216. // border-left: 1px solid transparent;
  1217. border: none;
  1218. }
  1219. /deep/.ws-info-table .el-form-item .el-form-item__label {
  1220. width: 100px;
  1221. text-align: center;
  1222. background: #fff;
  1223. font-size: 14px;
  1224. font-weight: 400;
  1225. color: #8890b1;
  1226. line-height: 16px;
  1227. }
  1228. .button-container {
  1229. display: flex;
  1230. flex-wrap: nowrap;
  1231. justify-content: space-between;
  1232. align-items: center;
  1233. background-color: #fff;
  1234. width: 100%;
  1235. height: 50px;
  1236. padding: 0 10px;
  1237. & > div {
  1238. margin-left: 10px;
  1239. display: flex;
  1240. flex-wrap: nowrap;
  1241. flex-direction: row;
  1242. & > span {
  1243. line-height: 50px;
  1244. }
  1245. }
  1246. /deep/.auditFlow-box {
  1247. position: unset;
  1248. margin-left: 10px;
  1249. &/deep/.auditFlow-icon {
  1250. width: auto;
  1251. padding-right: 30px;
  1252. }
  1253. &/deep/.auditFlow-main {
  1254. position: absolute;
  1255. }
  1256. }
  1257. }
  1258. .box-app {
  1259. display: inline-block;
  1260. float: left;
  1261. margin-left: 30px;
  1262. line-height: 50px;
  1263. }
  1264. /deep/.el-dialog {
  1265. .el-form-item {
  1266. margin-bottom: 0 !important;
  1267. .el-input--medium {
  1268. textarea {
  1269. min-height: 100px !important;
  1270. }
  1271. }
  1272. }
  1273. }
  1274. .collapse-bottom {
  1275. margin-bottom: 20px;
  1276. }
  1277. .input-main .textarea .el-textarea__inner {
  1278. width: 100%;
  1279. z-index: 1;
  1280. }
  1281. .bg-left {
  1282. padding-left: 30px;
  1283. }
  1284. .bg-right {
  1285. padding-right: 10px;
  1286. text-align: right;
  1287. }
  1288. // .el-form-item {
  1289. // width: 50%;
  1290. // }
  1291. .el-form-item__label {
  1292. text-align: center;
  1293. }
  1294. .hide-sel {
  1295. .el-input__inner {
  1296. border: 0px;
  1297. }
  1298. .el-icon-arrow-up {
  1299. display: none;
  1300. }
  1301. .el-textarea__inner {
  1302. background-color: #fff !important;
  1303. border: 0;
  1304. }
  1305. .el-date-editor {
  1306. i {
  1307. display: none;
  1308. }
  1309. }
  1310. .is-disabled {
  1311. .el-input__inner:hover {
  1312. background-color: #fff !important;
  1313. border: 0;
  1314. }
  1315. color: #606266;
  1316. .el-input__inner {
  1317. background-color: #fff !important;
  1318. border: 0;
  1319. color: #606266;
  1320. }
  1321. .el-textarea__inner {
  1322. background-color: #fff !important;
  1323. border: 0;
  1324. color: #606266;
  1325. }
  1326. }
  1327. }
  1328. // 控制select为只读的时候显示样式
  1329. /deep/.ws-class-table-col {
  1330. height: auto;
  1331. padding: 0px 2px;
  1332. /deep/.el-input__inner {
  1333. padding: 0px 2px;
  1334. }
  1335. }
  1336. /deep/.is-disabled {
  1337. .el-input__prefix,
  1338. .el-input__suffix {
  1339. display: none;
  1340. }
  1341. .el-input__inner {
  1342. color: #000 !important;
  1343. font-size: 14px;
  1344. cursor: text;
  1345. padding: 0 !important;
  1346. }
  1347. }
  1348. .winseaview-view {
  1349. padding: 0 0 20px;
  1350. }
  1351. .container {
  1352. overflow: scroll;
  1353. height: 93vh;
  1354. }
  1355. .readonly:after {
  1356. display: none;
  1357. }
  1358. .el-textarea__inner {
  1359. display: none;
  1360. }
  1361. .el-form {
  1362. margin-top: 50px;
  1363. padding: 0 15%;
  1364. }
  1365. .readonly {
  1366. width: 16%;
  1367. }
  1368. //去边框
  1369. /deep/.el-form-item {
  1370. border-right: 0px;
  1371. border-bottom: 0px;
  1372. }
  1373. /deep/.ws-info-table {
  1374. border-left: 0px;
  1375. border-top: 0px;
  1376. }
  1377. /deep/.flex .ws-info-table .el-form-item .el-form-item__content {
  1378. border: 0px;
  1379. }
  1380. .add {
  1381. width: 100px;
  1382. height: 34px;
  1383. background: #f6f7fb;
  1384. border-radius: 17px;
  1385. color: #5473e8;
  1386. font-size: 14px;
  1387. border: none;
  1388. margin-left: 17px;
  1389. // margin-left: -79px;
  1390. }
  1391. .add img {
  1392. display: inline-block;
  1393. margin-top: 3px;
  1394. margin-left: -12px;
  1395. }
  1396. .add .spans {
  1397. display: table-caption;
  1398. width: 56px;
  1399. height: 20px;
  1400. line-height: 18px;
  1401. }
  1402. /deep/.carnum {
  1403. display: contents;
  1404. }
  1405. /deep/.carnum .ws-info-table .el-form-item {
  1406. width: 20%;
  1407. }
  1408. // /deep/.liaison .carnum .ws-info-table .el-form-item {
  1409. // border-radius: 10px;
  1410. // right: 20px;
  1411. // }
  1412. /deep/.basicInformation .el-form-item .el-form-item__label {
  1413. background: transparent;
  1414. border: none;
  1415. font-size: 14px;
  1416. font-family: PingFangSC-Regular, PingFang SC;
  1417. font-weight: 400;
  1418. color: #8890b1;
  1419. line-height: 16px;
  1420. margin-left: 22px;
  1421. }
  1422. // /deep/.el-form-item__content .el-select {
  1423. // width: 42%;
  1424. // }
  1425. //减号
  1426. .del {
  1427. position: absolute;
  1428. // right: -38px;
  1429. top: 0px;
  1430. cursor: pointer;
  1431. right: -1%;
  1432. display: inline-block;
  1433. font-size: 20px;
  1434. width: 20px;
  1435. height: 10px;
  1436. line-height: 0px;
  1437. }
  1438. .zhong-other{
  1439. display: flex;
  1440. margin: 2%;
  1441. background: #f6f7fc;
  1442. border-radius: 4px;
  1443. border: 1px solid #d8dce6;
  1444. .item{
  1445. margin: 0;
  1446. }
  1447. }
  1448. .myTest{
  1449. width: 1000px;
  1450. display: flex;
  1451. height: 40px;
  1452. margin: 20px 0;
  1453. }
  1454. /deep/.myTest .el-form-item{
  1455. width: 30%;
  1456. }
  1457. </style>