tranManagementTransportAdd.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926
  1. // 创建运输任务
  2. <template>
  3. <div class="container">
  4. <el-row>
  5. <el-col :span="12">
  6. <h2 class="bg-left title">创建运输任务</h2>
  7. </el-col>
  8. <el-col :span="12" class="bg-right">
  9. <el-button
  10. class="bg-bottom"
  11. type="primary"
  12. size="small"
  13. @click="returnsales()"
  14. ><img
  15. width="6"
  16. height="10"
  17. style="vertical-align: bottom; margin-right: 3px"
  18. src="../../../public/img/lujing.png"
  19. alt=""
  20. />返回</el-button
  21. >
  22. </el-col>
  23. </el-row>
  24. <el-form
  25. ref="deptBudgetList"
  26. :rules="mainReportAdd"
  27. :model="deptBudgetList"
  28. >
  29. <ws-info-table class="el-table">
  30. <el-form-item label="任务编号" span="1" prop="taskNo" class="forlist">
  31. <el-input
  32. v-model="deptBudgetList.taskNo"
  33. placeholder="请输入任务编号"
  34. maxlength="20"
  35. size="small"
  36. ></el-input>
  37. </el-form-item>
  38. <el-form-item prop="taskType" label="任务类型" span="1">
  39. <el-select
  40. v-model="deptBudgetList.taskType"
  41. placeholder="请输入任务类型"
  42. @change="selecttaskType"
  43. >
  44. <el-option
  45. v-for="item in taskType"
  46. :key="item.constKey"
  47. :label="item.constValue"
  48. :value="item.constValue"
  49. ></el-option>
  50. </el-select>
  51. </el-form-item>
  52. <el-form-item prop="contractNo" label="合同编号/移库任务编号" span="1">
  53. <el-select
  54. v-model="deptBudgetList.contractNo"
  55. placeholder="请选择编号"
  56. >
  57. <el-option
  58. v-for="item in contractNoList"
  59. :key="item.constKey"
  60. :label="item.contractNo"
  61. :value="item.contractNo"
  62. ></el-option>
  63. </el-select>
  64. </el-form-item>
  65. <el-form-item prop="goodsName" label="货名" span="1">
  66. <el-select
  67. v-model="deptBudgetList.goodsName"
  68. placeholder="请输入货名"
  69. @change="selectgoodsname"
  70. >
  71. <el-option
  72. v-for="item in goodnameList"
  73. :key="item.constKey"
  74. :label="item.constValue"
  75. :value="item.constValue"
  76. ></el-option>
  77. </el-select>
  78. </el-form-item>
  79. <el-form-item label="重量(吨)" span="1" prop="weight">
  80. <el-input
  81. @input='weightchange'
  82. v-model="deptBudgetList.weight"
  83. placeholder="请输入重量"
  84. maxlength="20"
  85. size="small"
  86. ></el-input>
  87. </el-form-item>
  88. </ws-info-table>
  89. <ws-info-table class="el-table">
  90. <div class="start-address" style="width : 36%">
  91. <el-radio-group @change='warehouseTypechange' v-model="deptBudgetList.warehouseType">
  92. <el-radio label="1"
  93. >常用仓库发货</el-radio
  94. >
  95. <el-radio label="2"
  96. >临时仓库发货</el-radio
  97. >
  98. </el-radio-group>
  99. <el-select
  100. @change='sendWarehousechange'
  101. v-model="deptBudgetList.sendWarehouse"
  102. placeholder="选择仓库"
  103. class="typeselect"
  104. >
  105. <el-option
  106. v-for="item in warehouseList"
  107. :key="item.constKey"
  108. :label="item.warehouseName"
  109. :value="item.warehouseName"
  110. ></el-option>
  111. </el-select>
  112. </div>
  113. <el-form-item label="始发地" span="1" class="start-address">
  114. <el-cascader
  115. :options="options_"
  116. v-model="selectedOptions"
  117. clearable
  118. size="large"
  119. placeholder="请选择始发地"
  120. @change="handleChange"
  121. />
  122. </el-form-item>
  123. <el-form-item
  124. label="始发地详细地址"
  125. span="1"
  126. prop="startDetailedAddress"
  127. class="bg-right start-address"
  128. >
  129. <el-input
  130. v-model="deptBudgetList.startDetailedAddress"
  131. placeholder="请输入始发地详细地址"
  132. maxlength="20"
  133. size="small"
  134. ></el-input>
  135. </el-form-item>
  136. <el-form-item
  137. label="收货库点"
  138. span="1"
  139. prop="contractNo"
  140. class="start-address"
  141. style="width: 36%"
  142. >
  143. <el-select
  144. v-model="deptBudgetList.receiveWarehouse"
  145. :disabled="warehouse"
  146. placeholder="请输入收货库点"
  147. style="width: 100%"
  148. >
  149. <el-option
  150. v-for="item in warehouseList"
  151. :key="item.constKey"
  152. :label="item.warehouseName"
  153. :value="item.warehouseName"
  154. ></el-option>
  155. </el-select>
  156. </el-form-item>
  157. <el-form-item
  158. label="终到地"
  159. span="1"
  160. prop="contractNo"
  161. class="start-address"
  162. >
  163. <el-cascader
  164. :options="options_"
  165. v-model="selectedOptions1"
  166. clearable
  167. size="large"
  168. placeholder="请选择终到地"
  169. @change="handleChange1"
  170. />
  171. </el-form-item>
  172. <el-form-item
  173. label="终到地详细地址"
  174. span="1"
  175. prop="endDetailedAddress"
  176. class="bg-right start-address"
  177. >
  178. <el-input
  179. v-model="deptBudgetList.endDetailedAddress"
  180. placeholder="请输入终到地详细地址"
  181. maxlength="20"
  182. size="small"
  183. ></el-input>
  184. </el-form-item>
  185. <div class="check-box">
  186. <span class="check-box">运输方式</span>
  187. <el-checkbox-group v-model="checkList" prop="tranType">
  188. <el-checkbox label="汽运"></el-checkbox>
  189. <el-checkbox label="火运"></el-checkbox>
  190. <el-checkbox label="船运"></el-checkbox>
  191. </el-checkbox-group>
  192. </div>
  193. </ws-info-table>
  194. <div
  195. style="width: 100%"
  196. class="position"
  197. v-for="(item, index) in deptBudgetList.tranProcessInfoList"
  198. :key="index"
  199. >
  200. <div class="driver">
  201. <span style='vertical-align: top;'>运输阶段{{ index + 1 }} {{ item.processNo }}</span>
  202. <img v-if='!endflag'
  203. width="22"
  204. height="22"
  205. class="add"
  206. @click="add(index)"
  207. src="../../../public/img/add.png"
  208. alt=""
  209. />
  210. <img
  211. width="22"
  212. height="22"
  213. class="del"
  214. @click="del(index)"
  215. src="../../../public/img/del.png"
  216. alt=""
  217. />
  218. <el-checkbox
  219. @change='engflagchange'
  220. class='endflag'
  221. v-if="index == deptBudgetList.tranProcessInfoList.length - 1"
  222. v-model="item.endFlag"
  223. :label="1"
  224. >最终阶段</el-checkbox
  225. >
  226. </div>
  227. <ws-info-table>
  228. <el-form-item label="运输方式" span="1" prop="waterContent">
  229. <el-select
  230. v-model="item.tranType"
  231. placeholder="运输方式"
  232. @change="
  233. (val) => {
  234. selecttaskwayList(val, index)
  235. }
  236. "
  237. >
  238. <el-option
  239. v-for="item in taskwayList"
  240. :key="item.constKey"
  241. :label="item.constValue"
  242. :value="item.constValue"
  243. ></el-option>
  244. </el-select>
  245. </el-form-item>
  246. <el-form-item label="发货日期" span="1" prop="impurity">
  247. <ws-date-picker
  248. v-model="item.deliveryDateStart"
  249. type="date"
  250. placeholder="请选择发货日期"
  251. value-format="yyyy-MM-dd"
  252. />
  253. </el-form-item>
  254. <el-form-item label="最晚到货日期" span="1" prop="bulkDensity">
  255. <ws-date-picker
  256. v-model="item.deliveryDateEnd"
  257. type="date"
  258. placeholder="请选择最晚到货日期"
  259. value-format="yyyy-MM-dd"
  260. />
  261. </el-form-item>
  262. <!-- 本阶段重量 -->
  263. <el-form-item
  264. label="本阶段运输重量(吨)"
  265. span="1"
  266. prop="bulkDensity"
  267. >
  268. <el-input
  269. v-model="deptBudgetList.weight"
  270. placeholder="请输入本阶段运输重量"
  271. size="small"
  272. ></el-input>
  273. </el-form-item>
  274. </ws-info-table>
  275. <ws-info-table>
  276. <el-form-item label="发货地区" span="1" prop="waterContent">
  277. <el-cascader
  278. :options="options_"
  279. v-model="item.selectedOptions"
  280. clearable
  281. size="large"
  282. placeholder="请选择发货地区"
  283. style="width: 200%"
  284. @change="
  285. (val) => {
  286. handleChange3(val, index)
  287. }
  288. "
  289. />
  290. </el-form-item>
  291. <el-form-item label="发货地详细地址" span="1" prop="impurity">
  292. <el-input
  293. v-model="item.sendDetailedAddress"
  294. placeholder="请输入发货地详细地址"
  295. maxlength="20"
  296. size="small"
  297. ></el-input>
  298. </el-form-item>
  299. <el-form-item label="发货人" span="1" prop="bulkDensity">
  300. <el-input
  301. v-model="item.sender"
  302. placeholder="请输入发货人"
  303. maxlength="20"
  304. size="small"
  305. ></el-input>
  306. </el-form-item>
  307. <el-form-item label="发货人电话" span="1" prop="bulkDensity">
  308. <el-input
  309. v-model="item.senderPhone"
  310. placeholder="请输入发货人电话"
  311. maxlength="20"
  312. size="small"
  313. ></el-input>
  314. </el-form-item>
  315. </ws-info-table>
  316. <ws-info-table>
  317. <el-form-item label="收货地区" span="1" prop="bulkDensity">
  318. <el-cascader
  319. :options="options_"
  320. v-model="item.selectedOptions1"
  321. clearable
  322. size="large"
  323. placeholder="请选择收货地区"
  324. style="width: 200%"
  325. @change="
  326. (val) => {
  327. handleChange4(val, index)
  328. }
  329. "
  330. />
  331. </el-form-item>
  332. <el-form-item label="收货地详细地址" span="1" prop="impurity">
  333. <el-input
  334. v-model="item.receiveDetailedAddress"
  335. placeholder="请输入收货地详细地址"
  336. maxlength="20"
  337. size="small"
  338. ></el-input>
  339. </el-form-item>
  340. <el-form-item label="收货人" span="1" prop="bulkDensity">
  341. <el-input
  342. v-model="item.receiver"
  343. placeholder="请输入收货人"
  344. maxlength="20"
  345. size="small"
  346. ></el-input>
  347. </el-form-item>
  348. <el-form-item label="收货人电话" span="1" prop="bulkDensity">
  349. <el-input
  350. v-model="item.receiverPhone"
  351. placeholder="请输入收货人电话"
  352. maxlength="20"
  353. size="small"
  354. ></el-input>
  355. </el-form-item>
  356. </ws-info-table>
  357. </div>
  358. </el-form>
  359. <!-- 提交 -->
  360. <div style="text-align: right; padding: 10px" class="center">
  361. <el-button
  362. class="bg-bottom"
  363. type="primary"
  364. size="small"
  365. @click="submit(deptBudgetList)"
  366. >提交</el-button
  367. >
  368. </div>
  369. </div>
  370. </template>
  371. <script>
  372. import { packList } from '@/model/contarct/index'
  373. import { regionData, CodeToText, TextToCode } from 'element-china-area-data'
  374. import { addtrantask, getwarehousename, xialaNo } from '@/model/tasksport/index'
  375. import WsUpload from '@/components/WsUpload'
  376. import mapDrag from '@/components/mapdrag/mapdrag'
  377. export default {
  378. name: 'viewSpareMoney',
  379. components: {
  380. WsUpload,
  381. mapDrag,
  382. },
  383. watch: {
  384. vesselId(val) {
  385. this.getVesselData()
  386. },
  387. isShow(val) {
  388. this.showType = val
  389. },
  390. },
  391. data() {
  392. let self = this
  393. return {
  394. checkList: [],
  395. deptBudgetList: {
  396. taskNo: '',
  397. totalStorage: 0,
  398. goodsName: '玉米',
  399. goodsNameKey: 1,
  400. warehouseType: '1',
  401. tranProcessInfoList: [
  402. {
  403. processNo: '',
  404. tranType: '汽运',
  405. tranTypeKey: '1',
  406. deliveryDateStart: '',
  407. deliveryDateEnd: '',
  408. weight: '',
  409. selectedOptions: [],
  410. selectedOptions1: [],
  411. sendPrivate: '',
  412. sendCity: '',
  413. sendArea: '',
  414. receivePrivate: '',
  415. receiveCity: '',
  416. receiveArea: '',
  417. sendDetailedAddress: '',
  418. receiveDetailedAddress: '',
  419. sender: '',
  420. receiver: '',
  421. senderPhone: '',
  422. receiverPhone: '',
  423. endFlag: '0',
  424. },
  425. ],
  426. },
  427. radio: '1',
  428. options_: regionData,
  429. heightData: '600px',
  430. zoom: 7,
  431. endflag:false,
  432. selectedOptions: [],
  433. selectedOptions1: [],
  434. window: '',
  435. district: null,
  436. goodnameList: [],
  437. listDate: { country: '中国', level: 'country', city: '' },
  438. citylist: [],
  439. taskType: [],
  440. taskwayList: [],
  441. contractNoList: [],
  442. compId: sessionStorage.getItem('ws-pf_compId'),
  443. mainReportAdd: {},
  444. appendixIdsAdd: '',
  445. warehouseList: [],
  446. size: 10,
  447. value1: '',
  448. unitList: [],
  449. name: '',
  450. age: '',
  451. }
  452. },
  453. activated() {
  454. this.loaddata()
  455. this.showType = this.isShow
  456. },
  457. computed: {
  458. weight:function(){
  459. var maxStorage = 0
  460. for(var i =0 ; i<this.deptBudgetList.tranProcessInfoList.length;i++){
  461. maxStorage += Number(this.deptBudgetList.tranProcessInfoList[i].weight)
  462. }
  463. return maxStorage
  464. },
  465. warehouse: function () {
  466. if (
  467. this.deptBudgetList.taskType == '销售出库' ||
  468. this.deptBudgetList.taskType == '贸易服务出库' ||
  469. this.deptBudgetList.taskType == '暂存出库'
  470. ) {
  471. return true
  472. } else {
  473. return false
  474. }
  475. },
  476. },
  477. methods: {
  478. sendWarehousechange(e){
  479. for (let i = 0; i < this.warehouseList.length; i++) {
  480. if(this.warehouseList[i].warehouseName==e){
  481. var tmp=[]
  482. tmp[0]=TextToCode[this.warehouseList[i].warehousePrivate].code
  483. tmp[1]=TextToCode[this.warehouseList[i].warehousePrivate][this.warehouseList[i].warehouseCity].code
  484. tmp[2]=TextToCode[this.warehouseList[i].warehousePrivate][this.warehouseList[i].warehouseCity][this.warehouseList[i].warehouseArea].code
  485. this.selectedOptions=tmp
  486. this.deptBudgetList.tranProcessInfoList[0].selectedOptions=tmp
  487. this.deptBudgetList.startDetailedAddress=this.warehouseList[i].detailedAddress
  488. }
  489. }
  490. },
  491. warehouseTypechange(){
  492. getwarehousename({
  493. compId: this.compId,
  494. warehouseType: this.deptBudgetList.warehouseType,
  495. })
  496. .toPromise()
  497. .then((response) => {
  498. this.warehouseList = response
  499. })
  500. },
  501. weightchange(e){
  502. this.deptBudgetList.tranProcessInfoList[0].weight=e
  503. },
  504. engflagchange(e){
  505. this.endflag=e
  506. },
  507. // 获取当前年月日
  508. getdate() {
  509. var date = new Date()
  510. var year = date.getFullYear() //获取完整的年份(4位)
  511. var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
  512. var datetime = date.getDate() //获取当前日(1-31)
  513. if (mouth < 10) {
  514. mouth = '0' + mouth
  515. }
  516. if (datetime < 10) {
  517. datetime = '0' + datetime
  518. }
  519. return year + mouth + datetime
  520. },
  521. // 随机验证码
  522. verifyinit() {
  523. var arr = []
  524. for (var i = 48; i < 123; i++) {
  525. if (i > 57 && i < 65) continue
  526. if (i > 90 && i < 97) continue
  527. arr.push(String.fromCharCode(i))
  528. }
  529. arr.sort(function () {
  530. return Math.random() - 0.5
  531. })
  532. arr.length = 4
  533. return arr.join('')
  534. },
  535. loaddata() {
  536. this.deptBudgetList.taskNo = 'YS' + this.getdate() + this.verifyinit()
  537. this.deptBudgetList.tranProcessInfoList[0].processNo=this.deptBudgetList.taskNo+'-1'
  538. // 货名
  539. packList({ constId: 'CON2' })
  540. .toPromise()
  541. .then((response) => {
  542. this.goodnameList = response
  543. })
  544. // 任务类型
  545. packList({ constId: 'TRAN3' })
  546. .toPromise()
  547. .then((response) => {
  548. this.taskType = response
  549. })
  550. // 运输方式
  551. packList({ constId: 'TRAN6' })
  552. .toPromise()
  553. .then((response) => {
  554. this.taskwayList = response
  555. })
  556. getwarehousename({
  557. compId: this.compId,
  558. warehouseType: this.deptBudgetList.warehouseType,
  559. })
  560. .toPromise()
  561. .then((response) => {
  562. this.warehouseList = response
  563. })
  564. xialaNo({
  565. compId: this.compId,
  566. })
  567. .toPromise()
  568. .then((response) => {
  569. this.contractNoList = response
  570. })
  571. },
  572. confirmPositioncity() {
  573. this.listDate.level = 'city'
  574. this.listDate.country = this.name
  575. },
  576. // 关闭 dialog时 处理文件url 初始化upload组件
  577. handleClose() {
  578. this.dialogViewSpareMoney = false
  579. },
  580. add(index) {
  581. console.log(index)
  582. this.deptBudgetList.tranProcessInfoList.push({
  583. processNo: this.deptBudgetList.taskNo+'-'+(index+2),
  584. tranType: '汽运',
  585. tranTypeKey: '1',
  586. deliveryDateStart: '',
  587. deliveryDateEnd: '',
  588. weight: this.deptBudgetList.tranProcessInfoList[this.deptBudgetList.tranProcessInfoList.length-1].weight,
  589. selectedOptions: [],
  590. selectedOptions1: [],
  591. sendPrivate: '',
  592. sendCity: '',
  593. sendArea: '',
  594. receivePrivate: '',
  595. receiveCity: '',
  596. receiveArea: '',
  597. sendDetailedAddress: '',
  598. receiveDetailedAddress: '',
  599. sender: '',
  600. receiver: '',
  601. senderPhone: '',
  602. receiverPhone: '',
  603. endFlag: '0',
  604. })
  605. },
  606. del(index) {
  607. if (this.deptBudgetList.tranProcessInfoList.length > 1) {
  608. this.deptBudgetList.tranProcessInfoList.splice(index, 1)
  609. }
  610. },
  611. handleChange(value) {
  612. this.selectedOptions = value
  613. this.deptBudgetList.startPrivate = CodeToText[value[0]]
  614. this.deptBudgetList.startCity = CodeToText[value[1]]
  615. this.deptBudgetList.startArea = CodeToText[value[2]]
  616. },
  617. handleChange1(value) {
  618. this.selectedOptions1 = value
  619. this.deptBudgetList.endPrivate = CodeToText[value[0]]
  620. this.deptBudgetList.endCity = CodeToText[value[1]]
  621. this.deptBudgetList.endArea = CodeToText[value[2]]
  622. },
  623. handleChange3(value, index) {
  624. this.deptBudgetList.tranProcessInfoList[index].sendPrivate =
  625. CodeToText[value[0]]
  626. this.deptBudgetList.tranProcessInfoList[index].sendCity =
  627. CodeToText[value[1]]
  628. this.deptBudgetList.tranProcessInfoList[index].sendArea =
  629. CodeToText[value[2]]
  630. },
  631. handleChange4(value, index) {
  632. this.deptBudgetList.tranProcessInfoList[index].receivePrivate =
  633. CodeToText[value[0]]
  634. this.deptBudgetList.tranProcessInfoList[index].receiveCity =
  635. CodeToText[value[1]]
  636. this.deptBudgetList.tranProcessInfoList[index].receiveArea =
  637. CodeToText[value[2]]
  638. },
  639. returnsales() {
  640. this.$router.push({ path: 'tranManagementTransport' })
  641. this.deptBudgetList = {
  642. taskNo: '',
  643. totalStorage: 0,
  644. goodsName: '玉米',
  645. goodsNameKey: 1,
  646. warehouseType: '1',
  647. tranProcessInfoList: [
  648. {
  649. processNo: '',
  650. tranType: '汽运',
  651. deliveryDateStart: '',
  652. deliveryDateEnd: '',
  653. weight: '',
  654. selectedOptions: [],
  655. selectedOptions1: [],
  656. sendPrivate: '',
  657. sendCity: '',
  658. sendArea: '',
  659. receivePrivate: '',
  660. receiveCity: '',
  661. receiveArea: '',
  662. sendDetailedAddress: '',
  663. receiveDetailedAddress: '',
  664. sender: '',
  665. receiver: '',
  666. senderPhone: '',
  667. receiverPhone: '',
  668. },
  669. ],
  670. }
  671. },
  672. selecttaskType(e) {
  673. for (var i = 0; i < this.taskType.length; i++) {
  674. if (this.taskType[i].constValue == e) {
  675. this.deptBudgetList.taskTypeKey = this.taskType[i].constKey
  676. }
  677. }
  678. },
  679. selecttaskwayList(e, index) {
  680. for (var i = 0; i < this.taskwayList.length; i++) {
  681. if (this.taskwayList[i].constValue == e) {
  682. this.deptBudgetList.tranProcessInfoList[index].tranTypeKey =
  683. this.taskwayList[i].constKey
  684. }
  685. }
  686. },
  687. selectgoodsname(e) {
  688. for (var i = 0; i < this.goodnameList.length; i++) {
  689. if (this.goodnameList[i].constValue == e) {
  690. this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
  691. }
  692. }
  693. },
  694. onChange(files) {
  695. this.fileNum = files
  696. this.$refs.upload.handleSaveBill().then((res) => {
  697. console.log(files)
  698. })
  699. },
  700. submit() {
  701. this.$refs.deptBudgetList.validate((valid) => {
  702. if (valid) {
  703. for (
  704. var i = 0;
  705. i < this.deptBudgetList.tranProcessInfoList.length;
  706. i++
  707. ) {
  708. this.deptBudgetList.tranProcessInfoList[i].processNo =
  709. this.deptBudgetList.taskNo + (i + 1)
  710. }
  711. this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
  712. this.deptBudgetList.tranType = this.checkList.toString()
  713. addtrantask(this.deptBudgetList)
  714. .toPromise()
  715. .then((response) => {
  716. this.$message.success('添加成功')
  717. this.deptBudgetList = {
  718. taskNo: '',
  719. totalStorage: 0,
  720. goodsName: '玉米',
  721. goodsNameKey: 1,
  722. warehouseType: '1',
  723. tranProcessInfoList: [
  724. {
  725. processNo: '',
  726. tranType: '汽运',
  727. deliveryDateStart: '',
  728. deliveryDateEnd: '',
  729. weight: '',
  730. selectedOptions: [],
  731. selectedOptions1: [],
  732. sendPrivate: '',
  733. sendCity: '',
  734. sendArea: '',
  735. receivePrivate: '',
  736. receiveCity: '',
  737. receiveArea: '',
  738. sendDetailedAddress: '',
  739. receiveDetailedAddress: '',
  740. sender: '',
  741. receiver: '',
  742. senderPhone: '',
  743. receiverPhone: '',
  744. },
  745. ],
  746. }
  747. this.$router.push({ path: 'tranManagementTransport' })
  748. })
  749. } else {
  750. EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  751. return false
  752. }
  753. })
  754. },
  755. resetForm(deptBudgetList) {
  756. this.$refs[deptBudgetList].resetFields()
  757. },
  758. },
  759. }
  760. </script>
  761. <style lang="scss" scoped>
  762. .position {
  763. position: relative;
  764. border: 1px solid #5473e8;
  765. border-radius: 4px;
  766. margin-top: 20px;
  767. background: #f6f7fc;
  768. border-left: 5px solid #5473e8;
  769. }
  770. /deep/.position .ws-info-table .el-form-item {
  771. width: 25%;
  772. height: 50px;
  773. }
  774. /deep/.position .el-select {
  775. width: 100%;
  776. }
  777. /deep/.position .ws-info-table .el-form-item .el-form-item__label,
  778. /deep/.position .ws-info-table .el-form-item .el-form-item__content {
  779. background: #f6f7fc;
  780. font-size: 14px;
  781. color: #8890b1;
  782. }
  783. .typeselect{
  784. width:42%;
  785. margin-left:32px;
  786. }
  787. .del,
  788. .add {
  789. cursor: pointer;
  790. margin-left: 10px;
  791. }
  792. .el-checkbox-group {
  793. font-size: 0;
  794. float: right;
  795. margin-left: 25px;
  796. }
  797. .check-box {
  798. float: left;
  799. font-size: 14px;
  800. color: #8890B1;
  801. }
  802. .el-checkbox__label{
  803. color: #8890B1;
  804. }
  805. .el-form {
  806. padding: 0 10%;
  807. }
  808. .ws-info-table {
  809. border: none;
  810. }
  811. /deep/.ws-info-table .el-form-item {
  812. border-right: 1px solid #cdd2dc;
  813. border-bottom: 1px solid #cdd2dc;
  814. }
  815. .readonly {
  816. position: relative;
  817. }
  818. .title {
  819. position: relative;
  820. }
  821. .title::before {
  822. content: '';
  823. display: inline-block;
  824. width: 5px;
  825. height: 30px;
  826. background: #5473e8;
  827. position: absolute;
  828. left: 0;
  829. }
  830. //去边框
  831. /deep/.el-form-item {
  832. border-right: 0px;
  833. border-bottom: 0px;
  834. }
  835. .el-form {
  836. margin-top: 50px;
  837. }
  838. .endflag{
  839. vertical-align: top;
  840. }
  841. .el-col {
  842. background: #f6f7fc;
  843. }
  844. .bg-left {
  845. padding-left: 30px;
  846. }
  847. .bg-right {
  848. padding-right: 10px;
  849. text-align: right;
  850. }
  851. .bg-bottom {
  852. margin: 15px 0px;
  853. }
  854. .el-radio,
  855. .el-radio__input {
  856. margin-top: 11px;
  857. margin-left: 11px;
  858. width: 93px;
  859. }
  860. .driver {
  861. margin-top: 10px;
  862. font-weight: bold;
  863. margin-left: 20px;
  864. color: #5473E8;
  865. font-size: 16px;
  866. }
  867. /deep/.nei {
  868. .ws-info-table {
  869. border: none;
  870. }
  871. .el-form-item {
  872. width: 33.3333%;
  873. border: none;
  874. .el-form-item__label {
  875. background: transparent;
  876. border: none;
  877. }
  878. .el-form-item__content {
  879. border: none;
  880. }
  881. }
  882. }
  883. /deep/.el-table--border:after, /deep/.el-table--group:after, /deep/.el-table:before {
  884. background:transparent;
  885. }
  886. //输入框标题
  887. /deep/.ws-info-table .el-form-item .el-form-item__label {
  888. background: #ffffff;
  889. width: min-content;
  890. font-size: 14px;
  891. color: #8890b1;
  892. }
  893. //表单子项
  894. /deep/.ws-info-table .el-form-item {
  895. width: 20%;
  896. border: none;
  897. height: 50px;
  898. }
  899. //输入框
  900. /deep/.ws-info-table .el-form-item .el-form-item__content {
  901. border: none;
  902. font-size: 14px;
  903. color: #8890b1;
  904. }
  905. /deep/ .el-input--small .el-input__inner {
  906. font-size: 14px;
  907. color: #8890b1;
  908. }
  909. .el-form-item.start-address.el-form-item--small {
  910. width: 31.9%;
  911. }
  912. .el-cascader {
  913. width: 100%;
  914. }
  915. .el-form{
  916. height: 73vh;
  917. overflow: scroll;
  918. }
  919. </style>