lookRelease.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464
  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">运费单价(元/车)</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.validityPeriod = this.$helper.makeValidityPeriod()
  194. // this.validityPeriodcq = this.$helper.makeValidityPeriod(0)
  195. this.id = options.id
  196. this.getDetails()
  197. },
  198. methods: {
  199. carType() {
  200. let good = this.dataObj
  201. let _val = '';
  202. if (good.carModel == 1) {
  203. _val = '不限'
  204. } else {
  205. if (good.carModel.includes(2)) {
  206. _val += '高栏/'
  207. }
  208. if (good.carModel.includes(3)) {
  209. _val += '集装箱/'
  210. }
  211. if (good.carModel.includes(4)) {
  212. _val += '自卸车'
  213. }
  214. }
  215. return _val
  216. },
  217. getDetails() {
  218. this.$request.baseRequest('get', '/publishTaskInfo/seeTask', {
  219. id: this.id,
  220. }).then(res => {
  221. if (res.code == 200) {
  222. this.dataObj = res.data
  223. }
  224. })
  225. .catch(res => {
  226. uni.showToast({
  227. title: res.message,
  228. icon: 'none',
  229. duration: 2000
  230. })
  231. });
  232. },
  233. // changeHandler(e) {
  234. // const {
  235. // columnIndex,
  236. // value,
  237. // values,
  238. // index,
  239. // picker = this.$refs.uPicker
  240. // } = e
  241. // // if (columnIndex === 0) {
  242. // //
  243. // // if (e.index != 0) {
  244. // // picker.setColumnValues(1, this.validityPeriod[1].shift())
  245. // // }
  246. // // } else if (columnIndex === 1) {
  247. // // if (e.index != 0) {
  248. // // picker.setColumnValues(2, this.validityPeriod[2].shift())
  249. // // }
  250. // // }
  251. // },
  252. // selectCargoOwnerClose() {
  253. // this.show = false
  254. // },
  255. // confirmSelectCargoOwner(e) {
  256. //
  257. // this.dataObj.cargoOwner = e.value[0]
  258. // this.show = false
  259. // },
  260. // selectCargoOwner() {
  261. // this.show = true
  262. // },
  263. // selectAddress(type) {
  264. // uni.$u.route('/pages/release/selectAddress', {
  265. // type: type,
  266. // });
  267. // },
  268. // checkboxChange(n) {
  269. // console.log('change', n);
  270. // },
  271. // selectValidityPeriodcq() {
  272. // this.isShowcardValidity = true
  273. // },
  274. // confirmValidityPeriod(e) {
  275. // console.log('confirm', e)
  276. // switch (this.ValidityPeriodType) {
  277. // case 0:
  278. // this.dataObj.loadingDateStart = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
  279. // break
  280. // case 1:
  281. // this.dataObj.loadingDateEnd = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
  282. // break
  283. // }
  284. // this.isShowValidity = false
  285. // },
  286. // confirmValidityPeriodcq(e) {
  287. // console.log('confirm', e)
  288. // this.dataObj.taskValidity = e.value[0] + '-' + e.value[1] + '-' + e.value[2]
  289. // this.isShowcardValidity = false
  290. // },
  291. // selectValidityPeriod(type) {
  292. // this.ValidityPeriodType = type
  293. // this.isShowValidity = true
  294. // },
  295. // change(e) {
  296. // console.log('change', e);
  297. // },
  298. // back() {
  299. // uni.navigateBack()
  300. // },
  301. // goToRecord() {
  302. // uni.$u.route('/pages/release/record');
  303. // },
  304. // radioChange(n) {
  305. // console.log('radioChange', n);
  306. // this.dataDetails.type = n
  307. // },
  308. // submit() {
  309. //
  310. // // 校验没写
  311. // if (this.dataObj.billingMethod == '元/吨') {
  312. // this.dataObj.billingMethod = 0
  313. // } else {
  314. // this.dataObj.billingMethod = 1
  315. // }
  316. // if (this.dataObj.freightAdvance) {
  317. // this.dataObj.freightAdvance = 1
  318. // } else {
  319. // this.dataObj.freightAdvance = 0
  320. // }
  321. // let _list = []
  322. // for (let i = 0; i < this.checkboxValue1.length; i++) {
  323. // if (this.checkboxValue1 == '不限') {
  324. // _list.push(1)
  325. // } else if (this.checkboxValue1 == '高栏') {
  326. // _list.push(2)
  327. // } else if (this.checkboxValue1 == '集装箱') {
  328. // _list.push(3)
  329. // } else if (this.checkboxValue1 == '自卸车') {
  330. // _list.push(4)
  331. // }
  332. // }
  333. // this.dataObj.carModel = _list.toString()
  334. // this.$request.baseRequest('post', '//publishTaskInfo/api/addTask', this.dataObj).then(res => {
  335. //
  336. // })
  337. // .catch(res => {
  338. // uni.showToast({
  339. // title: res.message,
  340. // icon: 'none',
  341. // duration: 2000
  342. // })
  343. // });
  344. // },
  345. }
  346. }
  347. </script>
  348. <style scoped lang="scss">
  349. .jt {
  350. width: 60rpx;
  351. }
  352. .row {
  353. display: flex;
  354. justify-content: space-between;
  355. }
  356. .content1 {
  357. padding: 20rpx 40rpx;
  358. .jt-icon {
  359. width: 46rpx;
  360. margin-right: 20rpx;
  361. }
  362. .title {
  363. font-size: 46rpx;
  364. font-weight: 700;
  365. color: #333333;
  366. }
  367. .row1 {
  368. display: flex;
  369. align-items: center;
  370. }
  371. }
  372. .content2,
  373. .content3,
  374. .content5 {
  375. box-sizing: border-box;
  376. background: white;
  377. border-radius: 20rpx;
  378. padding: 20rpx;
  379. margin: 20rpx;
  380. .row1 {
  381. display: flex;
  382. justify-content: space-between;
  383. align-items: center;
  384. .left .top {
  385. display: flex;
  386. }
  387. }
  388. }
  389. .content2,
  390. .content5 {
  391. .row {
  392. margin: 20rpx 0;
  393. }
  394. .left {
  395. color: #8F8F8F;width: calc(50% - 25rpx);
  396. }
  397. .right {
  398. color: #333333;
  399. text-align: right;
  400. }
  401. }
  402. .content4 {
  403. margin: 20rpx;
  404. .mr20 {
  405. color: #999999;
  406. }
  407. .btn-text {
  408. color: #2772FB;
  409. border: 1px solid #2772FB;
  410. border-radius: 20rpx;
  411. padding: 0rpx 10rpx;
  412. box-sizing: border-box;
  413. }
  414. }
  415. .place {
  416. margin: 20rpx;
  417. background: white;
  418. padding: 20rpx 0;
  419. border-radius: 20rpx;
  420. .left {
  421. width: calc(50% - 25rpx);
  422. align-items: center;
  423. flex-direction: column;
  424. justify-content: center;
  425. }
  426. .right {
  427. width: calc(50% - 25rpx);
  428. align-items: center;
  429. justify-content: flex-end;
  430. flex-direction: column;
  431. }
  432. }
  433. </style>