tranManagementShippingArrangemen.vue 40 KB

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