orderDetail.vue 31 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267
  1. <template>
  2. <view class="container">
  3. <view class="order-type-info">
  4. <view class="order-type-title">{{orderType.title}}</view>
  5. <view class="order-type-text">{{orderType.text}}
  6. </view>
  7. </view>
  8. <view class="address-info-box">
  9. <view class="address-icon">
  10. <text class="iconfont icondizhi"></text>
  11. </view>
  12. <view class="address-content">
  13. <text class="address-info">
  14. <text class="address-name">{{orderData.recName}}</text>
  15. <text class="address-phone">{{orderData.recMobile}}</text>
  16. </text>
  17. <view class="address-detail">{{orderData.address}}</view>
  18. </view>
  19. </view>
  20. <view class="goods-info-box">
  21. <view class="shop-info" @click.stop="gotoShop()">
  22. <text class="iconfont icondianpu"></text>
  23. <text class="shop-name">{{orderData.merchantInfoResVO.supplierName}}</text>
  24. <text class="iconfont iconfangxiang" v-if="orderData.tenantCode != 'admin'"></text>
  25. </view>
  26. <view class="goods-list">
  27. <view class="goods-row" v-for="(item, index) in orderData.merchantInfoResVO.products" :key="index">
  28. <image class="goods-img" :src="item.imgUrl" mode="aspectFill"></image>
  29. <view class="goods-info">
  30. <view class="goods-name">{{item.productName}}</view>
  31. <view class="goods-type">
  32. 类型:{{item.productType == 1 ? '普通商品' : (item.productType == 2 ? '拍卖商品' : (item.productType == 3 ? '自助采摘' : '共享种植'))}}
  33. </view>
  34. <view class="plant-area" v-if="item.productType == 4">面积:{{item.areaSize}}㎡</view>
  35. <view class="goods-price-number">
  36. <text class="goods-unit">¥</text>
  37. <text class="goods-price">{{item.bizPrice}}</text>
  38. <text class="goods-number">x{{item.buyNum}}</text>
  39. <text class="plant-text" v-if="item.productType == 4">有效期:{{item.term}}天</text>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. <view class="order-info">
  45. <u-cell-group :border="false">
  46. <u-cell-item title="商品金额" :value="'¥' + orderData.orderSum" :arrow="false" :border-bottom="false"></u-cell-item>
  47. <u-cell-item title="积分抵扣" :value="'-¥' + orderData.integralAmount" :arrow="false" :border-bottom="false" v-if="goodType == 1"></u-cell-item>
  48. <u-cell-item title="优惠券" :value="'-¥' + orderData.couponDiscountAmount" :arrow="false" :border-bottom="false" v-if="goodType == 1"></u-cell-item>
  49. <u-cell-item title="备注" :value="orderData.notes" :arrow="false" :border-bottom="false"></u-cell-item>
  50. </u-cell-group>
  51. </view>
  52. <view class="pay-info">
  53. <text class="pay-text">实付款</text>
  54. <text class="pay-price">¥{{orderData.paySum}}</text>
  55. </view>
  56. </view>
  57. <view class="order-info-box" @click="goToMessage()">
  58. <view class="info-title-box">
  59. <view class="info-title">留言板</view>
  60. <text class="iconfont iconfangxiang"></text>
  61. </view>
  62. <view class="info-content-box">
  63. <view class="message-row" v-for="(item, index1) in orderData.leas" :key="index1">
  64. <image class="message-head" :src="item.headImg" mode="aspectFill"></image>
  65. <view class="message-info-box">
  66. <view class="message-name">{{item.name}}</view>
  67. <view class="message-date">{{item.leaMsgTime}}</view>
  68. <view class="message-text">{{item.leaMsgContent}}</view>
  69. <!-- <view class="message-img-box" v-for="(site, index2) in item.orderLeaImgResVOs" :key="index2">
  70. <image class="message-img" :src="site.imgUrl" mode="aspectFill"></image>
  71. </view> -->
  72. </view>
  73. </view>
  74. </view>
  75. </view>
  76. <view class="order-info-box">
  77. <view class="info-title-box">
  78. <view class="info-title">订单信息</view>
  79. </view>
  80. <view class="info-content-box">
  81. <view class="order-info-row">订单编号:{{orderData.orderCode}}</view>
  82. <view class="order-info-row">创建时间:{{orderData.addOrderTime}}</view>
  83. <view class="order-info-row" v-if="orderData.orderStatus > 1 && orderData.orderStatus != 6">支付时间:{{orderData.payTime ? orderData.payTime : orderData.addOrderTime}}</view>
  84. <view class="order-info-row" v-if="orderData.orderStatus > 2 && orderData.orderStatus != 6 && orderData.orderStatus != 4">发货时间:{{orderData.sendTime ? orderData.sendTime : '-'}}</view>
  85. <view class="order-info-row" v-if="orderData.orderStatus > 3 && orderData.orderStatus != 6 && orderData.orderStatus != 4">收货时间:{{orderData.confirmTime ? orderData.sendTime : '-'}}</view>
  86. <view class="order-info-row" v-if="orderData.orderStatus == 6">取消时间:{{orderData.cancelTime}}</view>
  87. </view>
  88. </view>
  89. <view class="order-info-box" v-if="orderData.evaluateResVO.evaluateContent">
  90. <view class="info-title-box">
  91. <view class="info-title">评价信息</view>
  92. </view>
  93. <view class="info-content-box">
  94. <view class="assess-row">
  95. <image class="assess-head" mode="aspectFill" :src="orderData.merchantInfoResVO.headImg"></image>
  96. <view class="assess-info">
  97. <view class="assess-name">{{orderData.nickname}}</view>
  98. <view class="assess-date">{{orderData.evaluateResVO.evaluateTime ? orderData.evaluateResVO.evaluateTime : ''}}</view>
  99. <view class="assess-sore-box">
  100. <u-rate v-model="orderData.evaluateResVO.score" active-color="#FFAE21" disabled></u-rate>
  101. </view>
  102. <view class="assess-text">{{orderData.evaluateResVO.evaluateContent ? orderData.evaluateResVO.evaluateContent : '暂无评价'}}</view>
  103. <view class="assess-img-box">
  104. <image class="img-col" mode="aspectFill" :src="item.imgUrl" v-for="(item,i) in orderData.evaluateResVO.evaluateImgs" :key="i" @tap="_previewImage(item.imgUrl,i)"></image>
  105. </view>
  106. </view>
  107. <view class="shop-reply-box" v-if="orderData.evaluateResVO.replyContent">
  108. <view class="shop-head">
  109. <view class="iconfont icondianpu"></view>
  110. <view class="shop-name">店家回复</view>
  111. </view>
  112. <view class="shop-reply">{{orderData.evaluateResVO.replyContent}}</view>
  113. </view>
  114. </view>
  115. </view>
  116. </view>
  117. <!-- </view> -->
  118. <uni-goods-nav :fill="true" :options="[]" @click="" @buttonClick="orderHandle" class="order-handle" :buttonGroup="buttonGroup" />
  119. <u-modal v-model="modalShow" :content="modalContent" @confirm="submitHandle" :async-close="true" :show-cancel-button="true"></u-modal>
  120. <u-top-tips ref="uTips"></u-top-tips>
  121. <view class="uni-popup-dialog" :hidden="show_qx">
  122. <view class="uni-dialog-title">
  123. <text class="uni-dialog-title-text">提示</text>
  124. </view>
  125. <view class="uni-dialog-content">
  126. <text class="uni-dialog-content-text">请在设置中开启摄像头权限和麦克风权限</text>
  127. </view>
  128. <view class="uni-dialog-button-group">
  129. <button class="uni-dialog-button uni-border-left" open-type="openSetting" @click="closeSetting">
  130. 设置权限
  131. </button>
  132. </view>
  133. </view>
  134. <view class="qx_bg" :hidden="show_qx">
  135. </view>
  136. </view>
  137. </template>
  138. <script>
  139. const NET = require('@/utils/request')
  140. const API = require('@/config/api')
  141. export default {
  142. components: {},
  143. data() {
  144. return {
  145. show_qx:true,
  146. orderType: {
  147. title: '',
  148. text: '',
  149. },
  150. orderData: {
  151. orderId: '',
  152. addOrderTime: '',
  153. recName: '',
  154. recMobile: '',
  155. address: '',
  156. merchantInfoResVO: {
  157. supplierName: '',
  158. products: [],
  159. },
  160. orderSum: 0,
  161. integralAmount: 0,
  162. couponDiscountAmount: 0,
  163. notes: 'xxxxx',
  164. paySum: 0,
  165. leas: [],
  166. orderCode: '',
  167. payTime: '',
  168. sendTime: '',
  169. confirmTime: '',
  170. cancelTime: '',
  171. tenantCode: '',
  172. evaluateReplyStatus: 1,
  173. },
  174. goodType: 1,
  175. buttonGroup: [],
  176. modalShow: false,
  177. handleType: '',
  178. modalContent: '',
  179. }
  180. },
  181. onLoad(options) {
  182. this.userData = uni.getStorageSync("userData")
  183. NET.request(API.getOrderDetail, {
  184. flag: 1,
  185. orderId: options.orderId,
  186. orderStatus: options.orderStatus,
  187. }, 'GET').then(res => {
  188. this.orderData = res.data
  189. if (this.orderData.addOrderTime) {
  190. let tempTime = new Date(this.orderData.addOrderTime).getTime()
  191. let addTempTime = new Date(tempTime + 1000 * 60 * 60 * 24)
  192. let addYear = addTempTime.getFullYear()
  193. let addMonth = addTempTime.getMonth() + 1
  194. let addDay = addTempTime.getDate()
  195. let addHours = addTempTime.getHours()
  196. let addMin = addTempTime.getMinutes()
  197. let addSeconds = addTempTime.getSeconds()
  198. this.orderData.overTime = addYear + '年' + addMonth + '月' + addDay + '日' + addHours + ':' + addMin + ':' +
  199. addSeconds
  200. // this.orderData.tempTimeArr = this.orderData.addOrderTime.split(' ')
  201. // let tempDate = new Date(this.orderData.tempTimeArr[0].replace(/-/g, "/"))
  202. // this.orderData.overTime = new Date(tempDate.setDate(tempDate.getDate() + 1))
  203. }
  204. if (this.orderData.merchantInfoResVO.products.length && this.orderData.merchantInfoResVO.products[0].productType !=
  205. 2 && this.orderData.merchantInfoResVO.products[0].productType != 4) {
  206. this.goodType = 1
  207. } else {
  208. this.goodType = 2
  209. }
  210. switch (JSON.stringify(this.orderData.orderStatus)) {
  211. case '1':
  212. this.buttonGroup = [{
  213. text: '取消订单',
  214. backgroundColor: '#75BD60',
  215. color: '#fff'
  216. }, {
  217. text: '立即支付',
  218. backgroundColor: '#52A63A',
  219. color: '#fff'
  220. }]
  221. break;
  222. case '2':
  223. var someVaule = this.orderData.merchantInfoResVO.products.some(v => {
  224. Number(v.productType)
  225. return v.productType == 1
  226. })
  227. if (!someVaule) {
  228. if (this.orderData.merchantInfoResVO.products.every(v => {
  229. Number(v.productType)
  230. return v.productType == 3
  231. })) {
  232. this.buttonGroup = [{
  233. text: '申请售后',
  234. backgroundColor: '#75BD60',
  235. color: '#fff'
  236. }, {
  237. text: '自助采摘',
  238. backgroundColor: '#52A63A',
  239. color: '#fff'
  240. }]
  241. } else {
  242. this.buttonGroup = [{
  243. text: '申请售后',
  244. backgroundColor: '#75BD60',
  245. color: '#fff'
  246. }]
  247. }
  248. } else {
  249. this.buttonGroup = [{
  250. text: '申请售后',
  251. backgroundColor: '#75BD60',
  252. color: '#fff'
  253. }]
  254. }
  255. break;
  256. case '3':
  257. this.buttonGroup = [{
  258. text: '申请售后',
  259. backgroundColor: '#52A63A',
  260. color: '#fff'
  261. }, {
  262. text: '确认收货',
  263. backgroundColor: '#52A63A',
  264. color: '#fff'
  265. }, {
  266. text: '追踪物流',
  267. backgroundColor: '#52A63A',
  268. color: '#fff'
  269. }]
  270. break;
  271. case '4':
  272. if (this.orderData.merchantInfoResVO.products.every(v => {
  273. Number(v.productType)
  274. return v.productType == 4
  275. })) {
  276. this.buttonGroup = [{
  277. text: '申请售后',
  278. backgroundColor: '#75BD60',
  279. color: '#fff'
  280. }, {
  281. text: '我的种植',
  282. backgroundColor: '#52A63A',
  283. color: '#fff'
  284. }]
  285. } else {
  286. this.buttonGroup = [{
  287. text: '申请售后',
  288. backgroundColor: '#75BD60',
  289. color: '#fff'
  290. }]
  291. }
  292. break;
  293. default:
  294. this.buttonGroup = [{
  295. text: '申请售后',
  296. backgroundColor: '#52A63A',
  297. color: '#fff'
  298. }]
  299. }
  300. if (this.orderData.orderStatus == 4 && this.orderData.evaluateReplyStatus == 1) {
  301. if (this.orderData.orderType !=3 && this.orderData.orderType !=4)
  302. this.buttonGroup.push({
  303. text: '评价',
  304. backgroundColor: '#52A63A',
  305. color: '#fff'
  306. })
  307. }
  308. this.getOrderType()
  309. }).catch(error => {
  310. this.$refs.uTips.show({
  311. title: error.data.msg,
  312. type: 'warning',
  313. })
  314. })
  315. // this.getOrderType()
  316. },
  317. onShow() {},
  318. methods: {
  319. closeSetting:function(){
  320. this.show_qx=true;
  321. },
  322. // 获取订单类型
  323. getOrderType() {
  324. if (!this.orderData.auctionStatus) {
  325. switch (this.orderData.orderStatus) {
  326. case 1:
  327. this.orderType = {
  328. title: '等待买家付款',
  329. text: '订单将于' + this.orderData.overTime + '关闭',
  330. date: this.orderData.overTime
  331. }
  332. break;
  333. case 2:
  334. this.orderType = {
  335. title: '等待卖家发货',
  336. text: '您的商品正在打包等待发货',
  337. }
  338. break;
  339. case 3:
  340. this.orderType = {
  341. title: '等待商品送达',
  342. text: '您的商品已发出正在路上,请耐心等待',
  343. }
  344. break;
  345. case 4:
  346. this.orderType = {
  347. title: '商品已送达',
  348. text: '',
  349. }
  350. break;
  351. case 5:
  352. this.orderType = {
  353. title: '交易已完成',
  354. text: '',
  355. }
  356. break;
  357. default:
  358. this.orderType = {
  359. title: '交易已取消',
  360. text: '',
  361. }
  362. }
  363. } else {
  364. switch (this.orderData.auctionStatus) {
  365. case 1:
  366. this.orderType = {
  367. title: '竞拍中',
  368. text: '',
  369. }
  370. break;
  371. case 2:
  372. switch (this.orderData.orderStatus) {
  373. case 2:
  374. this.orderType = {
  375. title: '竞拍成功-等待卖家发货',
  376. text: '您的商品正在打包等待发货',
  377. }
  378. break;
  379. case 3:
  380. this.orderType = {
  381. title: '竞拍成功-等待商品送达',
  382. text: '您的商品已发出正在路上,请耐心等待',
  383. }
  384. break;
  385. case 4:
  386. this.orderType = {
  387. title: '竞拍成功-商品已送达',
  388. text: '',
  389. }
  390. break;
  391. case 5:
  392. this.orderType = {
  393. title: '竞拍成功-交易已完成',
  394. text: '',
  395. }
  396. break;
  397. }
  398. break;
  399. case 3:
  400. this.orderType = {
  401. title: '竞拍失败',
  402. text: '',
  403. }
  404. break;
  405. }
  406. }
  407. },
  408. // 操作
  409. orderHandle(e) {
  410. if (this.orderData.orderStatus == 1) {
  411. if (e.index == 0) {
  412. // 取消订单
  413. this.modalContent = '请确定是否取消订单'
  414. this.handleType = 1
  415. this.modalShow = true
  416. } else if (e.index == 1) {
  417. // 立即支付
  418. this.modalContent = '请确定是否立即支付'
  419. this.handleType = 2
  420. this.modalShow = true
  421. }
  422. } else {
  423. if (e.index == 0) {
  424. // 申请售后
  425. NET.request(API.applyService, {
  426. tenantCode: this.orderData.tenantCode
  427. }, 'GET').then(res => {
  428. uni.makePhoneCall({
  429. phoneNumber: res.data.contactTel
  430. });
  431. }).catch(error => {
  432. this.$refs.uTips.show({
  433. title: error.data.msg,
  434. type: 'warning',
  435. })
  436. })
  437. } else {
  438. if (this.orderData.orderStatus == 2) {
  439. var that=this;
  440. if(uni.getStorageSync("firstTimeLiveUser")==""){
  441. uni.setStorage({
  442. key: 'firstTimeLiveUser',
  443. data: 1
  444. })
  445. uni.navigateTo({
  446. url: '/pagesGood/pickVideo?orderId=' + that.orderData.orderId + '&tenantCode=' + that.orderData.tenantCode
  447. });
  448. }else{
  449. wx.getSetting({
  450. success(res) {
  451. /*if (!res.authSetting['scope.camera']){
  452. that.show_qx=false;
  453. }else*/
  454. if (!res.authSetting['scope.record']){
  455. that.show_qx=false;
  456. }else{
  457. uni.navigateTo({
  458. url: '/pagesGood/pickVideo?orderId=' + that.orderData.orderId + '&tenantCode=' + that.orderData.tenantCode
  459. });
  460. }
  461. }
  462. })
  463. }
  464. // 自助采摘
  465. } else if (this.orderData.orderStatus == 3) {
  466. if (e.index == 1) {
  467. // 确认收货
  468. this.modalContent = '请确定是否确认收货'
  469. this.handleType = 3
  470. this.modalShow = true
  471. } else {
  472. // 追踪物流
  473. uni.navigateTo({
  474. url: '/pagesMain/logisticsDeatil?logisticCode=' + this.orderData.logisticsNum
  475. });
  476. }
  477. } else if (this.orderData.orderStatus == 4) {
  478. if (e.index == 1) {
  479. // 去我的种植
  480. uni.navigateTo({
  481. url: '/pagesGood/goodDetails?minePlant=true&goodId=' + this.orderData.merchantInfoResVO.products[0].productId + '&orderId=' + this.orderData.orderId
  482. });
  483. }
  484. } else {
  485. // 评价
  486. uni.navigateTo({
  487. url: '/pagesMain/evaluateForm?orderId=' + this.orderData.orderId + '&tenantCode=' + this.orderData.tenantCode +
  488. '&productIds=' + this.orderData.merchantInfoResVO.products.map(site => {
  489. return site.productId
  490. }).join(',')
  491. });
  492. }
  493. }
  494. }
  495. },
  496. // 状态流转
  497. submitHandle() {
  498. if (this.handleType == 1) {
  499. // 取消订单
  500. NET.request(API.cancelOrder, {
  501. orderId: this.orderData.orderId
  502. }, 'GET').then(res => {
  503. this.modalShow = false
  504. this.$refs.uTips.show({
  505. title: '取消订单成功',
  506. type: 'success',
  507. })
  508. setTimeout(() => {
  509. uni.reLaunch({
  510. url: '/pagesMain/orderList?type=' + 1
  511. });
  512. }, 1000)
  513. }).catch(error => {
  514. this.modalShow = false
  515. this.$refs.uTips.show({
  516. title: error.data.msg,
  517. type: 'warning',
  518. })
  519. })
  520. } else if (this.handleType == 2) {
  521. // 立即支付
  522. NET.request(API.payOrder, {
  523. mid: uni.getStorageSync("userData").userId,
  524. orderCode: this.orderData.orderCode,
  525. orderId: this.orderData.orderId,
  526. }, 'POST').then(res => {
  527. this.modalShow = false
  528. uni.requestPayment({
  529. provider: 'wxpay',
  530. timeStamp: res.data.timeStamp,
  531. nonceStr: res.data.nonceStr,
  532. package: res.data.packageValue,
  533. signType: res.data.signType,
  534. paySign: res.data.paySign,
  535. success: (payRes) => {
  536. console.log('success:' + JSON.stringify(payRes));
  537. uni.navigateTo({
  538. url: '/pagesMain/paySuccess?orderId=' + this.orderData.orderId
  539. });
  540. },
  541. fail: (error) => {
  542. console.log('fail:' + JSON.stringify(error));
  543. this.$refs.uTips.show({
  544. title: '支付失败',
  545. type: 'warning',
  546. })
  547. }
  548. })
  549. }).catch(error => {
  550. this.modalShow = false
  551. this.$refs.uTips.show({
  552. title: error.data.msg,
  553. type: 'warning',
  554. })
  555. })
  556. // setTimeout(() => {
  557. // uni.reLaunch({
  558. // url: '/pagesMain/orderList?type=' + 3
  559. // });
  560. // }, 1000)
  561. } else if (this.handleType == 3) {
  562. // 确认收货
  563. NET.request(API.confirmOrder, {
  564. orderId: this.orderData.orderId
  565. }, 'GET').then(res => {
  566. this.modalShow = false
  567. this.$refs.uTips.show({
  568. title: '确认收货成功',
  569. type: 'success',
  570. })
  571. setTimeout(() => {
  572. uni.reLaunch({
  573. url: '/pagesMain/orderList?type=' + 5
  574. });
  575. }, 1000)
  576. }).catch(error => {
  577. this.modalShow = false
  578. this.$refs.uTips.show({
  579. title: error.data.msg,
  580. type: 'warning',
  581. })
  582. })
  583. }
  584. },
  585. // 跳转留言列表
  586. goToMessage() {
  587. uni.navigateTo({
  588. url: '/pagesMain/messageList?orderId=' + this.orderData.orderId + '&tenantCode=' + this.orderData.tenantCode
  589. });
  590. },
  591. // 跳转商铺
  592. gotoShop() {
  593. if (this.orderData.tenantCode != 'admin') {
  594. if (this.orderData.merchantInfoResVO.products.length) {
  595. uni.navigateTo({
  596. url: '/pagesGood/shopDetails?goodId=' + this.orderData.merchantInfoResVO.products[0].productId
  597. });
  598. }
  599. }
  600. },
  601. // 图片预览
  602. _previewImage(image,index) {
  603. var imgArr = [];
  604. imgArr.push(image);
  605. //预览图片
  606. uni.previewImage({
  607. urls: imgArr,
  608. current: imgArr[index]
  609. });
  610. }
  611. }
  612. }
  613. </script>
  614. <style>
  615. page {
  616. background-color: #f7f7f7;
  617. }
  618. </style>
  619. <style lang="less" scoped>
  620. page {
  621. width: 100%;
  622. height: 100%;
  623. }
  624. .container {
  625. width: 100%;
  626. height: 100%;
  627. float: left;
  628. background-color: #f7f7f7;
  629. // box-sizing: border-box;
  630. // padding-bottom: 50px;
  631. overflow-y: auto;
  632. .order-type-info {
  633. width: 100%;
  634. height: 115px;
  635. float: left;
  636. box-sizing: border-box;
  637. padding: 22px 100px 0 15px;
  638. background: #52A63A;
  639. border-radius: 0px 0px 20px 20px;
  640. background-size: 62px;
  641. background-position: calc(100% - 48px) 12px;
  642. background-repeat: no-repeat;
  643. background-image: url(@/static/images/orderDetail.png);
  644. .order-type-title {
  645. width: 100%;
  646. float: left;
  647. height: 20px;
  648. line-height: 20px;
  649. font-size: 15px;
  650. font-family: PingFang SC;
  651. color: #FFFFFF;
  652. margin-bottom: 4px;
  653. }
  654. .order-type-text {
  655. width: 100%;
  656. float: left;
  657. height: 20px;
  658. line-height: 20px;
  659. font-size: 12px;
  660. font-family: PingFang SC;
  661. color: #FFFFFF;
  662. }
  663. }
  664. .address-info-box {
  665. width: calc(100% - 30px);
  666. float: left;
  667. box-sizing: border-box;
  668. padding: 16px 18px 16px 16px;
  669. margin: -34px 15px 10px 15px;
  670. background: #FFFFFF;
  671. border-radius: 10px;
  672. .address-icon {
  673. width: 36px;
  674. height: 40px;
  675. float: left;
  676. align-items: center;
  677. display: flex;
  678. .iconfont {
  679. color: #52A63A;
  680. font-size: 36px;
  681. }
  682. }
  683. .address-content {
  684. width: calc(100% - 56px);
  685. height: 40px;
  686. float: left;
  687. margin: 0 8px 0 12px;
  688. .address-info {
  689. height: 20px;
  690. font-family: PingFang SC;
  691. line-height: 20px;
  692. overflow: hidden;
  693. text-overflow: ellipsis;
  694. white-space: nowrap;
  695. .address-name {
  696. font-size: 16px;
  697. color: #333333;
  698. margin-right: 14px;
  699. }
  700. .address-phone {
  701. font-size: 12px;
  702. color: #666666;
  703. }
  704. }
  705. .address-detail {
  706. height: 20px;
  707. font-size: 16px;
  708. font-family: PingFang SC;
  709. color: #333333;
  710. line-height: 20px;
  711. overflow: hidden;
  712. text-overflow: ellipsis;
  713. white-space: nowrap;
  714. }
  715. }
  716. }
  717. .goods-info-box {
  718. width: calc(100% - 30px);
  719. float: left;
  720. margin: 0 15px 10px 15px;
  721. background: #FFFFFF;
  722. border-radius: 10px;
  723. .shop-info {
  724. width: 100%;
  725. height: 48px;
  726. float: left;
  727. box-sizing: border-box;
  728. padding: 13px 15px 12px 15px;
  729. border-bottom: 1px solid #EEEEEE;
  730. line-height: 22px;
  731. .icondianpu {
  732. font-size: 22px;
  733. color: #333333;
  734. }
  735. .shop-name {
  736. font-size: 15px;
  737. font-family: PingFang SC;
  738. color: #333333;
  739. margin: 0 8px 0 10px;
  740. }
  741. .iconshangjia {
  742. font-size: 12px;
  743. color: #999999;
  744. }
  745. }
  746. .goods-list {
  747. width: 100%;
  748. float: left;
  749. box-sizing: border-box;
  750. padding: 10px 15px 0 15px;
  751. .goods-row {
  752. width: 100%;
  753. height: 90px;
  754. float: left;
  755. display: flex;
  756. margin-bottom: 10px;
  757. .goods-img {
  758. width: 90px;
  759. height: 90px;
  760. border-radius: 5px;
  761. object-fit: cover;
  762. }
  763. .goods-info {
  764. width: calc(100% - 106px);
  765. height: 90px;
  766. margin-left: 16px;
  767. .goods-name {
  768. width: 100%;
  769. height: 36px;
  770. float: left;
  771. font-size: 14px;
  772. font-family: PingFang SC;
  773. color: #333333;
  774. line-height: 18px;
  775. overflow: hidden;
  776. text-overflow: ellipsis;
  777. display: -webkit-box;
  778. -webkit-line-clamp: 2;
  779. -webkit-box-orient: vertical;
  780. word-wrap: break-word;
  781. }
  782. .goods-type {
  783. height: 20px;
  784. float: left;
  785. background: #F0F0F0;
  786. border-radius: 4px;
  787. padding: 0 8px;
  788. margin: 6px 0;
  789. font-size: 10px;
  790. font-family: PingFang SC;
  791. color: #666666;
  792. line-height: 20px;
  793. }
  794. .plant-area {
  795. height: 20px;
  796. float: right;
  797. margin: 6px 0;
  798. font-size: 12px;
  799. font-family: PingFang SC;
  800. color: #333333;
  801. }
  802. .goods-price-number {
  803. width: 100%;
  804. height: 20px;
  805. float: left;
  806. line-height: 20px;
  807. font-family: PingFang SC;
  808. color: #333333;
  809. .goods-unit {
  810. font-size: 12px;
  811. }
  812. .goods-price {
  813. font-size: 15px;
  814. margin-right: 6px;
  815. }
  816. .goods-number {
  817. font-size: 12px;
  818. }
  819. }
  820. .plant-text {
  821. float: right;
  822. font-size: 12px;
  823. font-family: PingFang SC;
  824. color: #333333;
  825. }
  826. }
  827. }
  828. }
  829. .order-info {
  830. width: 100%;
  831. float: left;
  832. /deep/.u-cell {
  833. padding: 6px 16px;
  834. }
  835. }
  836. .pay-info {
  837. width: 100%;
  838. height: 46px;
  839. float: left;
  840. box-sizing: border-box;
  841. border-top: 1px solid #EEEEEE;
  842. padding-right: 15px;
  843. line-height: 44px;
  844. font-family: PingFang SC;
  845. font-size: 14px;
  846. text-align: right;
  847. white-space: nowrap;
  848. .pay-text {
  849. float: left;
  850. color: #333333;
  851. margin-left: 15px;
  852. }
  853. .pay-price {
  854. color: #52A63A;
  855. }
  856. }
  857. }
  858. .order-info-box {
  859. width: calc(100% - 30px);
  860. float: left;
  861. margin: 0 15px 10px 15px;
  862. background: #FFFFFF;
  863. border-radius: 10px;
  864. .info-title-box {
  865. width: 100%;
  866. height: 48px;
  867. float: left;
  868. box-sizing: border-box;
  869. padding: 15px 15px 14px 15px;
  870. border-bottom: 1px solid #EEEEEE;
  871. line-height: 18px;
  872. white-space: nowrap;
  873. .info-title {
  874. height: 18px;
  875. float: left;
  876. font-size: 15px;
  877. font-family: PingFang SC;
  878. color: #333333;
  879. margin-right: 8px;
  880. padding-left: 10px;
  881. border-left: 2px solid #74BD60;
  882. }
  883. .iconfangxiang {
  884. float: right;
  885. font-size: 12px;
  886. color: #999999;
  887. }
  888. }
  889. .info-content-box {
  890. width: 100%;
  891. float: left;
  892. padding: 15px 0;
  893. .message-row {
  894. width: 100%;
  895. float: left;
  896. box-sizing: border-box;
  897. padding: 0 15px;
  898. margin-bottom: 15px;
  899. .message-head {
  900. width: 50px;
  901. height: 50px;
  902. object-fit: cover;
  903. float: left;
  904. border-radius: 50%;
  905. overflow: hidden;
  906. }
  907. .message-info-box {
  908. width: calc(100% - 75px);
  909. float: right;
  910. .message-name {
  911. width: 50%;
  912. height: 30px;
  913. float: left;
  914. font-size: 15px;
  915. font-family: PingFang SC;
  916. color: #333333;
  917. line-height: 30px;
  918. overflow: hidden;
  919. text-overflow: ellipsis;
  920. white-space: nowrap;
  921. }
  922. .message-date {
  923. width: 50%;
  924. height: 30px;
  925. float: left;
  926. font-size: 12px;
  927. font-family: PingFang SC;
  928. color: #666666;
  929. text-align: right;
  930. line-height: 30px;
  931. overflow: hidden;
  932. text-overflow: ellipsis;
  933. white-space: nowrap;
  934. }
  935. .message-text {
  936. width: 100%;
  937. height: 20px;
  938. float: left;
  939. font-size: 12px;
  940. font-family: PingFang SC;
  941. color: #666666;
  942. line-height: 20px;
  943. overflow: hidden;
  944. text-overflow: ellipsis;
  945. white-space: nowrap;
  946. }
  947. .message-img-box {
  948. width: 100%;
  949. float: left;
  950. .message-img {
  951. width: 76px;
  952. height: 76px;
  953. object-fit: cover;
  954. float: left;
  955. margin: 0 10px 10px 0;
  956. }
  957. }
  958. }
  959. }
  960. .message-row:last-child {
  961. margin-bottom: 0;
  962. }
  963. .order-info-row {
  964. width: 100%;
  965. float: left;
  966. box-sizing: border-box;
  967. padding: 0 15px;
  968. font-size: 12px;
  969. font-family: PingFang SC;
  970. color: #333333;
  971. line-height: 26px;
  972. word-break: break-all;
  973. }
  974. }
  975. .assess-row {
  976. width: calc(100% - 30px);
  977. margin: 0 15px;
  978. float: left;
  979. // border-top: 1px solid #F6F6F6;
  980. padding: 12px 0;
  981. .assess-head {
  982. width: 50px;
  983. height: 50px;
  984. float: left;
  985. object-fit: cover;
  986. border-radius: 50%;
  987. }
  988. .assess-info {
  989. width: calc(100% - 62px);
  990. margin-left: 12px;
  991. float: left;
  992. .assess-name {
  993. height: 18px;
  994. float: left;
  995. line-height: 18px;
  996. font-size: 15px;
  997. font-family: PingFang SC;
  998. font-weight: bold;
  999. color: #343434;
  1000. }
  1001. .assess-date {
  1002. height: 18px;
  1003. float: right;
  1004. line-height: 18px;
  1005. font-size: 12px;
  1006. font-family: PingFang SC;
  1007. font-weight: bold;
  1008. color: #666666;
  1009. }
  1010. .assess-sore-box {
  1011. width: 100%;
  1012. height: 16px;
  1013. float: left;
  1014. margin: 6px 0;
  1015. }
  1016. .assess-text {
  1017. width: 100%;
  1018. float: left;
  1019. font-size: 12px;
  1020. font-family: PingFang SC;
  1021. font-weight: bold;
  1022. color: #666666;
  1023. line-height: 16px;
  1024. margin: 8px 0 10px 0;
  1025. overflow: hidden;
  1026. text-overflow: ellipsis;
  1027. display: -webkit-box;
  1028. -webkit-line-clamp: 2;
  1029. -webkit-box-orient: vertical;
  1030. word-wrap: break-word;
  1031. }
  1032. .assess-img-box {
  1033. width: 100%;
  1034. float: left;
  1035. display: flex;
  1036. .img-col {
  1037. height: 60px;
  1038. width: 60px;
  1039. object-fit: cover;
  1040. margin: 0 10px 10px 0;
  1041. }
  1042. }
  1043. }
  1044. .shop-reply-box {
  1045. width: 100%;
  1046. float: left;
  1047. background: #F5F5F5;
  1048. border-radius: 5px;
  1049. margin-top: 10px;
  1050. .shop-head {
  1051. width: 100%;
  1052. height: 36px;
  1053. float: left;
  1054. box-sizing: border-box;
  1055. padding: 10px 12px;
  1056. .icondianpu {
  1057. width: 16px;
  1058. height: 16px;
  1059. float: left;
  1060. color: #52A63A;
  1061. font-size: 20px;
  1062. margin-right: 8px;
  1063. }
  1064. .shop-name {
  1065. height: 16px;
  1066. float: left;
  1067. font-size: 15px;
  1068. font-family: PingFang SC;
  1069. color: #52A63A;
  1070. line-height: 16px;
  1071. }
  1072. }
  1073. .shop-reply {
  1074. width: 100%;
  1075. float: left;
  1076. box-sizing: border-box;
  1077. padding: 0 12px 12px 12px;
  1078. font-size: 12px;
  1079. font-family: PingFang SC;
  1080. color: #666666;
  1081. line-height: 16px;
  1082. }
  1083. }
  1084. }
  1085. }
  1086. .order-handle {
  1087. width: 100%;
  1088. height: 50px;
  1089. float: left;
  1090. border-top: 1px solid #cccccc;
  1091. }
  1092. }
  1093. .uni-popup-dialog {
  1094. width: 80vw;
  1095. border-radius: 15px;
  1096. background-color: #fff;
  1097. position: fixed;
  1098. margin-left: 10vw;
  1099. top: 34vh;
  1100. z-index: 1001;
  1101. }
  1102. .uni-dialog-title {
  1103. /* #ifndef APP-NVUE */
  1104. display: flex;
  1105. /* #endif */
  1106. flex-direction: row;
  1107. justify-content: center;
  1108. padding-top: 15px;
  1109. padding-bottom: 5px;
  1110. }
  1111. .uni-dialog-title-text {
  1112. font-size: 16px;
  1113. font-weight: 500;
  1114. }
  1115. .uni-dialog-content {
  1116. /* #ifndef APP-NVUE */
  1117. display: flex;
  1118. /* #endif */
  1119. flex-direction: row;
  1120. justify-content: center;
  1121. align-items: center;
  1122. padding: 5px 15px 15px 15px;
  1123. text-align: center;
  1124. }
  1125. .uni-dialog-content-text {
  1126. font-size: 14px;
  1127. color: #6e6e6e;
  1128. }
  1129. .uni-dialog-button-group {
  1130. /* #ifndef APP-NVUE */
  1131. display: flex;
  1132. /* #endif */
  1133. flex-direction: row;
  1134. border-top-color: #f5f5f5;
  1135. border-top-style: solid;
  1136. border-top-width: 1px;
  1137. }
  1138. .uni-dialog-button {
  1139. /* #ifndef APP-NVUE */
  1140. display: flex;
  1141. /* #endif */
  1142. background: rgba(0, 0, 0, 0);
  1143. border: none;
  1144. flex: 1;
  1145. flex-direction: row;
  1146. justify-content: center;
  1147. align-items: center;
  1148. height: 45px;
  1149. }
  1150. .uni-border-left {
  1151. border-left-color: #f0f0f0;
  1152. border-left-style: solid;
  1153. border-left-width: 0px;
  1154. }
  1155. .uni-dialog-button-text {
  1156. font-size: 14px;
  1157. }
  1158. .uni-button-color {
  1159. color: #007aff;
  1160. }
  1161. .uni-dialog-input {
  1162. flex: 1;
  1163. font-size: 14px;
  1164. }
  1165. .uni-popup__success {
  1166. color: #4cd964;
  1167. }
  1168. .uni-popup__warn {
  1169. color: #f0ad4e;
  1170. }
  1171. .uni-popup__error {
  1172. color: #dd524d;
  1173. }
  1174. .uni-popup__info {
  1175. color: #909399;
  1176. }
  1177. .qx_bg{
  1178. width: 100vw;
  1179. height: 100vh;
  1180. background: rgba(0, 0, 0, 0.25);
  1181. position: fixed;
  1182. top: 0px;
  1183. left: 0px;
  1184. z-index: 1000;
  1185. }
  1186. </style>