lookRelease.vue 11 KB

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