otherfeedback.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664
  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"></image>
  30. </view>
  31. </view>
  32. <view class="content" v-if="carShow" v-for="(item,index) in detailData.tranCarInfoList1">
  33. <!-- 车牌号 -->
  34. <view class="c-row">
  35. <view class="title">车牌号</view>
  36. <view class="con-list">
  37. <input v-model='item.carNo' placeholder="暂无" disabled name="input"></input>
  38. </view>
  39. </view>
  40. <!-- 箱号 -->
  41. <view class="c-row">
  42. <view class="title">箱号-1</view>
  43. <view class="con-list">
  44. <input v-model='item.caseNo' placeholder="暂无" disabled name="input"></input>
  45. </view>
  46. </view>
  47. <view class="c-row">
  48. <view class="title">箱号-2</view>
  49. <view class="con-list">
  50. <input v-model='item.caseNoOther' placeholder="暂无" name="input"></input>
  51. </view>
  52. </view>
  53. <!-- 封号 -->
  54. <view class="c-row">
  55. <view class="title">封号-1</view>
  56. <view class="con-list">
  57. <input v-model='item.titleNo' placeholder="暂无" disabled name="input"></input>
  58. </view>
  59. </view>
  60. <view class="c-row">
  61. <view class="title">封号-2</view>
  62. <view class="con-list">
  63. <input v-model='item.titleNoOther' placeholder="暂无" disabled name="input"></input>
  64. </view>
  65. </view>
  66. <!-- 装车净重 -->
  67. <view class="c-row">
  68. <view class="title">装车净重(吨)</view>
  69. <view class="con-list">
  70. <input v-model='item.loadNetWeight' placeholder="暂无" disabled name="input"></input>
  71. </view>
  72. </view>
  73. <!-- 卸车日期 -->
  74. <view class="c-row">
  75. <view class="title">卸车净重(吨)</view>
  76. <view class="con-list">
  77. <input v-model='item.unloadNetWeight' placeholder="请输入卸车净重" :disabled="item.status == '已送达'" name="input" type="digit"></input>
  78. </view>
  79. </view>
  80. <view class="flex">
  81. <!-- <u-button @click='pass(1,index)' type="success" v-if="item.status != '已送达'" hover-class='none'>保存</u-button> -->
  82. <view class="btn" @click='pass(1,index)' v-if="item.status != '已送达'">保存</view>
  83. </view>
  84. </view>
  85. <!-- 以上汽运 -->
  86. <!-- 火运反馈 -->
  87. <view class="flex title_css">
  88. <view class="head_css">火运反馈({{trainCarList?trainCarList:0}})<image :src="trainCarurl" class="open_css"
  89. @click="trainCar"></image>
  90. </view>
  91. </view>
  92. <view class="content" v-if="trainCarShow" v-for="(item,index) in detailData.tranCarInfoList2">
  93. <!-- 车号 -->
  94. <view class="c-row">
  95. <view class="title">车号</view>
  96. <view class="con-list">
  97. <input v-model='item.carNo' placeholder="暂无" disabled name="input"></input>
  98. </view>
  99. </view>
  100. <!-- 车厢号 -->
  101. <view class="c-row">
  102. <view class="title">车厢号-1</view>
  103. <view class="con-list">
  104. <input v-model='item.boxNo' placeholder="暂无" disabled name="input"></input>
  105. </view>
  106. </view>
  107. <view class="c-row">
  108. <view class="title">车厢号-2</view>
  109. <view class="con-list">
  110. <input v-model='item.boxNo' placeholder="暂无" disabled name="input"></input>
  111. </view>
  112. </view>
  113. <!-- 装车净重 -->
  114. <view class="c-row">
  115. <view class="title">装车净重(吨)</view>
  116. <view class="con-list">
  117. <input v-model='item.loadNetWeight' placeholder="暂无" disabled name="input"></input>
  118. </view>
  119. </view>
  120. <!-- 卸车净重 -->
  121. <view class="c-row">
  122. <view class="title">卸车净重(吨)</view>
  123. <view class="con-list">
  124. <input v-model='item.unloadNetWeight' placeholder="请输入卸车净重" :disabled="item.status == '已送达'" name="input" type="digit"></input>
  125. </view>
  126. </view>
  127. <view class="flex">
  128. <!-- <u-button @click='pass(2,index)' v-if="item.status != '已送达'" type="success" hover-class='none'>保存</u-button> -->
  129. <view class="btn" @click='pass(2,index)'v-if="item.status != '已送达'">保存</view>
  130. </view>
  131. </view>
  132. <!-- 以上火运反馈 -->
  133. <!-- 散船反馈 -->
  134. <view class="flex title_css">
  135. <view class="head_css">散船反馈({{shipList?shipList:0}})<image :src="shipurl" class="open_css" @click="shipping">
  136. </image>
  137. </view>
  138. </view>
  139. <view class="content" v-if="shipShow" v-for="(item,index) in detailData.tranCarInfoList3">
  140. <!-- 船名 -->
  141. <view class="c-row">
  142. <view class="title">船名</view>
  143. <view class="con-list">
  144. <input v-model='item.shipName' placeholder="暂无" disabled name="input"></input>
  145. </view>
  146. </view>
  147. <view class="c-row">
  148. <view class="title">航次</view>
  149. <view class="con-list">
  150. <input v-model='item.shipNo' placeholder="暂无" disabled name="input"></input>
  151. </view>
  152. </view>
  153. <!-- 装船净重 -->
  154. <view class="c-row">
  155. <view class="title">装船净重(吨)</view>
  156. <view class="con-list">
  157. <input v-model='item.loadNetWeight' placeholder="暂无" disabled name="input"></input>
  158. </view>
  159. </view>
  160. <!-- 卸船净重 -->
  161. <view class="c-row">
  162. <view class="title">装船净重(吨)</view>
  163. <view class="con-list">
  164. <input v-model='item.unloadNetWeight' placeholder="请输入卸船净重" :disabled="item.status == '已送达'" name="input" type="digit"></input>
  165. </view>
  166. </view>
  167. <view class="flex">
  168. <!-- <u-button @click='pass(3,index)' type="success" v-if="item.status != '已送达'" hover-class='none'>保存</u-button> -->
  169. <view class="btn" @click='pass(3,index)'v-if="item.status != '已送达'">保存</view>
  170. </view>
  171. </view>
  172. <!-- 以上散船反馈 -->
  173. <!-- 集装箱船反馈 -->
  174. <view class="flex title_css">
  175. <view class="head_css">集装箱船反馈({{containerList?containerList:0}})<image :src="containerUrl" class="open_css"
  176. @click="containerchange"></image>
  177. </view>
  178. </view>
  179. <view class="content" v-if="containerShow" v-for="(item,index) in detailData.tranCarInfoList4">
  180. <!-- 箱号 -->
  181. <view class="c-row">
  182. <view class="title">箱号</view>
  183. <view class="con-list">
  184. <input v-model='item.caseNo' placeholder="暂无" disabled name="input"></input>
  185. </view>
  186. </view>
  187. <view class="c-row">
  188. <view class="title">封号</view>
  189. <view class="con-list">
  190. <input v-model='item.titleNo' placeholder="暂无" disabled name="input"></input>
  191. </view>
  192. </view>
  193. <!-- 装船净重 -->
  194. <view class="c-row">
  195. <view class="title">装船净重(吨)</view>
  196. <view class="con-list">
  197. <input v-model='item.loadNetWeight' placeholder="暂无" disabled name="input"></input>
  198. </view>
  199. </view>
  200. <!-- 卸船净重 -->
  201. <view class="c-row">
  202. <view class="title">卸船净重(吨)</view>
  203. <view class="con-list">
  204. <input v-model='item.unloadNetWeight' placeholder="请输入卸船净重" :disabled="item.status == '已送达'" name="input" type="digit"></input>
  205. </view>
  206. </view>
  207. <view class="flex">
  208. <!-- <u-button @click='pass(4,index)' type="success" v-if="item.status != '已送达'" hover-class='none'>保存</u-button> -->
  209. <view class="btn" @click='pass(4,index)'v-if="item.status != '已送达'">保存</view>
  210. </view>
  211. </view>
  212. </view>
  213. <view style='padding:10px;' class='flex bottom-btn'>
  214. <u-button @click='finishedgoods' type="success" class="btn2" :disabled="statusAll != '执行中'">完货</u-button>
  215. </view>
  216. </view>
  217. </template>
  218. <script>
  219. import upload from '@/components/upload.vue';
  220. import helper from '@/common/helper.js';
  221. export default {
  222. components: {
  223. upload
  224. },
  225. data() {
  226. return {
  227. id: '',
  228. statusAll:"",
  229. currentPage: 1,
  230. pageSize: 10,
  231. maxSize: 50 * 1024 * 1024,
  232. status: '执行中',
  233. params: {
  234. year: true,
  235. month: true,
  236. day: true,
  237. },
  238. action: this.$uploadUrl, //磅单上传地址
  239. detailData: {},
  240. show: false,
  241. carShow: false,
  242. carurl: "../../../static/img/authentication/up2.png",
  243. trainCarShow: false,
  244. trainCarurl: "../../../static/img/authentication/up2.png",
  245. shipShow: false,
  246. shipurl: "../../../static/img/authentication/up2.png",
  247. containerUrl: "../../../static/img/authentication/up2.png",
  248. containerShow: false,
  249. infoId: "",
  250. sendCar: [], //汽运
  251. huoYun: [], //火运
  252. looseShip: [], //散船
  253. container: [], //集裝箱船
  254. sendCarList: "",
  255. trainCarList: "",
  256. shipList: "",
  257. containerList: "",
  258. }
  259. },
  260. onLoad(options) {
  261. this.id = options.id
  262. this.statusAll = options.status
  263. },
  264. onShow() {
  265. this.getList()
  266. },
  267. computed: {},
  268. methods: {
  269. //汽运展开显示
  270. openCar() {
  271. this.carShow = !this.carShow
  272. if (this.carShow) {
  273. this.carurl = "../../../static/img/authentication/down2@2x.png"
  274. } else {
  275. this.carurl = "../../../static/img/authentication/up2.png"
  276. }
  277. },
  278. // 火运展开显示
  279. trainCar() {
  280. this.trainCarShow = !this.trainCarShow
  281. if (this.trainCarShow) {
  282. this.trainCarurl = "../../../static/img/authentication/down2@2x.png"
  283. } else {
  284. this.trainCarurl = "../../../static/img/authentication/up2.png"
  285. }
  286. },
  287. //船运展开显示
  288. shipping() {
  289. this.shipShow = !this.shipShow
  290. if (this.shipShow) {
  291. this.shipurl = "../../../static/img/authentication/down2@2x.png"
  292. } else {
  293. this.shipurl = "../../../static/img/authentication/up2.png"
  294. }
  295. },
  296. //集装箱船展开显示
  297. containerchange() {
  298. this.containerShow = !this.containerShow
  299. if (this.containerShow) {
  300. this.containerUrl = "../../../static/img/authentication/down2@2x.png"
  301. } else {
  302. this.containerUrl = "../../../static/img/authentication/up2.png"
  303. }
  304. },
  305. //完货
  306. finishedgoods() {
  307. for(let i = 0 ; i < this.detailData.tranCarInfoList1.length;i++){
  308. if(this.detailData.tranCarInfoList1[i].status != "已送达" ){
  309. this.$api.msg("请完成所有的汽运收货反馈!")
  310. return
  311. }
  312. }
  313. for(let i = 0 ; i < this.detailData.tranCarInfoList2.length;i++){
  314. if(this.detailData.tranCarInfoList2[i].status != "已送达"){
  315. this.$api.msg("请完成所有的火运收货反馈!")
  316. return
  317. }
  318. }
  319. for(let i = 0 ; i < this.detailData.tranCarInfoList3.length;i++){
  320. if(this.detailData.tranCarInfoList3[i].status != "已送达"){
  321. this.$api.msg("请完成所有的散船收货反馈!")
  322. return
  323. }
  324. }
  325. for(let i = 0 ; i < this.detailData.tranCarInfoList4.length;i++){
  326. if(this.detailData.tranCarInfoList4[i].status != "已送达"){
  327. this.$api.msg("请完成所有的集装箱船收货反馈!")
  328. return
  329. }
  330. }
  331. var that = this
  332. uni.showModal({
  333. content: "完货操作后,卸车信息不可修改,是否确定完货?",
  334. success(res) {
  335. if (res.confirm) {
  336. let complete = {}
  337. complete.id = that.id
  338. that.$api.doRequest('post', '/tranProcessInfo/api/editReceivingStatus', complete).then(res => {
  339. if (res.data.code == 200) {
  340. that.sendCar.splice(index, 1)
  341. that.$api.msg("提交成功")
  342. setTimeout(() => {
  343. uni.navigateBack()
  344. }, 1000)
  345. } else {
  346. that.$api.msg(res.data.message)
  347. }
  348. })
  349. }
  350. }
  351. })
  352. },
  353. //保存
  354. pass(num, index) {
  355. if(num == 1){
  356. if(!this.detailData.tranCarInfoList1[index].unloadNetWeight || this.detailData.tranCarInfoList1[index].unloadNetWeight == 0){
  357. this.$api.msg("请输入卸车净重")
  358. return
  359. }
  360. }
  361. if(num == 2){
  362. if(!this.detailData.tranCarInfoList2[index].unloadNetWeight || this.detailData.tranCarInfoList2[index].unloadNetWeight == 0){
  363. this.$api.msg("请输入卸车净重")
  364. return
  365. }
  366. }
  367. if(num == 3){
  368. if(!this.detailData.tranCarInfoList3[index].unloadNetWeight || this.detailData.tranCarInfoList3[index].unloadNetWeight == 0){
  369. this.$api.msg("请输入卸船净重")
  370. return
  371. }
  372. }
  373. if(num == 4){
  374. if(!this.detailData.tranCarInfoList4[index].unloadNetWeight || this.detailData.tranCarInfoList4[index].unloadNetWeight == 0){
  375. this.$api.msg("请输入卸船净重")
  376. return
  377. }
  378. }
  379. var that = this
  380. uni.showModal({
  381. content: "确定保存反馈信息?",
  382. success(res) {
  383. if (res.confirm) {
  384. let _pro = {}
  385. _pro.id = that.id
  386. _pro.infoId = that.detailData.infoId
  387. _pro.contractNo = that.detailData.contractNo
  388. if (num == 1) {
  389. _pro.tranCarInfoList1 = [that.detailData.tranCarInfoList1[index]]
  390. _pro.threeTranType = "汽运"
  391. that.$api.doRequest('post', '/tranProcessInfo/api/addTranCar', _pro).then(res => {
  392. if (res.data.code == 200) {
  393. that.$api.msg("保存成功")
  394. that.getList()
  395. } else {
  396. that.$api.msg(res.data.message)
  397. }
  398. })
  399. } else if (num == 2) {
  400. _pro.tranCarInfoList2 = [that.detailData.tranCarInfoList2[index]]
  401. _pro.threeTranType = "火运"
  402. that.$api.doRequest('post', '/tranProcessInfo/api/addTranCar', _pro).then(res => {
  403. if (res.data.code == 200) {
  404. that.$api.msg("保存成功")
  405. that.getList()
  406. } else {
  407. that.$api.msg(res.data.message)
  408. }
  409. })
  410. } else if (num == 3) {
  411. _pro.tranCarInfoList3 = [that.detailData.tranCarInfoList3[index]]
  412. _pro.threeTranType = "散船"
  413. that.$api.doRequest('post', '/tranProcessInfo/api/addTranCar', _pro).then(res => {
  414. if (res.data.code == 200) {
  415. that.$api.msg("保存成功")
  416. that.getList()
  417. } else {
  418. that.$api.msg(res.data.message)
  419. }
  420. })
  421. } else if (num == 4) {
  422. _pro.tranCarInfoList4 = [that.detailData.tranCarInfoList4[index]]
  423. _pro.threeTranType = "集装箱船"
  424. that.$api.doRequest('post', '/tranProcessInfo/api/addTranCar', _pro).then(res => {
  425. if (res.data.code == 200) {
  426. that.$api.msg("保存成功")
  427. that.getList()
  428. } else {
  429. that.$api.msg(res.data.message)
  430. }
  431. })
  432. }
  433. }
  434. }
  435. })
  436. },
  437. getList() {
  438. this.$api.doRequest('get', '/tranProcessInfo/getThreeTranProcess', {
  439. id: this.id
  440. }).then(res => {
  441. if (res.data.code == 200) {
  442. this.detailData = res.data.data
  443. if(this.detailData.tranCarInfoList1){this.sendCarList = this.detailData.tranCarInfoList1.length}
  444. if(this.detailData.tranCarInfoList2){this.trainCarList = this.detailData.tranCarInfoList2.length}
  445. if(this.detailData.tranCarInfoList3){this.shipList = this.detailData.tranCarInfoList3.length}
  446. if(this.detailData.tranCarInfoList4){this.containerList = this.detailData.tranCarInfoList4.length}
  447. }
  448. })
  449. },
  450. filterFileType(index, lists) {
  451. if (lists[index].fileType != 'jpg' && lists[index].fileType != 'png' && lists[index].fileType != 'gif') {
  452. lists.splice(index, 1);
  453. // 当前文件不支持
  454. uni.showModal({
  455. title: '暂不支持当前图片类型',
  456. showCancel: false
  457. });
  458. } else {
  459. this.isAdd = false;
  460. }
  461. },
  462. }
  463. }
  464. </script>
  465. <style scoped lang="scss">
  466. uni-page-body {
  467. overflow: hidden;
  468. }
  469. .content {
  470. margin: 10px 0;
  471. }
  472. .wrap {
  473. margin: 10rpx;
  474. padding: 20rpx 20rpx 300rpx 20rpx;
  475. .top {
  476. display: flex;
  477. margin-bottom: 20rpx;
  478. .top-left {
  479. margin-right: 20rpx;
  480. }
  481. }
  482. }
  483. .bottom-btn {
  484. width: 100%;
  485. position: fixed;
  486. bottom: 0;
  487. display: flex;
  488. z-index: 2;
  489. left: 0;
  490. background-color: #f8f8f8;
  491. flex-direction: column;
  492. .btn1,
  493. .btn2 {
  494. width: 100%;
  495. margin-bottom: 26rpx;
  496. border-radius: 90rpx;
  497. }
  498. .btn1 {
  499. background: white;
  500. color: #00C265;
  501. }
  502. }
  503. .content,
  504. .content1,
  505. .content2 {
  506. border-radius: 20rpx;
  507. background: white;
  508. padding: 20rpx;
  509. .title {
  510. font-size: 28rpx;
  511. // font-weight: 600;
  512. color: #333333;
  513. }
  514. .row {
  515. display: flex;
  516. justify-content: space-between;
  517. // border-bottom: 1px solid #EEEEEE;
  518. padding: 20rpx 0;
  519. .right,
  520. input {
  521. font-size: 28rpx;
  522. color: #333333;
  523. }
  524. }
  525. .row-bottom {
  526. // border: 0;
  527. .right-bottom {
  528. width: 280rpx;
  529. text-align: right;
  530. }
  531. }
  532. }
  533. .content1 {
  534. margin-top: 20rpx;
  535. }
  536. .content2 {
  537. margin-top: 10px;
  538. // display: flex;
  539. align-items: center;
  540. .left {
  541. margin-right: 20px;
  542. }
  543. }
  544. .edit-btn {
  545. background: #22C572;
  546. width: 100rpx;
  547. height: 50rpx;
  548. margin: 0;
  549. color: white;
  550. }
  551. .has-btn {
  552. align-items: center;
  553. }
  554. .shade {
  555. background: #000;
  556. position: fixed;
  557. top: 0;
  558. left: 0;
  559. width: 100%;
  560. height: 100%;
  561. z-index: 10000;
  562. }
  563. .pound_list {
  564. width: 452rpx;
  565. display: flex;
  566. justify-content: flex-end;
  567. text-align: right;
  568. }
  569. .c-row {
  570. display: -webkit-box;
  571. display: -webkit-flex;
  572. display: flex;
  573. -webkit-box-align: center;
  574. -webkit-align-items: center;
  575. align-items: center;
  576. padding: 10rpx;
  577. position: relative;
  578. }
  579. .con-list {
  580. -webkit-box-flex: 1;
  581. -webkit-flex: 1;
  582. flex: 1;
  583. display: -webkit-box;
  584. display: -webkit-flex;
  585. display: flex;
  586. -webkit-box-orient: vertical;
  587. -webkit-box-direction: normal;
  588. -webkit-flex-direction: column;
  589. flex-direction: column;
  590. color: #303133;
  591. line-height: 40rpx;
  592. text-align: right;
  593. padding-right: 20rpx;
  594. }
  595. .btn{
  596. padding: 10rpx 60rpx;
  597. border-radius: 40rpx;
  598. color: #FFFFFF;
  599. line-height: 46rpx;
  600. margin: 0 auto;
  601. background-color: #5ac725;
  602. }
  603. .add_css {
  604. width: 50%;
  605. display: flex;
  606. justify-content: flex-end;
  607. .add {
  608. padding: 10rpx 20rpx;
  609. background-color: #5ac725;
  610. border-radius: 6rpx;
  611. color: #FFFFFF;
  612. line-height: 40rpx;
  613. }
  614. }
  615. .open_css {
  616. width: 36rpx;
  617. height: 20rpx;
  618. // top: 4rpx;
  619. }
  620. .title_css {
  621. margin-bottom: 20rpx;
  622. .head_css {
  623. margin-left: 20rpx;
  624. width: 50%;
  625. line-height: 40rpx;
  626. margin-bottom: 30rpx;
  627. }
  628. }
  629. </style>