waitOrderDetail.vue 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348
  1. <template>
  2. <view class="order-pages">
  3. <view class="order-info">
  4. <!-- 订单状态 -->
  5. <view class="order-status">
  6. <view class="status-title flex align_center justify_center">
  7. <view class="t-icon icon t-icon-icon_service"></view>
  8. {{orderInfo.orderStatusDictValue}}
  9. </view>
  10. <view class="status-care">
  11. 预约时间:2021-05-10 15:10:05
  12. </view>
  13. </view>
  14. <!-- 回收品类明细 -->
  15. <view class="item-info">
  16. <view class="item-title">
  17. <view>回收品类明细</view>
  18. <view class="care">(切换分类可输入不同回收物的价格和重量)</view>
  19. </view>
  20. <view class="item flex">
  21. <view :class="['item-type', curType == item.code ? 'active' : '']" v-for="item in typeData" :key="item.id">
  22. {{item.dispName}}
  23. </view>
  24. <!-- <view class="item-type">
  25. 纸质类
  26. </view> -->
  27. </view>
  28. <view class="table">
  29. <view>单价(元/kg)</view>
  30. <view>重量(kg)</view>
  31. <view>合计金额(元)</view>
  32. </view>
  33. <view class="item flex justify_between">
  34. <view class="flex align_center">
  35. <text>黄纸</text>
  36. <u-input :custom-style="inputLeftStyle" input-align="center" :clearable="false" v-model="value" placeholder="" type="number" />
  37. </view>
  38. <view class="flex flex_1 align_center">
  39. <u-input input-align="center" :clearable="false" v-model="value" placeholder="请输入重量" type="number" />
  40. </view>
  41. <view class="flex_1"></view>
  42. </view>
  43. </view>
  44. <!-- 金额 -->
  45. <view class="item-info">
  46. <view class="item flex justify_between">
  47. <text>应付金额</text>
  48. <text>{{orderInfo.payAmount}} 元</text>
  49. </view>
  50. <view class="item flex justify_between">
  51. <text>支付方式</text>
  52. <text>线下</text>
  53. </view>
  54. </view>
  55. <!-- 服务信息 -->
  56. <view class="info-main flex flex_column">
  57. <view class="flex flex_1 align_center">
  58. <view class="new-left">
  59. {{orderInfo.contactAddress}}
  60. </view>
  61. </view>
  62. <view class="time flex align_center justify_between">
  63. <text>{{orderInfo.contactName}}</text>
  64. <view class="flex align_center">
  65. <view class="t-icon phone t-icon-icon_phone"></view>
  66. <text>{{orderInfo.contactMobile}}</text>
  67. </view>
  68. </view>
  69. </view>
  70. </view>
  71. </view>
  72. </template>
  73. <script>
  74. import moment from 'moment'
  75. import { orderDetailFind, orderSubmit } from '@/api/order.js'
  76. import { getLookUpDatas } from '@/api/data.js'
  77. import { reservePriceFind } from '@/api/index.js'
  78. export default {
  79. data() {
  80. return {
  81. orderInfo: {},
  82. totalPrice: 0, // 支付合计
  83. orderReserveNo: '', // 订单号
  84. inputLeftStyle: {
  85. Width: '120rpx',
  86. borderBottom: '1px solid #707070',
  87. padding: '0rpx 10rpx',
  88. color: '#191919'
  89. },
  90. curType: '', // 当前类型
  91. typeData: [], // 垃圾类型数据
  92. paperList: [], // 纸张分类价格数据
  93. clothesList: [], // 衣物分类价格数据
  94. metalList: [], // 金属分类价格数据
  95. plasticList: [], // 塑料分类价格数据
  96. }
  97. },
  98. onLoad(options) {
  99. if (options.orderNo) {
  100. console.log(options.orderNo)
  101. this.orderReserveNo = options.orderNo
  102. this.getOrderDetail()
  103. this.getRubbishType()
  104. }
  105. // 开启分享
  106. uni.showShareMenu({
  107. withShareTicket: true,
  108. menus: ['shareAppMessage', 'shareTimeline']
  109. })
  110. },
  111. computed: {
  112. },
  113. methods: {
  114. // 获取订单详情
  115. getOrderDetail() {
  116. orderDetailFind({
  117. orderReserveNo: this.orderReserveNo
  118. }).then(res => {
  119. console.log(res,'rrrrrrrr')
  120. if (res.status == 200) {
  121. this.orderInfo = res.data
  122. }
  123. })
  124. },
  125. // 获取垃圾类型数据
  126. getRubbishType() {
  127. getLookUpDatas({type:'RESERVE_RUBBISH_TYPE'}).then(res=>{
  128. console.log(res,'------rrrrrr')
  129. if(res.status == 200) {
  130. this.typeData = res.data || []
  131. this.curType = this.typeData.length ? this.typeData[0].code : ''
  132. this.getRow()
  133. } else {
  134. this.typeData = []
  135. }
  136. })
  137. },
  138. // 查询列表
  139. getRow() {
  140. reservePriceFind({code:this.curType}).then(res => {
  141. if (res.status == 200) {
  142. this.list = res.data
  143. // 纸质
  144. if(this.curType == 'PAPER'){
  145. }
  146. // 衣物
  147. if(this.curType == 'CLOTHES'){
  148. }
  149. // 金属
  150. if(this.curType == 'METAL'){
  151. }
  152. // 塑料类
  153. if(this.curType == 'PLASTIC'){
  154. }
  155. } else {
  156. this.list = []
  157. this.total = 0
  158. this.noDataText = res.message
  159. }
  160. })
  161. },
  162. },
  163. }
  164. </script>
  165. <style lang="scss">
  166. .order-pages {
  167. width: 100%;
  168. height: 100vh;
  169. display: flex;
  170. flex-direction: column;
  171. background-color: #F5F5F5;
  172. .order-info {
  173. width: 100%;
  174. flex: 1;
  175. overflow-y: scroll;
  176. // 订单内容
  177. .info-main{
  178. background: #ffffff;
  179. padding: 10upx 32upx;
  180. margin: 20upx 32upx;
  181. border-radius: 24upx;
  182. box-shadow: 1px 1px 3px #EEEEEE;
  183. font-size: 28upx;
  184. background-image: url(../../static/order_bg_stor.png);
  185. background-repeat: no-repeat;
  186. height: 260rpx;
  187. .new-left{
  188. width: 360rpx;
  189. font-size: 36rpx;
  190. color: #191919;
  191. font-weight: 600;
  192. line-height: 44rpx;
  193. margin-top: 30rpx;
  194. }
  195. .time{
  196. padding: 20rpx 0;
  197. font-size: 32rpx;
  198. color: #7C7D7E;
  199. margin-top: 20rpx;
  200. view:last-child{
  201. font-size: 28rpx;
  202. color: #4C4C4C;
  203. margin-left: 6rpx;
  204. }
  205. }
  206. }
  207. // 状态
  208. .order-status {
  209. padding: 30upx 0;
  210. text-align: center;
  211. .status-title {
  212. font-size: 42upx;
  213. color: #191919;
  214. .icon{
  215. width: 48rpx;
  216. height: 48rpx;
  217. margin-right: 10rpx;
  218. }
  219. }
  220. .status-care {
  221. font-size: 28upx;
  222. margin-top: 10upx;
  223. color: #191919;
  224. >text {
  225. color: red;
  226. }
  227. }
  228. }
  229. // 订单信息列
  230. .item-info{
  231. border-radius: 24rpx;
  232. margin: 0rpx 32rpx 20rpx;
  233. padding: 0rpx 32rpx;
  234. background-color: #fff;
  235. .item-title{
  236. font-size: 32rpx;
  237. color: #181818;
  238. padding-top: 28rpx;
  239. .care{
  240. font-size: 24rpx;
  241. color: #FF2C5C;
  242. margin-top: 10rpx;
  243. }
  244. }
  245. .table{
  246. padding: 20rpx 0;
  247. display: flex;
  248. font-size: 28rpx;
  249. view{
  250. width: 33%;
  251. text-align: center;
  252. }
  253. }
  254. .item{
  255. padding: 28rpx 0;
  256. font-size: 32rpx;
  257. border-bottom: 1px solid #EBEBEB;
  258. :first-child{
  259. color: #7C7D7E;
  260. }
  261. :last-child-child{
  262. color: #222222;
  263. }
  264. &:last-child{
  265. border-bottom: none;
  266. }
  267. .input-left{
  268. padding: 6rpx;
  269. border-bottom: 1px solid #707070;
  270. }
  271. .item-type{
  272. padding: 0 20rpx;
  273. height: 56rpx;
  274. border: 1px solid #979797;
  275. opacity: 1;
  276. border-radius: 28rpx;
  277. font-size: 24rpx;
  278. color: #999999;
  279. text-align: center;
  280. line-height: 56rpx;
  281. margin-right: 20rpx;
  282. }
  283. .item-type.active{
  284. background-color: #4F88F7;
  285. border: none;
  286. color: #fff;
  287. }
  288. }
  289. }
  290. .price-text {
  291. font-size: 20upx;
  292. margin-left: 10upx;
  293. }
  294. .price-num {
  295. font-size: 32upx;
  296. color: red;
  297. font-weight: 600;
  298. margin-right: 6rpx;
  299. }
  300. .u-cell {
  301. padding: 10rpx 32rpx;
  302. }
  303. }
  304. .footer {
  305. padding: 20rpx 32rpx;
  306. display: flex;
  307. background-color: #fff;
  308. .btn{
  309. flex: 1;
  310. height: 84rpx;
  311. font-size: 32rpx;
  312. text-align: center;
  313. line-height: 84rpx;
  314. }
  315. .btnCancleStyle{
  316. color: #666666;
  317. background: #E5E5E5;
  318. border-radius: 60rpx 0px 0px 60rpx;
  319. }
  320. .btnPayStyle{
  321. color: #191919;
  322. background: #FFD100;
  323. border-radius: 0rpx 60px 60px 0rpx;
  324. }
  325. .useBtn{
  326. width: 100%;
  327. height: 84rpx;
  328. font-size: 32rpx;
  329. text-align: center;
  330. line-height: 84rpx;
  331. color: #191919;
  332. background: #FFD100;
  333. border-radius: 60rpx
  334. }
  335. }
  336. }
  337. </style>