orderDetail.vue 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341
  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 || goodType == 3"></u-cell-item>
  48. <u-cell-item title="优惠券" :value="'-¥' + orderData.couponDiscountAmount" :arrow="false" :border-bottom="false" v-if="goodType == 1 || goodType == 3"></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, // 1是普通商品类型;2是包含自助采摘+普通商品的类型;3是拍卖、共享种植
  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.replace(/\-/g, '/')).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. if (this.orderData.merchantInfoResVO.products.every(v=>{v.productType != 3})) {
  207. this.goodType = 1
  208. } else {
  209. this.goodType = 3
  210. }
  211. } else {
  212. this.goodType = 2
  213. }
  214. switch (JSON.stringify(this.orderData.orderStatus)) {
  215. case '1':
  216. if (this.goodType == 3) {
  217. this.buttonGroup = [{
  218. text: '取消订单',
  219. backgroundColor: '#75BD60',
  220. color: '#fff'
  221. }, {
  222. text: '立即支付',
  223. backgroundColor: '#52A63A',
  224. color: '#fff'
  225. }, {
  226. text: '自助采摘',
  227. backgroundColor: '#75BD60',
  228. color: '#fff'
  229. }]
  230. } else {
  231. this.buttonGroup = [{
  232. text: '取消订单',
  233. backgroundColor: '#75BD60',
  234. color: '#fff'
  235. }, {
  236. text: '立即支付',
  237. backgroundColor: '#52A63A',
  238. color: '#fff'
  239. }]
  240. }
  241. break;
  242. case '2':
  243. var someVaule = this.orderData.merchantInfoResVO.products.some(v => {
  244. Number(v.productType)
  245. return v.productType == 1
  246. })
  247. if (!someVaule) {
  248. if (this.orderData.merchantInfoResVO.products.every(v => {
  249. Number(v.productType)
  250. return v.productType == 3
  251. })) {
  252. this.buttonGroup = [{
  253. text: '申请售后',
  254. backgroundColor: '#75BD60',
  255. color: '#fff'
  256. }, {
  257. text: '自助采摘',
  258. backgroundColor: '#52A63A',
  259. color: '#fff'
  260. }]
  261. } else {
  262. this.buttonGroup = [{
  263. text: '申请售后',
  264. backgroundColor: '#75BD60',
  265. color: '#fff'
  266. }]
  267. }
  268. } else {
  269. this.buttonGroup = [{
  270. text: '申请售后',
  271. backgroundColor: '#75BD60',
  272. color: '#fff'
  273. }]
  274. }
  275. break;
  276. case '3':
  277. this.buttonGroup = [{
  278. text: '申请售后',
  279. backgroundColor: '#52A63A',
  280. color: '#fff'
  281. }, {
  282. text: '确认收货',
  283. backgroundColor: '#52A63A',
  284. color: '#fff'
  285. }, {
  286. text: '追踪物流',
  287. backgroundColor: '#52A63A',
  288. color: '#fff'
  289. }]
  290. break;
  291. case '4':
  292. if (this.orderData.merchantInfoResVO.products.every(v => {
  293. Number(v.productType)
  294. return v.productType == 4
  295. })) {
  296. this.buttonGroup = [{
  297. text: '申请售后',
  298. backgroundColor: '#75BD60',
  299. color: '#fff'
  300. }, {
  301. text: '我的种植',
  302. backgroundColor: '#52A63A',
  303. color: '#fff'
  304. }]
  305. } else {
  306. this.buttonGroup = [{
  307. text: '申请售后',
  308. backgroundColor: '#75BD60',
  309. color: '#fff'
  310. }]
  311. }
  312. break;
  313. default:
  314. this.buttonGroup = [{
  315. text: '申请售后',
  316. backgroundColor: '#52A63A',
  317. color: '#fff'
  318. }]
  319. }
  320. if (this.orderData.orderStatus == 4 && this.orderData.evaluateReplyStatus == 1) {
  321. if (this.orderData.orderType !=3 && this.orderData.orderType !=4)
  322. this.buttonGroup.push({
  323. text: '评价',
  324. backgroundColor: '#52A63A',
  325. color: '#fff'
  326. })
  327. }
  328. this.getOrderType()
  329. }).catch(error => {
  330. this.$refs.uTips.show({
  331. title: error.data.msg,
  332. type: 'warning',
  333. })
  334. })
  335. // this.getOrderType()
  336. },
  337. onShow() {},
  338. methods: {
  339. closeSetting:function(){
  340. this.show_qx=true;
  341. },
  342. // 获取订单类型
  343. getOrderType() {
  344. if (!this.orderData.auctionStatus) {
  345. switch (this.orderData.orderStatus) {
  346. case 1:
  347. this.orderType = {
  348. title: '等待买家付款',
  349. text: '订单将于' + this.orderData.overTime + '关闭',
  350. date: this.orderData.overTime
  351. }
  352. break;
  353. case 2:
  354. this.orderType = {
  355. title: '等待卖家发货',
  356. text: '您的商品正在打包等待发货',
  357. }
  358. break;
  359. case 3:
  360. this.orderType = {
  361. title: '等待商品送达',
  362. text: '您的商品已发出正在路上,请耐心等待',
  363. }
  364. break;
  365. case 4:
  366. this.orderType = {
  367. title: '商品已送达',
  368. text: '',
  369. }
  370. break;
  371. case 5:
  372. this.orderType = {
  373. title: '交易已完成',
  374. text: '',
  375. }
  376. break;
  377. default:
  378. this.orderType = {
  379. title: '交易已取消',
  380. text: '',
  381. }
  382. }
  383. } else {
  384. switch (this.orderData.auctionStatus) {
  385. case 1:
  386. this.orderType = {
  387. title: '竞拍中',
  388. text: '',
  389. }
  390. break;
  391. case 2:
  392. switch (this.orderData.orderStatus) {
  393. case 2:
  394. this.orderType = {
  395. title: '竞拍成功-等待卖家发货',
  396. text: '您的商品正在打包等待发货',
  397. }
  398. break;
  399. case 3:
  400. this.orderType = {
  401. title: '竞拍成功-等待商品送达',
  402. text: '您的商品已发出正在路上,请耐心等待',
  403. }
  404. break;
  405. case 4:
  406. this.orderType = {
  407. title: '竞拍成功-商品已送达',
  408. text: '',
  409. }
  410. break;
  411. case 5:
  412. this.orderType = {
  413. title: '竞拍成功-交易已完成',
  414. text: '',
  415. }
  416. break;
  417. }
  418. break;
  419. case 3:
  420. this.orderType = {
  421. title: '竞拍失败',
  422. text: '',
  423. }
  424. break;
  425. }
  426. }
  427. },
  428. // 操作
  429. orderHandle(e) {
  430. if (this.orderData.orderStatus == 1) {
  431. if (e.index == 0) {
  432. // 取消订单
  433. this.modalContent = '请确定是否取消订单'
  434. this.handleType = 1
  435. this.modalShow = true
  436. } else if (e.index == 1) {
  437. // 立即支付
  438. this.modalContent = '请确定是否立即支付'
  439. this.handleType = 2
  440. this.modalShow = true
  441. } else if (e.index == 2) {
  442. // 跳转自助采摘
  443. this.goPickVideo()
  444. }
  445. } else {
  446. if (e.index == 0) {
  447. // 申请售后
  448. NET.request(API.applyService, {
  449. tenantCode: this.orderData.tenantCode
  450. }, 'GET').then(res => {
  451. uni.makePhoneCall({
  452. phoneNumber: res.data.contactTel
  453. });
  454. }).catch(error => {
  455. this.$refs.uTips.show({
  456. title: error.data.msg,
  457. type: 'warning',
  458. })
  459. })
  460. } else {
  461. if (this.orderData.orderStatus == 2) {
  462. // 自助采摘
  463. this.goPickVideo()
  464. } else if (this.orderData.orderStatus == 3) {
  465. if (e.index == 1) {
  466. // 确认收货
  467. this.modalContent = '请确定是否确认收货'
  468. this.handleType = 3
  469. this.modalShow = true
  470. } else {
  471. // 追踪物流
  472. uni.navigateTo({
  473. url: '/pagesMain/logisticsDeatil?logisticCode=' + this.orderData.logisticsNum
  474. });
  475. }
  476. } else if (this.orderData.orderStatus == 4) {
  477. if (e.index == 1) {
  478. // 去我的种植
  479. uni.navigateTo({
  480. url: '/pagesGood/goodDetails?minePlant=true&goodId=' + this.orderData.merchantInfoResVO.products[0].productId + '&orderId=' + this.orderData.orderId
  481. });
  482. }
  483. } else {
  484. // 评价
  485. uni.navigateTo({
  486. url: '/pagesMain/evaluateForm?orderId=' + this.orderData.orderId + '&tenantCode=' + this.orderData.tenantCode +
  487. '&productIds=' + this.orderData.merchantInfoResVO.products.map(site => {
  488. return site.productId
  489. }).join(',')
  490. });
  491. }
  492. }
  493. }
  494. },
  495. // 状态流转
  496. submitHandle() {
  497. if (this.handleType == 1) {
  498. // 取消订单
  499. NET.request(API.cancelOrder, {
  500. orderId: this.orderData.orderId
  501. }, 'GET').then(res => {
  502. this.modalShow = false
  503. this.$refs.uTips.show({
  504. title: '取消订单成功',
  505. type: 'success',
  506. })
  507. setTimeout(() => {
  508. uni.reLaunch({
  509. url: '/pagesMain/orderList?type=' + 1
  510. });
  511. }, 1000)
  512. }).catch(error => {
  513. this.modalShow = false
  514. this.$refs.uTips.show({
  515. title: error.data.msg,
  516. type: 'warning',
  517. })
  518. })
  519. } else if (this.handleType == 2) {
  520. // 立即支付
  521. NET.request(API.payOrder, {
  522. mid: uni.getStorageSync("userData").userId,
  523. orderCode: this.orderData.orderCode,
  524. orderId: this.orderData.orderId,
  525. // #ifdef APP-PLUS
  526. channel: 2
  527. //#endif
  528. }, 'POST').then(res => {
  529. this.modalShow = false
  530. // #ifdef MP-WEIXIN
  531. uni.requestPayment({
  532. provider: 'wxpay',
  533. timeStamp: res.data.timeStamp,
  534. nonceStr: res.data.nonceStr,
  535. package: res.data.packageValue,
  536. signType: res.data.signType,
  537. paySign: res.data.paySign,
  538. success: (payRes) => {
  539. console.log('success:' + JSON.stringify(payRes));
  540. // if (this.goodType == 3) {
  541. // uni.navigateTo({
  542. // url: '/pagesMain/paySuccess?orderId=' + this.orderData.orderId + '&goodType=' + this.goodType + '&tenantCode=' + this.orderData.tenantCode
  543. // });
  544. // } else {
  545. uni.navigateTo({
  546. url: '/pagesMain/paySuccess?orderId=' + this.orderData.orderId
  547. });
  548. // }
  549. },
  550. fail: (error) => {
  551. console.log('fail:' + JSON.stringify(error));
  552. this.$refs.uTips.show({
  553. title: '支付失败',
  554. type: 'warning',
  555. })
  556. }
  557. })
  558. //#endif
  559. // #ifdef APP-PLUS
  560. uni.requestPayment({
  561. provider: 'wxpay',
  562. orderInfo:{
  563. "package": res.data.packageValue,
  564. "appid": res.data.appId,
  565. "sign": res.data.paySign,
  566. "partnerid": res.data.partnerId,
  567. "prepayid": res.data.prepayId,
  568. "noncestr": res.data.nonceStr,
  569. "timestamp": res.data.timeStamp,
  570. }
  571. success: (payRes) => {
  572. console.log('success:' + JSON.stringify(payRes));
  573. uni.navigateTo({
  574. url: '/pagesMain/paySuccess?orderId=' + this.orderData.orderId
  575. });
  576. },
  577. fail: (error) => {
  578. console.log('fail:' + JSON.stringify(error));
  579. this.$refs.uTips.show({
  580. title: '支付失败',
  581. type: 'warning',
  582. })
  583. }
  584. })
  585. // #endif
  586. }).catch(error => {
  587. this.modalShow = false
  588. this.$refs.uTips.show({
  589. title: error.data.msg,
  590. type: 'warning',
  591. })
  592. })
  593. // setTimeout(() => {
  594. // uni.reLaunch({
  595. // url: '/pagesMain/orderList?type=' + 3
  596. // });
  597. // }, 1000)
  598. } else if (this.handleType == 3) {
  599. // 确认收货
  600. NET.request(API.confirmOrder, {
  601. orderId: this.orderData.orderId
  602. }, 'GET').then(res => {
  603. this.modalShow = false
  604. this.$refs.uTips.show({
  605. title: '确认收货成功',
  606. type: 'success',
  607. })
  608. setTimeout(() => {
  609. uni.reLaunch({
  610. url: '/pagesMain/orderList?type=' + 5
  611. });
  612. }, 1000)
  613. }).catch(error => {
  614. this.modalShow = false
  615. this.$refs.uTips.show({
  616. title: error.data.msg,
  617. type: 'warning',
  618. })
  619. })
  620. }
  621. },
  622. // 跳转自助采摘直播
  623. goPickVideo() {
  624. var that=this;
  625. if(uni.getStorageSync("firstTimeLiveUser")==""){
  626. uni.setStorage({
  627. key: 'firstTimeLiveUser',
  628. data: 1
  629. })
  630. uni.navigateTo({
  631. url: '/pagesGood/pickVideo?orderId=' + that.orderData.orderId + '&tenantCode=' + that.orderData.tenantCode
  632. });
  633. }else{
  634. wx.getSetting({
  635. success(res) {
  636. /*if (!res.authSetting['scope.camera']){
  637. that.show_qx=false;
  638. }else*/
  639. if (!res.authSetting['scope.record']){
  640. that.show_qx=false;
  641. }else{
  642. uni.navigateTo({
  643. url: '/pagesGood/pickVideo?orderId=' + that.orderData.orderId + '&tenantCode=' + that.orderData.tenantCode
  644. });
  645. }
  646. }
  647. })
  648. }
  649. },
  650. // 跳转留言列表
  651. goToMessage() {
  652. uni.navigateTo({
  653. url: '/pagesMain/messageList?orderId=' + this.orderData.orderId + '&tenantCode=' + this.orderData.tenantCode
  654. });
  655. },
  656. // 跳转商铺
  657. gotoShop() {
  658. if (this.orderData.tenantCode != 'admin') {
  659. if (this.orderData.merchantInfoResVO.products.length) {
  660. uni.navigateTo({
  661. url: '/pagesGood/shopDetails?goodId=' + this.orderData.merchantInfoResVO.products[0].productId
  662. });
  663. }
  664. }
  665. },
  666. // 图片预览
  667. _previewImage(image,index) {
  668. var imgArr = [];
  669. imgArr.push(image);
  670. //预览图片
  671. uni.previewImage({
  672. urls: imgArr,
  673. current: imgArr[index]
  674. });
  675. }
  676. }
  677. }
  678. </script>
  679. <style>
  680. page {
  681. background-color: #f7f7f7;
  682. }
  683. </style>
  684. <style lang="less" scoped>
  685. page {
  686. width: 100%;
  687. height: 100%;
  688. }
  689. .container {
  690. width: 100%;
  691. height: 100%;
  692. float: left;
  693. background-color: #f7f7f7;
  694. // box-sizing: border-box;
  695. padding-bottom: 50px;
  696. overflow-y: auto;
  697. .order-type-info {
  698. width: 100%;
  699. height: 115px;
  700. float: left;
  701. box-sizing: border-box;
  702. padding: 22px 100px 0 15px;
  703. background: #52A63A;
  704. border-radius: 0px 0px 20px 20px;
  705. background-size: 62px;
  706. background-position: calc(100% - 48px) 12px;
  707. background-repeat: no-repeat;
  708. background-image: url(@/static/images/orderDetail.png);
  709. .order-type-title {
  710. width: 100%;
  711. float: left;
  712. height: 20px;
  713. line-height: 20px;
  714. font-size: 15px;
  715. font-family: PingFang SC;
  716. color: #FFFFFF;
  717. margin-bottom: 4px;
  718. }
  719. .order-type-text {
  720. width: 100%;
  721. float: left;
  722. height: 20px;
  723. line-height: 20px;
  724. font-size: 12px;
  725. font-family: PingFang SC;
  726. color: #FFFFFF;
  727. }
  728. }
  729. .address-info-box {
  730. width: calc(100% - 30px);
  731. float: left;
  732. box-sizing: border-box;
  733. padding: 16px 18px 16px 16px;
  734. margin: -34px 15px 10px 15px;
  735. background: #FFFFFF;
  736. border-radius: 10px;
  737. .address-icon {
  738. width: 36px;
  739. height: 40px;
  740. float: left;
  741. align-items: center;
  742. display: flex;
  743. .iconfont {
  744. color: #52A63A;
  745. font-size: 36px;
  746. }
  747. }
  748. .address-content {
  749. width: calc(100% - 56px);
  750. height: 40px;
  751. float: left;
  752. margin: 0 8px 0 12px;
  753. .address-info {
  754. height: 20px;
  755. font-family: PingFang SC;
  756. line-height: 20px;
  757. overflow: hidden;
  758. text-overflow: ellipsis;
  759. white-space: nowrap;
  760. .address-name {
  761. font-size: 16px;
  762. color: #333333;
  763. margin-right: 14px;
  764. }
  765. .address-phone {
  766. font-size: 12px;
  767. color: #666666;
  768. }
  769. }
  770. .address-detail {
  771. height: 20px;
  772. font-size: 16px;
  773. font-family: PingFang SC;
  774. color: #333333;
  775. line-height: 20px;
  776. overflow: hidden;
  777. text-overflow: ellipsis;
  778. white-space: nowrap;
  779. }
  780. }
  781. }
  782. .goods-info-box {
  783. width: calc(100% - 30px);
  784. float: left;
  785. margin: 0 15px 10px 15px;
  786. background: #FFFFFF;
  787. border-radius: 10px;
  788. .shop-info {
  789. width: 100%;
  790. height: 48px;
  791. float: left;
  792. box-sizing: border-box;
  793. padding: 13px 15px 12px 15px;
  794. border-bottom: 1px solid #EEEEEE;
  795. line-height: 22px;
  796. .icondianpu {
  797. font-size: 22px;
  798. color: #333333;
  799. }
  800. .shop-name {
  801. font-size: 15px;
  802. font-family: PingFang SC;
  803. color: #333333;
  804. margin: 0 8px 0 10px;
  805. }
  806. .iconshangjia {
  807. font-size: 12px;
  808. color: #999999;
  809. }
  810. }
  811. .goods-list {
  812. width: 100%;
  813. float: left;
  814. box-sizing: border-box;
  815. padding: 10px 15px 0 15px;
  816. .goods-row {
  817. width: 100%;
  818. height: 90px;
  819. float: left;
  820. display: flex;
  821. margin-bottom: 10px;
  822. .goods-img {
  823. width: 90px;
  824. height: 90px;
  825. border-radius: 5px;
  826. object-fit: cover;
  827. }
  828. .goods-info {
  829. width: calc(100% - 106px);
  830. height: 90px;
  831. margin-left: 16px;
  832. .goods-name {
  833. width: 100%;
  834. height: 36px;
  835. float: left;
  836. font-size: 14px;
  837. font-family: PingFang SC;
  838. color: #333333;
  839. line-height: 18px;
  840. overflow: hidden;
  841. text-overflow: ellipsis;
  842. display: -webkit-box;
  843. -webkit-line-clamp: 2;
  844. -webkit-box-orient: vertical;
  845. word-wrap: break-word;
  846. }
  847. .goods-type {
  848. height: 20px;
  849. float: left;
  850. background: #F0F0F0;
  851. border-radius: 4px;
  852. padding: 0 8px;
  853. margin: 6px 0;
  854. font-size: 10px;
  855. font-family: PingFang SC;
  856. color: #666666;
  857. line-height: 20px;
  858. }
  859. .plant-area {
  860. height: 20px;
  861. float: right;
  862. margin: 6px 0;
  863. font-size: 12px;
  864. font-family: PingFang SC;
  865. color: #333333;
  866. }
  867. .goods-price-number {
  868. width: 100%;
  869. height: 20px;
  870. float: left;
  871. line-height: 20px;
  872. font-family: PingFang SC;
  873. color: #333333;
  874. .goods-unit {
  875. font-size: 12px;
  876. }
  877. .goods-price {
  878. font-size: 15px;
  879. margin-right: 6px;
  880. }
  881. .goods-number {
  882. font-size: 12px;
  883. }
  884. }
  885. .plant-text {
  886. float: right;
  887. font-size: 12px;
  888. font-family: PingFang SC;
  889. color: #333333;
  890. }
  891. }
  892. }
  893. }
  894. .order-info {
  895. width: 100%;
  896. float: left;
  897. /deep/.u-cell {
  898. padding: 6px 16px;
  899. }
  900. }
  901. .pay-info {
  902. width: 100%;
  903. height: 46px;
  904. float: left;
  905. box-sizing: border-box;
  906. border-top: 1px solid #EEEEEE;
  907. padding-right: 15px;
  908. line-height: 44px;
  909. font-family: PingFang SC;
  910. font-size: 14px;
  911. text-align: right;
  912. white-space: nowrap;
  913. .pay-text {
  914. float: left;
  915. color: #333333;
  916. margin-left: 15px;
  917. }
  918. .pay-price {
  919. color: #52A63A;
  920. }
  921. }
  922. }
  923. .order-info-box {
  924. width: calc(100% - 30px);
  925. float: left;
  926. margin: 0 15px 10px 15px;
  927. background: #FFFFFF;
  928. border-radius: 10px;
  929. .info-title-box {
  930. width: 100%;
  931. height: 48px;
  932. float: left;
  933. box-sizing: border-box;
  934. padding: 15px 15px 14px 15px;
  935. border-bottom: 1px solid #EEEEEE;
  936. line-height: 18px;
  937. white-space: nowrap;
  938. .info-title {
  939. height: 18px;
  940. float: left;
  941. font-size: 15px;
  942. font-family: PingFang SC;
  943. color: #333333;
  944. margin-right: 8px;
  945. padding-left: 10px;
  946. border-left: 2px solid #74BD60;
  947. }
  948. .iconfangxiang {
  949. float: right;
  950. font-size: 12px;
  951. color: #999999;
  952. }
  953. }
  954. .info-content-box {
  955. width: 100%;
  956. float: left;
  957. padding: 15px 0;
  958. .message-row {
  959. width: 100%;
  960. float: left;
  961. box-sizing: border-box;
  962. padding: 0 15px;
  963. margin-bottom: 15px;
  964. .message-head {
  965. width: 50px;
  966. height: 50px;
  967. object-fit: cover;
  968. float: left;
  969. border-radius: 50%;
  970. overflow: hidden;
  971. }
  972. .message-info-box {
  973. width: calc(100% - 75px);
  974. float: right;
  975. .message-name {
  976. width: 50%;
  977. height: 30px;
  978. float: left;
  979. font-size: 15px;
  980. font-family: PingFang SC;
  981. color: #333333;
  982. line-height: 30px;
  983. overflow: hidden;
  984. text-overflow: ellipsis;
  985. white-space: nowrap;
  986. }
  987. .message-date {
  988. width: 50%;
  989. height: 30px;
  990. float: left;
  991. font-size: 12px;
  992. font-family: PingFang SC;
  993. color: #666666;
  994. text-align: right;
  995. line-height: 30px;
  996. overflow: hidden;
  997. text-overflow: ellipsis;
  998. white-space: nowrap;
  999. }
  1000. .message-text {
  1001. width: 100%;
  1002. height: 20px;
  1003. float: left;
  1004. font-size: 12px;
  1005. font-family: PingFang SC;
  1006. color: #666666;
  1007. line-height: 20px;
  1008. overflow: hidden;
  1009. text-overflow: ellipsis;
  1010. white-space: nowrap;
  1011. }
  1012. .message-img-box {
  1013. width: 100%;
  1014. float: left;
  1015. .message-img {
  1016. width: 76px;
  1017. height: 76px;
  1018. object-fit: cover;
  1019. float: left;
  1020. margin: 0 10px 10px 0;
  1021. }
  1022. }
  1023. }
  1024. }
  1025. .message-row:last-child {
  1026. margin-bottom: 0;
  1027. }
  1028. .order-info-row {
  1029. width: 100%;
  1030. float: left;
  1031. box-sizing: border-box;
  1032. padding: 0 15px;
  1033. font-size: 12px;
  1034. font-family: PingFang SC;
  1035. color: #333333;
  1036. line-height: 26px;
  1037. word-break: break-all;
  1038. }
  1039. }
  1040. .assess-row {
  1041. width: calc(100% - 30px);
  1042. margin: 0 15px;
  1043. float: left;
  1044. // border-top: 1px solid #F6F6F6;
  1045. padding: 12px 0;
  1046. .assess-head {
  1047. width: 50px;
  1048. height: 50px;
  1049. float: left;
  1050. object-fit: cover;
  1051. border-radius: 50%;
  1052. }
  1053. .assess-info {
  1054. width: calc(100% - 62px);
  1055. margin-left: 12px;
  1056. float: left;
  1057. .assess-name {
  1058. height: 18px;
  1059. float: left;
  1060. line-height: 18px;
  1061. font-size: 15px;
  1062. font-family: PingFang SC;
  1063. font-weight: bold;
  1064. color: #343434;
  1065. }
  1066. .assess-date {
  1067. height: 18px;
  1068. float: right;
  1069. line-height: 18px;
  1070. font-size: 12px;
  1071. font-family: PingFang SC;
  1072. font-weight: bold;
  1073. color: #666666;
  1074. }
  1075. .assess-sore-box {
  1076. width: 100%;
  1077. height: 16px;
  1078. float: left;
  1079. margin: 6px 0;
  1080. }
  1081. .assess-text {
  1082. width: 100%;
  1083. float: left;
  1084. font-size: 12px;
  1085. font-family: PingFang SC;
  1086. font-weight: bold;
  1087. color: #666666;
  1088. line-height: 16px;
  1089. margin: 8px 0 10px 0;
  1090. overflow: hidden;
  1091. text-overflow: ellipsis;
  1092. display: -webkit-box;
  1093. -webkit-line-clamp: 2;
  1094. -webkit-box-orient: vertical;
  1095. word-wrap: break-word;
  1096. }
  1097. .assess-img-box {
  1098. width: 100%;
  1099. float: left;
  1100. display: flex;
  1101. .img-col {
  1102. height: 60px;
  1103. width: 60px;
  1104. object-fit: cover;
  1105. margin: 0 10px 10px 0;
  1106. }
  1107. }
  1108. }
  1109. .shop-reply-box {
  1110. width: 100%;
  1111. float: left;
  1112. background: #F5F5F5;
  1113. border-radius: 5px;
  1114. margin-top: 10px;
  1115. .shop-head {
  1116. width: 100%;
  1117. height: 36px;
  1118. float: left;
  1119. box-sizing: border-box;
  1120. padding: 10px 12px;
  1121. .icondianpu {
  1122. width: 16px;
  1123. height: 16px;
  1124. float: left;
  1125. color: #52A63A;
  1126. font-size: 20px;
  1127. margin-right: 8px;
  1128. }
  1129. .shop-name {
  1130. height: 16px;
  1131. float: left;
  1132. font-size: 15px;
  1133. font-family: PingFang SC;
  1134. color: #52A63A;
  1135. line-height: 16px;
  1136. }
  1137. }
  1138. .shop-reply {
  1139. width: 100%;
  1140. float: left;
  1141. box-sizing: border-box;
  1142. padding: 0 12px 12px 12px;
  1143. font-size: 12px;
  1144. font-family: PingFang SC;
  1145. color: #666666;
  1146. line-height: 16px;
  1147. }
  1148. }
  1149. }
  1150. }
  1151. .order-handle {
  1152. width: 100%;
  1153. height: 50px;
  1154. float: left;
  1155. border-top: 1px solid #cccccc;
  1156. position: fixed;
  1157. bottom: 0;
  1158. left:0;
  1159. }
  1160. }
  1161. .uni-popup-dialog {
  1162. width: 80vw;
  1163. border-radius: 15px;
  1164. background-color: #fff;
  1165. position: fixed;
  1166. margin-left: 10vw;
  1167. top: 34vh;
  1168. z-index: 1001;
  1169. }
  1170. .uni-dialog-title {
  1171. /* #ifndef APP-NVUE */
  1172. display: flex;
  1173. /* #endif */
  1174. flex-direction: row;
  1175. justify-content: center;
  1176. padding-top: 15px;
  1177. padding-bottom: 5px;
  1178. }
  1179. .uni-dialog-title-text {
  1180. font-size: 16px;
  1181. font-weight: 500;
  1182. }
  1183. .uni-dialog-content {
  1184. /* #ifndef APP-NVUE */
  1185. display: flex;
  1186. /* #endif */
  1187. flex-direction: row;
  1188. justify-content: center;
  1189. align-items: center;
  1190. padding: 5px 15px 15px 15px;
  1191. text-align: center;
  1192. }
  1193. .uni-dialog-content-text {
  1194. font-size: 14px;
  1195. color: #6e6e6e;
  1196. }
  1197. .uni-dialog-button-group {
  1198. /* #ifndef APP-NVUE */
  1199. display: flex;
  1200. /* #endif */
  1201. flex-direction: row;
  1202. border-top-color: #f5f5f5;
  1203. border-top-style: solid;
  1204. border-top-width: 1px;
  1205. }
  1206. .uni-dialog-button {
  1207. /* #ifndef APP-NVUE */
  1208. display: flex;
  1209. /* #endif */
  1210. background: rgba(0, 0, 0, 0);
  1211. border: none;
  1212. flex: 1;
  1213. flex-direction: row;
  1214. justify-content: center;
  1215. align-items: center;
  1216. height: 45px;
  1217. }
  1218. .uni-border-left {
  1219. border-left-color: #f0f0f0;
  1220. border-left-style: solid;
  1221. border-left-width: 0px;
  1222. }
  1223. .uni-dialog-button-text {
  1224. font-size: 14px;
  1225. }
  1226. .uni-button-color {
  1227. color: #007aff;
  1228. }
  1229. .uni-dialog-input {
  1230. flex: 1;
  1231. font-size: 14px;
  1232. }
  1233. .uni-popup__success {
  1234. color: #4cd964;
  1235. }
  1236. .uni-popup__warn {
  1237. color: #f0ad4e;
  1238. }
  1239. .uni-popup__error {
  1240. color: #dd524d;
  1241. }
  1242. .uni-popup__info {
  1243. color: #909399;
  1244. }
  1245. .qx_bg{
  1246. width: 100vw;
  1247. height: 100vh;
  1248. background: rgba(0, 0, 0, 0.25);
  1249. position: fixed;
  1250. top: 0px;
  1251. left: 0px;
  1252. z-index: 1000;
  1253. }
  1254. /deep/.uni-tab__cart-button-right{
  1255. border-right: 1px solid #ffffff;
  1256. }
  1257. /deep/.uni-tab__cart-button-right:last-child{
  1258. border-right: none;
  1259. }
  1260. </style>