tranManagementthirdpartnarFeedback.vue 37 KB

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