tranManagementShippingArrangemen.vue 41 KB

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