otherfeedback.vue 29 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033
  1. <template>
  2. <view class="wrap">
  3. <view>
  4. <view style='margin-left:10px;'>任务详情</view>
  5. <view class="content">
  6. <view class="row">
  7. <view class="left">合同编号</view>
  8. <view>{{detailData.contractNo}}</view>
  9. </view>
  10. <view class="row">
  11. <view class="left">货名</view>
  12. <view>{{detailData.goodsName}}</view>
  13. </view>
  14. <view class="row">
  15. <view class="left">重量</view>
  16. <view>{{detailData.weight}}</view>
  17. </view>
  18. <view class="row">
  19. <view class="left">发货地址</view>
  20. <view>{{detailData.sendPrivate}}{{detailData.sendCity}}{{detailData.sendArea}}</view>
  21. </view>
  22. <view class="row">
  23. <view class="left">收货地址</view>
  24. <view>{{detailData.receivePrivate}}{{detailData.receiveCity}}{{detailData.receiveArea}}</view>
  25. </view>
  26. </view>
  27. <!-- 汽运 -->
  28. <view class="flex title_css">
  29. <view class="head_css">汽运反馈({{sendCarList? sendCarList : 0}})<image :src="carurl" class="open_css" @click="openCar">
  30. </image>
  31. </view>
  32. <view class="add_css">
  33. <view @click='add(1)' class="add" v-if="status == '执行中'">添加</view>
  34. </view>
  35. </view>
  36. <view class="content" v-for="(v_item,index1) in sendCar">
  37. <!-- 派车编号 -->
  38. <view class="c-row">
  39. <view class="title">派车编号</view>
  40. <view class="con-list">
  41. <input v-model='v_item.tranCarNo' placeholder="请输入派车编号" disabled="" name="input"></input>
  42. </view>
  43. </view>
  44. <!-- 车牌号 -->
  45. <view class="c-row">
  46. <view class="title">车牌号</view>
  47. <view class="con-list">
  48. <input v-model='v_item.carNo' placeholder="请输入车牌号" name="input"></input>
  49. </view>
  50. </view>
  51. <!-- 箱号 -->
  52. <view class="c-row">
  53. <view class="title">箱号-1</view>
  54. <view class="con-list">
  55. <input v-model='v_item.caseNo' placeholder="请输入箱号" name="input" maxlength="20" type="digit"></input>
  56. </view>
  57. </view>
  58. <view class="c-row">
  59. <view class="title">箱号-2</view>
  60. <view class="con-list">
  61. <input v-model='v_item.caseNoOther' placeholder="请输入箱号" name="input" maxlength="20" type="digit"></input>
  62. </view>
  63. </view>
  64. <!-- 封号 -->
  65. <view class="c-row">
  66. <view class="title">封号-1</view>
  67. <view class="con-list">
  68. <input v-model='v_item.titleNo' placeholder="请输入封号" name="input" maxlength="20" type="digit"></input>
  69. </view>
  70. </view>
  71. <view class="c-row">
  72. <view class="title">封号-2</view>
  73. <view class="con-list">
  74. <input v-model='v_item.titleNoOther' placeholder="请输入封号" name="input" maxlength="20" type="digit"></input>
  75. </view>
  76. </view>
  77. <!-- 装车净重 -->
  78. <view class="c-row">
  79. <view class="title">装车净重(吨)</view>
  80. <view class="con-list">
  81. <input v-model='v_item.loadNetWeight' placeholder="请输入净重" name="input" type="digit"></input>
  82. </view>
  83. </view>
  84. <!-- 装车日期 -->
  85. <view class="c-row">
  86. <view class="title">装车日期</view>
  87. <view @click='show=true' class="con-list">{{v_item.loadingDate?v_item.loadingDate:"请选择装车日期"}}</view>
  88. <u-picker v-model="show" mode="time" class="con-list" @confirm='dateChange($event,index1)' :params="params">
  89. </u-picker>
  90. </view>
  91. <view class="flex">
  92. <view class="butKey">
  93. <view class="del btn" @click='del(1,index1)'>删除</view>
  94. <view class="pass btn" @click='pass(1,index1)'>保存</view>
  95. </view>
  96. </view>
  97. </view>
  98. <view class="content" v-if="carShow" v-for="(item,index) in detailData.tranCarInfoList1">
  99. <!-- 派车编号 -->
  100. <view class="c-row">
  101. <view class="title">派车编号</view>
  102. <view class="con-list">
  103. <input v-model='item.tranCarNo' placeholder="暂无" disabled name="input"></input>
  104. </view>
  105. </view>
  106. <!-- 车牌号 -->
  107. <view class="c-row">
  108. <view class="title">车牌号</view>
  109. <view class="con-list">
  110. <input v-model='item.carNo' placeholder="暂无" disabled name="input"></input>
  111. </view>
  112. </view>
  113. <!-- 箱号 -->
  114. <view class="c-row">
  115. <view class="title">箱号-1</view>
  116. <view class="con-list">
  117. <input v-model='item.caseNo' placeholder="暂无" disabled name="input"></input>
  118. </view>
  119. </view>
  120. <view class="c-row">
  121. <view class="title">箱号-2</view>
  122. <view class="con-list">
  123. <input v-model='item.caseNoOther' placeholder="暂无" name="input"></input>
  124. </view>
  125. </view>
  126. <!-- 封号 -->
  127. <view class="c-row">
  128. <view class="title">封号-1</view>
  129. <view class="con-list">
  130. <input v-model='item.titleNo' placeholder="暂无" disabled name="input"></input>
  131. </view>
  132. </view>
  133. <view class="c-row">
  134. <view class="title">封号-2</view>
  135. <view class="con-list">
  136. <input v-model='item.titleNoOther' placeholder="暂无" disabled name="input"></input>
  137. </view>
  138. </view>
  139. <!-- 装车净重 -->
  140. <view class="c-row">
  141. <view class="title">装车净重(吨)</view>
  142. <view class="con-list">
  143. <input v-model='item.loadNetWeight' placeholder="暂无" disabled name="input"></input>
  144. </view>
  145. </view>
  146. <!-- 装车日期 -->
  147. <view class="c-row">
  148. <view class="title">装车日期</view>
  149. <view class="con-list">
  150. <input v-model='item.loadingDate' placeholder="暂无" disabled name="input"></input>
  151. </view>
  152. </view>
  153. </view>
  154. <!-- 以上汽运 -->
  155. <!-- 火运反馈 -->
  156. <view class="flex title_css">
  157. <view class="head_css">火运反馈({{trainCarList ? trainCarList : 0}})<image :src="trainCarurl" class="open_css"
  158. @click="trainCar"></image>
  159. </view>
  160. <view class="add_css">
  161. <view @click='add(2)' class="add" v-if="status == '执行中'">添加</view>
  162. </view>
  163. </view>
  164. <view class="content" v-for="(item_add1,index) in huoYun">
  165. <!-- 车号 -->
  166. <view class="c-row">
  167. <view class="title">车号</view>
  168. <view class="con-list">
  169. <input v-model='item_add1.carNo' placeholder="请输入车号" name="input"></input>
  170. </view>
  171. </view>
  172. <!-- 车厢号 -->
  173. <view class="c-row">
  174. <view class="title">车厢号-1</view>
  175. <view class="con-list">
  176. <input v-model='item_add1.boxNo1' placeholder="请输入车厢号" name="input" maxlength="20" type="digit"></input>
  177. </view>
  178. </view>
  179. <view class="c-row">
  180. <view class="title">车厢号-2</view>
  181. <view class="con-list">
  182. <input v-model='item_add1.boxNo2' placeholder="请输入车厢号" name="input" maxlength="20" type="digit"></input>
  183. </view>
  184. </view>
  185. <!-- 装车净重 -->
  186. <view class="c-row">
  187. <view class="title">装车净重(吨)</view>
  188. <view class="con-list">
  189. <input v-model='item_add1.loadNetWeight' placeholder="请输入净重" name="input" type="digit"></input>
  190. </view>
  191. </view>
  192. <!-- 装车日期 -->
  193. <view class="c-row">
  194. <view class="title">装车日期</view>
  195. <view @click='show1=true' class="con-list">{{item_add1.loadingDate?item_add1.loadingDate:"请选择装车日期"}}
  196. </view>
  197. <u-picker v-model="show1" mode="time" @confirm='dateChange1($event,index)' :params="params">
  198. </u-picker>
  199. </view>
  200. <view class="flex">
  201. <view class="butKey">
  202. <view class="del btn" @click='del(2,index)'>删除</view>
  203. <view class="pass btn" @click='pass(2,index)'>保存</view>
  204. </view>
  205. </view>
  206. </view>
  207. <view class="content" v-if="trainCarShow" v-for="(item1,index) in detailData.tranCarInfoList2">
  208. <!-- 车号 -->
  209. <view class="c-row">
  210. <view class="title">车号</view>
  211. <view class="con-list">
  212. <input v-model='item1.carNo' placeholder="暂无" disabled name="input"></input>
  213. </view>
  214. </view>
  215. <!-- 车厢号 -->
  216. <view class="c-row">
  217. <view class="title">车厢号-1</view>
  218. <view class="con-list">
  219. <input v-model='item1.boxNo1' placeholder="暂无" disabled name="input"></input>
  220. </view>
  221. </view>
  222. <view class="c-row">
  223. <view class="title">车厢号-2</view>
  224. <view class="con-list">
  225. <input v-model='item1.boxNo2' placeholder="暂无" disabled name="input"></input>
  226. </view>
  227. </view>
  228. <!-- 装车净重 -->
  229. <view class="c-row">
  230. <view class="title">装车净重(吨)</view>
  231. <view class="con-list">
  232. <input v-model='item1.loadNetWeight' placeholder="暂无" disabled name="input"></input>
  233. </view>
  234. </view>
  235. <!-- 装车日期 -->
  236. <view class="c-row">
  237. <view class="title">装车日期</view>
  238. <view class="con-list">
  239. <input v-model='item1.loadingDate' placeholder="暂无" disabled name="input"></input>
  240. </view>
  241. </view>
  242. </view>
  243. <!-- 以上火运反馈 -->
  244. <!-- 散船反馈 -->
  245. <view class="flex title_css">
  246. <view class="head_css">散船反馈({{shipList ? shipList : 0 }})<image :src="shipurl" class="open_css" @click="shipping">
  247. </image>
  248. </view>
  249. <view class="add_css">
  250. <view @click='add(3)' class="add" v-if="status == '执行中'">添加</view>
  251. </view>
  252. </view>
  253. <view class="content" v-for="(item_add3,index) in looseShip">
  254. <!-- 船名 -->
  255. <view class="c-row">
  256. <view class="title">船名</view>
  257. <view class="con-list">
  258. <input v-model='item_add3.shipName' placeholder="请输入船名" name="input" maxlength="20"></input>
  259. </view>
  260. </view>
  261. <view class="c-row">
  262. <view class="title">航次</view>
  263. <view class="con-list">
  264. <input v-model='item_add3.shipNo' placeholder="请输入航次" name="input" maxlength="20"></input>
  265. </view>
  266. </view>
  267. <!-- 装船日期 -->
  268. <view class="c-row">
  269. <view class="title">装船净重(吨)</view>
  270. <view class="con-list">
  271. <input v-model='item_add3.loadNetWeight' placeholder="请输入装船净重" name="input" type="digit"></input>
  272. </view>
  273. </view>
  274. <!-- 装船日期 -->
  275. <view class="c-row">
  276. <view class="title">装船日期</view>
  277. <view @click='show2=true' class="con-list">{{item_add3.loadingDate?item_add3.loadingDate:"请选择装船日期"}}
  278. </view>
  279. <u-picker v-model="show2" mode="time" @confirm='dateChange2($event,index)' :params="params">
  280. </u-picker>
  281. </view>
  282. <view class="flex">
  283. <view class="butKey">
  284. <view class="del btn" @click='del(3,index)'>删除</view>
  285. <view class="pass btn" @click='pass(3,index)'>保存</view>
  286. </view>
  287. </view>
  288. </view>
  289. <view class="content" v-if="shipShow" v-for="(item2,index) in detailData.tranCarInfoList3">
  290. <!-- 船名 -->
  291. <view class="c-row">
  292. <view class="title">船名</view>
  293. <view class="con-list">
  294. <input v-model='item2.shipName' placeholder="暂无" disabled name="input"></input>
  295. </view>
  296. </view>
  297. <view class="c-row">
  298. <view class="title">航次</view>
  299. <view class="con-list">
  300. <input v-model='item2.shipNo' placeholder="暂无" disabled name="input"></input>
  301. </view>
  302. </view>
  303. <!-- 装船日期 -->
  304. <view class="c-row">
  305. <view class="title">装船净重(吨)</view>
  306. <view class="con-list">
  307. <input v-model='item2.loadNetWeight' placeholder="暂无" disabled name="input"></input>
  308. </view>
  309. </view>
  310. <!-- 装船日期 -->
  311. <view class="c-row">
  312. <view class="title">装船日期</view>
  313. <view class="con-list">
  314. <input v-model='item2.loadingDate' placeholder="暂无" disabled name="input"></input>
  315. </view>
  316. </view>
  317. </view>
  318. <!-- 以上散船反馈 -->
  319. <!-- 集装箱船反馈 -->
  320. <view class="flex title_css">
  321. <view class="head_css">集装箱船反馈({{containerList ? containerList : 0}})<image :src="containerUrl" class="open_css"
  322. @click="containerchange"></image>
  323. </view>
  324. <view class="add_css">
  325. <view @click='add(4)' class="add" v-if="status == '执行中'">添加</view>
  326. </view>
  327. </view>
  328. <view class="content" v-for="(item_add4,index) in container">
  329. <!-- 箱号 -->
  330. <view class="c-row">
  331. <view class="title">箱号</view>
  332. <view class="con-list">
  333. <input v-model='item_add4.caseNo' placeholder="请输入箱号" name="input" maxlength="20" type="digit"></input>
  334. </view>
  335. </view>
  336. <view class="c-row">
  337. <view class="title">封号</view>
  338. <view class="con-list">
  339. <input v-model='item_add4.titleNo' placeholder="请输入封号" name="input" maxlength="20" type="digit"></input>
  340. </view>
  341. </view>
  342. <!-- 装船日期 -->
  343. <view class="c-row">
  344. <view class="title">装船净重(吨)</view>
  345. <view class="con-list">
  346. <input v-model='item_add4.loadNetWeight' placeholder="请输入装船净重" name="input" type="digit"></input>
  347. </view>
  348. </view>
  349. <!-- 装船日期 -->
  350. <view class="c-row">
  351. <view class="title">装船日期</view>
  352. <view @click='show2=true' class="con-list">{{item_add4.loadingDate?item_add4.loadingDate:"请选择装船日期"}}
  353. </view>
  354. <u-picker v-model="show2" mode="time" @confirm='dateChange3($event,index)' :params="params">
  355. </u-picker>
  356. </view>
  357. <view class="flex">
  358. <view class="butKey">
  359. <view class="del btn" @click='del(4,index)'>删除</view>
  360. <view class="pass btn" @click='pass(4,index)'>保存</view>
  361. </view>
  362. </view>
  363. </view>
  364. <view class="content" v-if="containerShow" v-for="(item3,index) in detailData.tranCarInfoList4">
  365. <!-- 箱号 -->
  366. <view class="c-row">
  367. <view class="title">箱号</view>
  368. <view class="con-list">
  369. <input v-model='item3.caseNo' placeholder="暂无" disabled name="input"></input>
  370. </view>
  371. </view>
  372. <view class="c-row">
  373. <view class="title">封号</view>
  374. <view class="con-list">
  375. <input v-model='item3.titleNo' placeholder="暂无" disabled name="input"></input>
  376. </view>
  377. </view>
  378. <!-- 装船日期 -->
  379. <view class="c-row">
  380. <view class="title">装船净重(吨)</view>
  381. <view class="con-list">
  382. <input v-model='item3.loadNetWeight' placeholder="暂无" disabled name="input"></input>
  383. </view>
  384. </view>
  385. <!-- 装船日期 -->
  386. <view class="c-row">
  387. <view class="title">装船日期</view>
  388. <view class="con-list">
  389. <input v-model='item3.loadingDate' placeholder="暂无" disabled name="input"></input>
  390. </view>
  391. </view>
  392. </view>
  393. </view>
  394. <view style='padding:10px;' class='flex bottom-btn'>
  395. <!-- <u-button @click='pass' type="error" class="btn1" hover-class='none'>提交</u-button> -->
  396. <u-button @click='finishedgoods' type="success" class="btn2" :disabled="status != '执行中'">完货</u-button>
  397. </view>
  398. </view>
  399. </template>
  400. <script>
  401. import upload from '@/components/upload.vue';
  402. import helper from '@/common/helper.js';
  403. export default {
  404. components: {
  405. upload
  406. },
  407. data() {
  408. return {
  409. id: '',
  410. status:"",
  411. currentPage: 1,
  412. pageSize: 10,
  413. maxSize: 50 * 1024 * 1024,
  414. status: '执行中',
  415. params: {
  416. year: true,
  417. month: true,
  418. day: true,
  419. },
  420. action: this.$uploadUrl, //磅单上传地址
  421. detailData: {},
  422. show: false,
  423. show1: false,
  424. show2: false,
  425. val: "", //假
  426. carShow: false,
  427. carurl: "../../../static/img/authentication/up2.png",
  428. trainCarShow: false,
  429. trainCarurl: "../../../static/img/authentication/up2.png",
  430. shipShow: false,
  431. shipurl: "../../../static/img/authentication/up2.png",
  432. containerUrl: "../../../static/img/authentication/up2.png",
  433. containerShow: false,
  434. infoId: "",
  435. sendCar: [], //汽运
  436. huoYun: [], //火运
  437. looseShip: [], //散船
  438. container: [], //集裝箱船
  439. sendCarList: "",
  440. trainCarList: "",
  441. shipList: "",
  442. containerList: "",
  443. count: 0,
  444. }
  445. },
  446. onLoad(options) {
  447. this.id = options.id
  448. this.status = options.status
  449. },
  450. onShow() {
  451. this.getList()
  452. },
  453. computed: {},
  454. methods: {
  455. qiehuan(){
  456. this.show = !this.show
  457. },
  458. //汽运展开显示
  459. openCar() {
  460. this.carShow = !this.carShow
  461. if (this.carShow) {
  462. this.carurl = "../../../static/img/authentication/down2@2x.png"
  463. } else {
  464. this.carurl = "../../../static/img/authentication/up2.png"
  465. }
  466. },
  467. // 火运展开显示
  468. trainCar() {
  469. this.trainCarShow = !this.trainCarShow
  470. if (this.trainCarShow) {
  471. this.trainCarurl = "../../../static/img/authentication/down2@2x.png"
  472. } else {
  473. this.trainCarurl = "../../../static/img/authentication/up2.png"
  474. }
  475. },
  476. //船运展开显示
  477. shipping() {
  478. this.shipShow = !this.shipShow
  479. if (this.shipShow) {
  480. this.shipurl = "../../../static/img/authentication/down2@2x.png"
  481. } else {
  482. this.shipurl = "../../../static/img/authentication/up2.png"
  483. }
  484. },
  485. //集装箱船展开显示
  486. containerchange() {
  487. this.containerShow = !this.containerShow
  488. if (this.containerShow) {
  489. this.containerUrl = "../../../static/img/authentication/down2@2x.png"
  490. } else {
  491. this.containerUrl = "../../../static/img/authentication/up2.png"
  492. }
  493. },
  494. dateChange(e, num) {
  495. this.sendCar[num].loadingDate = e.year + "-" + e.month + "-" + e.day
  496. },
  497. dateChange1(e, num) {
  498. this.huoYun[num].loadingDate = e.year + "-" + e.month + "-" + e.day
  499. },
  500. dateChange2(e, num) {
  501. this.looseShip[num].loadingDate = e.year + "-" + e.month + "-" + e.day
  502. },
  503. dateChange3(e, num) {
  504. this.container[num].loadingDate = e.year + "-" + e.month + "-" + e.day
  505. },
  506. //完货
  507. finishedgoods() {
  508. var that = this
  509. uni.showModal({
  510. content: "完货操作后,装车信息不可修改,是否确定完货?",
  511. success(res) {
  512. if (res.confirm) {
  513. let complete = {}
  514. complete.id = that.id
  515. that.$api.doRequest('post', '/tranProcessInfo/api/editFeedbackStatus', complete).then(
  516. res => {
  517. console.log(res)
  518. if (res.data.code == 200) {
  519. that.sendCar.splice(index, 1)
  520. that.$api.msg("提交成功")
  521. setTimeout(() => {
  522. uni.navigateBack()
  523. }, 1000)
  524. } else {
  525. that.$api.msg(res.data.message)
  526. }
  527. })
  528. }
  529. }
  530. })
  531. },
  532. //添加
  533. add(index) {
  534. if (index == 1) {
  535. var tranNos = ""
  536. if (Number(this.count) < 10) {
  537. tranNos = "C00" + Number(this.count + 1)
  538. } else if (Number(this.count) < 100) {
  539. tranNos = "C0" + Number(this.count + 1)
  540. } else if (Number(this.count) < 1000) {
  541. tranNos = "C" + Number(this.count + 1)
  542. }
  543. this.sendCar.push({
  544. tranCarNo: tranNos,
  545. carNo: "",
  546. caseNo: "",
  547. caseNoOther: "",
  548. titleNo: "",
  549. titleNoOther: "",
  550. loadNetWeight: "",
  551. loadingDate: "",
  552. })
  553. this.count++
  554. } else if (index == 2) {
  555. this.huoYun.push({
  556. carNo: "",
  557. boxNo1: "",
  558. boxNo2: "",
  559. loadNetWeight: "",
  560. loadingDate: "",
  561. })
  562. } else if (index == 3) {
  563. this.looseShip.push({
  564. shipName: "",
  565. shipNo: "",
  566. loadNetWeight: "",
  567. loadingDate: "",
  568. })
  569. } else if (index == 4) {
  570. this.container.push({
  571. caseNo: "",
  572. titleNo: "",
  573. loadNetWeight: "",
  574. loadingDate: "",
  575. })
  576. }
  577. },
  578. // 删除
  579. del(num, index) {
  580. var that = this
  581. uni.showModal({
  582. content: "确定删除反馈信息?",
  583. success(res) {
  584. if (res.confirm) {
  585. if (num == 1) {
  586. that.sendCar.splice(index, 1)
  587. if (that.sendCarList) {
  588. that.count = Number(that.sendCarList)
  589. } else {
  590. that.count = 0
  591. }
  592. for (var i = 0; i < that.sendCar.length; i++) {
  593. if (that.count < 10) {
  594. that.sendCar[i].tranCarNo = "C00" + (that.count+1)
  595. } else if (that.count < 100) {
  596. that.sendCar[i].tranCarNo = "C0" + that.count
  597. } else if (that.count < 1000) {
  598. that.sendCar[i].tranCarNo = "C" + that.count
  599. }
  600. that.count++
  601. }
  602. } else if (num == 2) {
  603. that.huoYun.splice(index, 1)
  604. } else if (num == 3) {
  605. that.loadingDate.splice(index, 1)
  606. } else if (num == 4) {
  607. that.container.splice(index, 1)
  608. }
  609. }
  610. }
  611. })
  612. },
  613. //保存
  614. pass(num, index) {
  615. var that = this
  616. let _pro = {}
  617. _pro.id = that.id
  618. _pro.infoId = that.detailData.infoId
  619. _pro.contractNo = that.detailData.contractNo
  620. if (num == 1) {
  621. if(!that.sendCar[index].carNo){
  622. that.$api.msg("车牌号不能为空!")
  623. return
  624. }
  625. if(that.sendCar[index].carNo.length != 7){
  626. that.$api.msg("车牌号输入有误!")
  627. return
  628. }
  629. if(!that.sendCar[index].loadNetWeight){
  630. that.$api.msg("装车净重不能为空!")
  631. return
  632. }
  633. if(that.sendCar[index].loadNetWeight > 200 || that.sendCar[index].loadNetWeight < 0){
  634. that.$api.msg("装车净重不能超过200吨!")
  635. return
  636. }
  637. if(!that.sendCar[index].loadingDate){
  638. that.$api.msg("装车日期不能为空!")
  639. return
  640. }
  641. uni.showModal({
  642. content: "确定保存反馈信息?",
  643. success(res) {
  644. if (res.confirm) {
  645. _pro.tranCarInfoList1 = [that.sendCar[index]]
  646. _pro.threeTranType = "汽运"
  647. that.$api.doRequest('post', '/tranProcessInfo/api/addTranCar', _pro).then(res => {
  648. if (res.data.code == 200) {
  649. that.sendCar.splice(index, 1)
  650. that.$api.msg("保存成功")
  651. that.getList()
  652. } else {
  653. that.$api.msg(res.data.message)
  654. }
  655. })
  656. }
  657. }
  658. })
  659. } else if (num == 2) {
  660. if(!that.huoYun[index].carNo){
  661. that.$api.msg("车号不能为空!")
  662. return
  663. }
  664. if(!that.huoYun[index].boxNo1){
  665. that.$api.msg("车厢号不能为空!")
  666. return
  667. }
  668. if(!that.huoYun[index].boxNo2){
  669. that.$api.msg("车厢号不能为空!")
  670. return
  671. }
  672. if(!that.huoYun[index].loadNetWeight){
  673. that.$api.msg("装车净重不能为空!")
  674. return
  675. }
  676. if(that.huoYun[index].loadNetWeight > 200){
  677. that.$api.msg("装车净重不能超过200吨!")
  678. return
  679. }
  680. if(!that.huoYun[index].loadingDate){
  681. that.$api.msg("装车日期不能为空!")
  682. return
  683. }
  684. uni.showModal({
  685. content: "确定保存反馈信息?",
  686. success(res) {
  687. if (res.confirm) {
  688. that.huoYun[index].boxNo = "" + that.huoYun[index].boxNo1 + "," + that.huoYun[index].boxNo2
  689. _pro.tranCarInfoList2 = [that.huoYun[index]]
  690. _pro.threeTranType = "火运"
  691. that.$api.doRequest('post', '/tranProcessInfo/api/addTranCar', _pro).then(res => {
  692. if (res.data.code == 200) {
  693. that.huoYun.splice(index, 1)
  694. that.$api.msg("保存成功")
  695. that.getList()
  696. } else {
  697. that.$api.msg(res.data.message)
  698. }
  699. })
  700. }
  701. }
  702. })
  703. } else if (num == 3) {
  704. if(!that.looseShip[index].shipName){
  705. that.$api.msg("船名不能为空!")
  706. return
  707. }
  708. if(!that.looseShip[index].shipNo){
  709. that.$api.msg("船次不能为空!")
  710. return
  711. }
  712. if(!that.looseShip[index].loadNetWeight || that.looseShip[index].loadNetWeight == 0 ){
  713. that.$api.msg("装船净重不能为空!")
  714. return
  715. }
  716. if(that.looseShip[index].loadNetWeight > 50000 ){
  717. that.$api.msg("装船净重不能超过50000吨!")
  718. return
  719. }
  720. if(!that.looseShip[index].loadingDate){
  721. that.$api.msg("装船日期不能为空!")
  722. return
  723. }
  724. uni.showModal({
  725. content: "确定保存反馈信息?",
  726. success(res) {
  727. if (res.confirm) {
  728. _pro.tranCarInfoList3 = [that.looseShip[index]]
  729. _pro.threeTranType = "散船"
  730. that.$api.doRequest('post', '/tranProcessInfo/api/addTranCar', _pro).then(res => {
  731. if (res.data.code == 200) {
  732. that.looseShip.splice(index, 1)
  733. that.$api.msg("保存成功")
  734. that.getList()
  735. } else {
  736. that.$api.msg(res.data.message)
  737. }
  738. })
  739. }
  740. }
  741. })
  742. } else if (num == 4) {
  743. if(!that.container[index].caseNo){
  744. that.$api.msg("箱号不能为空!")
  745. return
  746. }
  747. if(!that.container[index].titleNo){
  748. that.$api.msg("封号不能为空!")
  749. return
  750. }
  751. if(!that.container[index].loadNetWeight || that.container[index].loadNetWeight == 0){
  752. that.$api.msg("装船净重不能为空!")
  753. return
  754. }
  755. if(that.container[index].loadNetWeight > 100 ){
  756. that.$api.msg("装船净重不能超过100吨!")
  757. return
  758. }
  759. if(!that.container[index].loadingDate){
  760. that.$api.msg("装船日期不能为空!")
  761. return
  762. }
  763. uni.showModal({
  764. content: "确定保存反馈信息?",
  765. success(res) {
  766. if (res.confirm) {
  767. _pro.tranCarInfoList4 = [that.container[index]]
  768. _pro.threeTranType = "集装箱船"
  769. that.$api.doRequest('post', '/tranProcessInfo/api/addTranCar', _pro).then(res => {
  770. if (res.data.code == 200) {
  771. that.container.splice(index, 1)
  772. that.$api.msg("保存成功")
  773. that.getList()
  774. } else {
  775. that.$api.msg(res.data.message)
  776. }
  777. })
  778. }
  779. }
  780. })
  781. }
  782. },
  783. getList() {
  784. this.$api.doRequest('get', '/tranProcessInfo/getThreeTranProcess', {
  785. id: this.id
  786. }).then(res => {
  787. if (res.data.code == 200) {
  788. this.detailData = res.data.data
  789. if(this.detailData.tranCarInfoList1){
  790. this.sendCarList = this.detailData.tranCarInfoList1.length
  791. this.count = this.detailData.tranCarInfoList1.length
  792. }
  793. if(this.detailData.tranCarInfoList2){
  794. this.trainCarList = this.detailData.tranCarInfoList2.length
  795. for(var i = 0 ; i < this.detailData.tranCarInfoList2.length; i++){
  796. this.detailData.tranCarInfoList2[i].boxNo1=this.detailData.tranCarInfoList2[i].boxNo.split(",")[0]
  797. this.detailData.tranCarInfoList2[i].boxNo2=this.detailData.tranCarInfoList2[i].boxNo.split(",")[1]
  798. }
  799. }
  800. if(this.detailData.tranCarInfoList3){this.shipList = this.detailData.tranCarInfoList3.length}
  801. if(this.detailData.tranCarInfoList4){this.containerList = this.detailData.tranCarInfoList4.length}
  802. }
  803. })
  804. },
  805. filterFileType(index, lists) {
  806. if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
  807. lists.splice(index, 1);
  808. // 当前文件不支持
  809. uni.showModal({
  810. title: '暂不支持当前图片类型',
  811. showCancel: false
  812. });
  813. } else {
  814. this.isAdd = false;
  815. }
  816. },
  817. }
  818. }
  819. </script>
  820. <style scoped lang="scss">
  821. uni-page-body {
  822. overflow: hidden;
  823. }
  824. .content {
  825. margin: 10px 0;
  826. }
  827. .wrap {
  828. margin: 10rpx;
  829. padding: 20rpx 20rpx 300rpx 20rpx;
  830. .top {
  831. display: flex;
  832. margin-bottom: 20rpx;
  833. .top-left {
  834. margin-right: 20rpx;
  835. }
  836. }
  837. }
  838. .bottom-btn {
  839. width: 100%;
  840. position: fixed;
  841. bottom: 0;
  842. display: flex;
  843. z-index: 2;
  844. left: 0;
  845. background-color: #f8f8f8;
  846. flex-direction: column;
  847. .btn1,
  848. .btn2 {
  849. width: 100%;
  850. margin-bottom: 26rpx;
  851. border-radius: 90rpx;
  852. }
  853. .btn1 {
  854. background: white;
  855. color: #00C265;
  856. }
  857. }
  858. .content,
  859. .content1,
  860. .content2 {
  861. border-radius: 20rpx;
  862. background: white;
  863. padding: 20rpx;
  864. .title {
  865. font-size: 28rpx;
  866. // font-weight: 600;
  867. color: #333333;
  868. }
  869. .row {
  870. display: flex;
  871. justify-content: space-between;
  872. // border-bottom: 1px solid #EEEEEE;
  873. padding: 20rpx 0;
  874. .right,
  875. input {
  876. font-size: 28rpx;
  877. color: #333333;
  878. }
  879. }
  880. .row-bottom {
  881. // border: 0;
  882. .right-bottom {
  883. width: 280rpx;
  884. text-align: right;
  885. }
  886. }
  887. }
  888. .content1 {
  889. margin-top: 20rpx;
  890. }
  891. .content2 {
  892. margin-top: 10px;
  893. // display: flex;
  894. align-items: center;
  895. .left {
  896. margin-right: 20px;
  897. }
  898. }
  899. .edit-btn {
  900. background: #22C572;
  901. width: 100rpx;
  902. height: 50rpx;
  903. margin: 0;
  904. color: white;
  905. }
  906. .has-btn {
  907. align-items: center;
  908. }
  909. .shade {
  910. background: #000;
  911. position: fixed;
  912. top: 0;
  913. left: 0;
  914. width: 100%;
  915. height: 100%;
  916. z-index: 10000;
  917. }
  918. .pound_list {
  919. width: 452rpx;
  920. display: flex;
  921. justify-content: flex-end;
  922. text-align: right;
  923. }
  924. .c-row {
  925. display: -webkit-box;
  926. display: -webkit-flex;
  927. display: flex;
  928. -webkit-box-align: center;
  929. -webkit-align-items: center;
  930. align-items: center;
  931. padding: 10rpx;
  932. position: relative;
  933. }
  934. .con-list {
  935. -webkit-box-flex: 1;
  936. -webkit-flex: 1;
  937. flex: 1;
  938. display: -webkit-box;
  939. display: -webkit-flex;
  940. display: flex;
  941. -webkit-box-orient: vertical;
  942. -webkit-box-direction: normal;
  943. -webkit-flex-direction: column;
  944. flex-direction: column;
  945. color: #303133;
  946. line-height: 40rpx;
  947. text-align: right;
  948. padding-right: 20rpx;
  949. }
  950. .add_css {
  951. width: 50%;
  952. display: flex;
  953. justify-content: flex-end;
  954. .add {
  955. padding: 10rpx 40rpx;
  956. background-color: #5ac725;
  957. border-radius: 40rpx;
  958. color: #FFFFFF;
  959. line-height: 46rpx;
  960. }
  961. }
  962. .butKey {
  963. display: flex;
  964. margin: 0 auto;
  965. .del {
  966. background-color: #ff0808;
  967. }
  968. .btn {
  969. padding: 10rpx 60rpx;
  970. border-radius: 40rpx;
  971. color: #FFFFFF;
  972. line-height: 46rpx;
  973. margin: 0 20rpx;
  974. }
  975. .pass {
  976. background-color: #5ac725;
  977. }
  978. }
  979. .open_css {
  980. width: 36rpx;
  981. height: 20rpx;
  982. // top: 4rpx;
  983. }
  984. .title_css {
  985. margin-bottom: 20rpx;
  986. .head_css {
  987. margin-left: 20rpx;
  988. width: 50%;
  989. line-height: 40rpx;
  990. margin-bottom: 30rpx;
  991. }
  992. }
  993. </style>