lookRelease.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462
  1. <template>
  2. <view class="content">
  3. <view class="content1">
  4. <view v-if="dataObj.status=='已通过'" class="row1">
  5. <image class="jt-icon" src="@/static/images/common/tg.png" mode='widthFix'>
  6. <view class="title">任务已通过</view>
  7. </view>
  8. <view v-if="dataObj.status=='已过期'" class="row1">
  9. <image class="jt-icon" src="@/static/images/common/sx.png" mode='widthFix'>
  10. <view class="title">任务已失效</view>
  11. </view>
  12. <view v-if="dataObj.status=='未通过'" class="row1">
  13. <image class="jt-icon" src="@/static/images/common/wtg.png" mode='widthFix'>
  14. <view class="title">任务未通过</view>
  15. </view>
  16. <view v-if="dataObj.status=='审核中'" class="row1">
  17. <image class="jt-icon" src="@/static/images/common/sh.png" mode='widthFix'>
  18. <view class="title">任务审核中</view>
  19. </view>
  20. </view>
  21. <view class="flex place">
  22. <view class="left flex">
  23. <view class="flex">
  24. <view class="ssx">
  25. {{$helper.getProvinceAbbreviation(dataObj.sendPrivate?dataObj.sendPrivate:dataObj.sendCity)}}
  26. </view>
  27. <view class="level2-title">{{dataObj.sendCity}}</view>
  28. </view>
  29. <view class="level2-title">{{dataObj.sendArea}}</view>
  30. </view>
  31. <image class="jt" src="@/static/images/order/jt.png" mode='widthFix'></image>
  32. <view class="right flex">
  33. <view class="flex">
  34. <view class="ssx">
  35. {{$helper.getProvinceAbbreviation(dataObj.unloadPrivate?dataObj.unloadPrivate:dataObj.unloadCity)}}
  36. </view>
  37. <view class="level2-title">{{dataObj.unloadCity}} </view>
  38. </view>
  39. <view class="level2-title">{{dataObj.unloadArea}}</view>
  40. </view>
  41. </view>
  42. <view class="content2">
  43. <view class="row">
  44. <view class="left">货主</view>
  45. <view class="right">{{dataObj.cargoOwner}}</view>
  46. </view>
  47. <view class="row">
  48. <view class="left">发货地区</view>
  49. <view class="right">{{dataObj.sendPrivate}}{{dataObj.sendCity}}{{dataObj.sendArea}}</view>
  50. </view>
  51. <view class="row">
  52. <view class="left">发货详细地址</view>
  53. <view class="right">{{dataObj.sendDetailedAddress}}</view>
  54. </view>
  55. <view class="row">
  56. <view class="left">收货地区</view>
  57. <view class="right">{{dataObj.unloadPrivate}}{{dataObj.unloadCity}}{{dataObj.unloadArea}}</view>
  58. </view>
  59. <view class="row">
  60. <view class="left">收货详细地址</view>
  61. <view class="right">{{dataObj.unloadDetailedAddress}}</view>
  62. </view>
  63. <view class="row">
  64. <view class="left">距离(km)</view>
  65. <view class="right">{{dataObj.distance}}</view>
  66. </view>
  67. <view class="row">
  68. <view class="left">货名</view>
  69. <view class="right">{{dataObj.goodsName}}</view>
  70. </view>
  71. <view class="flex row">
  72. <view class="left">运费计算方式</view>
  73. <view class="right">{{dataObj.billingMethod=='0'?'元/吨':'元/车'}}</view>
  74. </view>
  75. <view class="row">
  76. <view class="left">运费单价({{dataObj.billingMethod=='0'?'元/吨':'元/车'}})</view>
  77. <view class="right">{{dataObj.freightPrice}}</view>
  78. </view>
  79. <view class="row">
  80. <view class="left">该任务申请运费垫付</view>
  81. <view class="right">{{dataObj.freightAdvance=='0'?'否':'是'}}</view>
  82. </view>
  83. </view>
  84. <view class="content5">
  85. <view class="row">
  86. <view class="left">发货联系人</view>
  87. <view class="right">{{dataObj.sender}}</view>
  88. </view>
  89. <view class="row">
  90. <view class="left">发货人手机号</view>
  91. <view class="right">{{dataObj.senderPhone}}</view>
  92. </view>
  93. <view class="row">
  94. <view class="left">收货方</view>
  95. <view class="right">{{dataObj.receiver}}</view>
  96. </view>
  97. <view class="row">
  98. <view class="left">收货方手机号</view>
  99. <view class="right">{{dataObj.receiverPhone}}</view>
  100. </view>
  101. <view class="row">
  102. <view class="left">收货方身份证号</view>
  103. <view class="flex">
  104. {{dataObj.receiverIdcard}}
  105. </view>
  106. </view>
  107. <view class="row">
  108. <view class="left">收货方信用代码</view>
  109. <view class="right flex">
  110. {{dataObj.receiverCreditCode}}
  111. </view>
  112. </view>
  113. <view class="row">
  114. <view class="left">重量(吨)</view>
  115. <view class="right">{{dataObj.weight}}</view>
  116. </view>
  117. <view class="flex row">
  118. <view class="left">预计装车日期起</view>
  119. <view class="right">{{dataObj.loadingDateStart}}</view>
  120. </view>
  121. <view class="flex row">
  122. <view class="left">预计装车日期止</view>
  123. <view class="right">{{dataObj.loadingDateEnd}}</view>
  124. </view>
  125. <view class="row">
  126. <view class="left">车长要求(米)</view>
  127. <view class="right">{{dataObj.carLengthSmall}}~{{dataObj.carLength}}</view>
  128. </view>
  129. <view class="row">
  130. <view class="left">载重要求(吨)</view>
  131. <view class="right">{{dataObj.loadWeightSmall}}~{{dataObj.loadWeight}}</view>
  132. </view>
  133. <view class="row">
  134. <view class="left">车型要求</view>
  135. <view class="right">{{carType()}}</view>
  136. </view>
  137. <view class="row">
  138. <view class="left">任务描述</view>
  139. </view>
  140. <view class="row">
  141. <u--textarea v-model="dataObj.taskDescription" placeholder="请输入内容" disabled></u--textarea>
  142. </view>
  143. <view class="flex row noborder">
  144. <view class="left">任务有效期</view>
  145. <view class="right">{{dataObj.taskValidity}}</view>
  146. </view>
  147. </view>
  148. </view>
  149. </template>
  150. <script>
  151. var _this;
  152. export default {
  153. data() {
  154. return {
  155. dataObj: {
  156. cargoOwner: '',
  157. sendPrivate: '',
  158. sendCity: '',
  159. sendArea: '',
  160. sendDetailedAddress: '',
  161. unloadPrivate: '',
  162. unloadCity: '',
  163. unloadArea: '',
  164. unloadDetailedAddress: '',
  165. distance: '',
  166. goodsName: '',
  167. billingMethod: '',
  168. freightPrice: '',
  169. freightAdvance: '',
  170. sender: '',
  171. senderPhone: '',
  172. receiver: '',
  173. receiverPhone: '',
  174. weight: '',
  175. loadingDateStart: '',
  176. loadingDateEnd: '',
  177. carLengthSmall: '',
  178. carLength: '',
  179. loadWeightSmall: '',
  180. loadWeight: '',
  181. carModel: '',
  182. taskDescription: '',
  183. taskValidity: '',
  184. sendLongitude: '',
  185. sendLatitude: '',
  186. unsendLongitude: '',
  187. unsendLatitude: '',
  188. },
  189. }
  190. },
  191. onLoad(options) {
  192. _this = this;
  193. this.id = options.id
  194. this.getDetails()
  195. },
  196. methods: {
  197. carType() {
  198. let good = this.dataObj
  199. let _val = '';
  200. if (good.carModel == 1) {
  201. _val = '不限'
  202. } else {
  203. if (good.carModel.includes(2)) {
  204. _val += '高栏/'
  205. }
  206. if (good.carModel.includes(3)) {
  207. _val += '集装箱/'
  208. }
  209. if (good.carModel.includes(4)) {
  210. _val += '自卸车'
  211. }
  212. }
  213. return _val
  214. },
  215. getDetails() {
  216. this.$request.baseRequest('get', '/publishTaskInfo/seeTask', {
  217. id: this.id,
  218. }).then(res => {
  219. if (res.code == 200) {
  220. this.dataObj = res.data
  221. }
  222. })
  223. .catch(res => {
  224. uni.showToast({
  225. title: res.message,
  226. icon: 'none',
  227. duration: 2000
  228. })
  229. });
  230. },
  231. // changeHandler(e) {
  232. // const {
  233. // columnIndex,
  234. // value,
  235. // values,
  236. // index,
  237. // picker = this.$refs.uPicker
  238. // } = e
  239. // // if (columnIndex === 0) {
  240. // //
  241. // // if (e.index != 0) {
  242. // // picker.setColumnValues(1, this.validityPeriod[1].shift())
  243. // // }
  244. // // } else if (columnIndex === 1) {
  245. // // if (e.index != 0) {
  246. // // picker.setColumnValues(2, this.validityPeriod[2].shift())
  247. // // }
  248. // // }
  249. // },
  250. // selectCargoOwnerClose() {
  251. // this.show = false
  252. // },
  253. // confirmSelectCargoOwner(e) {
  254. //
  255. // this.dataObj.cargoOwner = e.value[0]
  256. // this.show = false
  257. // },
  258. // selectCargoOwner() {
  259. // this.show = true
  260. // },
  261. // selectAddress(type) {
  262. // uni.$u.route('/pages/release/selectAddress', {
  263. // type: type,
  264. // });
  265. // },
  266. // checkboxChange(n) {
  267. // console.log('change', n);
  268. // },
  269. // selectValidityPeriodcq() {
  270. // this.isShowcardValidity = true
  271. // },
  272. // confirmValidityPeriod(e) {
  273. // console.log('confirm', e)
  274. // switch (this.ValidityPeriodType) {
  275. // case 0:
  276. // this.dataObj.loadingDateStart = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
  277. // break
  278. // case 1:
  279. // this.dataObj.loadingDateEnd = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
  280. // break
  281. // }
  282. // this.isShowValidity = false
  283. // },
  284. // confirmValidityPeriodcq(e) {
  285. // console.log('confirm', e)
  286. // this.dataObj.taskValidity = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
  287. // this.isShowcardValidity = false
  288. // },
  289. // selectValidityPeriod(type) {
  290. // this.ValidityPeriodType = type
  291. // this.isShowValidity = true
  292. // },
  293. // change(e) {
  294. // console.log('change', e);
  295. // },
  296. // back() {
  297. // uni.navigateBack()
  298. // },
  299. // goToRecord() {
  300. // uni.$u.route('/pages/release/record');
  301. // },
  302. // radioChange(n) {
  303. // console.log('radioChange', n);
  304. // this.dataDetails.type = n
  305. // },
  306. // submit() {
  307. //
  308. // // 校验没写
  309. // if (this.dataObj.billingMethod == '元/吨') {
  310. // this.dataObj.billingMethod = 0
  311. // } else {
  312. // this.dataObj.billingMethod = 1
  313. // }
  314. // if (this.dataObj.freightAdvance) {
  315. // this.dataObj.freightAdvance = 1
  316. // } else {
  317. // this.dataObj.freightAdvance = 0
  318. // }
  319. // let _list = []
  320. // for (let i = 0; i < this.checkboxValue1.length; i++) {
  321. // if (this.checkboxValue1 == '不限') {
  322. // _list.push(1)
  323. // } else if (this.checkboxValue1 == '高栏') {
  324. // _list.push(2)
  325. // } else if (this.checkboxValue1 == '集装箱') {
  326. // _list.push(3)
  327. // } else if (this.checkboxValue1 == '自卸车') {
  328. // _list.push(4)
  329. // }
  330. // }
  331. // this.dataObj.carModel = _list.toString()
  332. // this.$request.baseRequest('post', '//publishTaskInfo/api/addTask', this.dataObj).then(res => {
  333. //
  334. // })
  335. // .catch(res => {
  336. // uni.showToast({
  337. // title: res.message,
  338. // icon: 'none',
  339. // duration: 2000
  340. // })
  341. // });
  342. // },
  343. }
  344. }
  345. </script>
  346. <style scoped lang="scss">
  347. .jt {
  348. width: 60rpx;
  349. }
  350. .row {
  351. display: flex;
  352. justify-content: space-between;
  353. }
  354. .content1 {
  355. padding: 20rpx 40rpx;
  356. .jt-icon {
  357. width: 46rpx;
  358. margin-right: 20rpx;
  359. }
  360. .title {
  361. font-size: 46rpx;
  362. font-weight: 700;
  363. color: #333333;
  364. }
  365. .row1 {
  366. display: flex;
  367. align-items: center;
  368. }
  369. }
  370. .content2,
  371. .content3,
  372. .content5 {
  373. box-sizing: border-box;
  374. background: white;
  375. border-radius: 20rpx;
  376. padding: 20rpx;
  377. margin: 20rpx;
  378. .row1 {
  379. display: flex;
  380. justify-content: space-between;
  381. align-items: center;
  382. .left .top {
  383. display: flex;
  384. }
  385. }
  386. }
  387. .content2,
  388. .content5 {
  389. .row {
  390. margin: 20rpx 0;
  391. }
  392. .left {
  393. color: #8F8F8F;width: calc(50% - 25rpx);
  394. }
  395. .right {
  396. color: #333333;
  397. text-align: right;
  398. }
  399. }
  400. .content4 {
  401. margin: 20rpx;
  402. .mr20 {
  403. color: #999999;
  404. }
  405. .btn-text {
  406. color: #2772FB;
  407. border: 1px solid #2772FB;
  408. border-radius: 20rpx;
  409. padding: 0rpx 10rpx;
  410. box-sizing: border-box;
  411. }
  412. }
  413. .place {
  414. margin: 20rpx;
  415. background: white;
  416. padding: 20rpx 0;
  417. border-radius: 20rpx;
  418. .left {
  419. width: calc(50% - 25rpx);
  420. align-items: center;
  421. flex-direction: column;
  422. justify-content: center;
  423. }
  424. .right {
  425. width: calc(50% - 25rpx);
  426. align-items: center;
  427. justify-content: flex-end;
  428. flex-direction: column;
  429. }
  430. }
  431. </style>