index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963
  1. <template>
  2. <mobile-frame>
  3. <view class="main">
  4. <view class="one">
  5. <tabs :tabs="tabs" @tabsChange="tabsChange">
  6. <view class="tabsList">
  7. <scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage">
  8. <view class="list-scroll-view">
  9. <view class="one_1">
  10. <button size="mini" @tap="toDislog">查询条件</button>
  11. </view>
  12. <view class="one_2">
  13. <view class="list" v-for="(item, index) in list" :key="index">
  14. <view class="list_1" v-if="tabs.active=='0'">
  15. <view class="list_1_1">
  16. <view class="shopname">
  17. <text class="iconfont icon-shangdian"></text>
  18. <text>{{item.shop.name}}</text>
  19. </view>
  20. <view class="status">
  21. {{item.zhStatus||'暂无'}}
  22. </view>
  23. </view>
  24. <view class="list_1_2">
  25. <view class="goods">
  26. <view class="goods_1">
  27. <image class="image"
  28. v-if="item.spec.file&&item.spec.file.length>0"
  29. :src="item.spec.file&&item.spec.file.length>0?item.spec.file[0].url:''"
  30. mode=""></image>
  31. <image class="image" v-else
  32. :src="item.goods.file&&item.goods.file.length>0?item.goods.file[0].url:''"
  33. mode=""></image>
  34. </view>
  35. <view class="goods_2">
  36. <view class="goodsname textOver">
  37. {{item.goods.name}}
  38. </view>
  39. <view class="specs">
  40. {{item.spec.name}}
  41. </view>
  42. </view>
  43. <view class="goods_3">
  44. <view class="price">
  45. ¥{{item.spec.price||0}}
  46. </view>
  47. <view class="num">
  48. ×{{item.num||0}}
  49. </view>
  50. </view>
  51. </view>
  52. </view>
  53. <view class="other">
  54. <text>共{{item.num||0}}件商品</text>
  55. <text>实付款¥{{item.pay}}</text>
  56. </view>
  57. <view class="btn">
  58. <button type="default" size="mini"
  59. @tap.stop="toView(item,'order')">详细信息</button>
  60. <button v-if="item.status=='0'||item.status=='1'" size="mini"
  61. @tap.stop="toCancel(item)">取消订单</button>
  62. <button v-if="item.status=='0'" size="mini"
  63. @tap.stop="toPay(item)">支付</button>
  64. <button v-if="item.status=='2'||item.status=='3'||item.status=='2-'"
  65. size="mini" @tap.stop="toLogi(item,'order')">查看物流</button>
  66. <button v-if="item.status=='2'&&item.is_afterSale!=true" size="mini"
  67. @tap.stop="toConfirm(item,'order')">确认收货</button>
  68. <button
  69. v-if="item.status=='2'||item.status=='2-'&&item.is_afterSale!=true"
  70. size="mini" @tap.stop="toReject(item)">拒收</button>
  71. <button v-if="item.status=='3'" size="mini"
  72. @tap.stop="toAfter(item)">申请售后</button>
  73. <!-- <button v-if="item.status=='3'" type="default" size="mini"
  74. @tap.stop="toAppraise(item)">{{item.rate?'追加评价':'立即评价'}}</button> -->
  75. </view>
  76. </view>
  77. <view class="list_2" v-else-if="tabs.active=='-1'">
  78. <view class="list_2_1">
  79. <view class="shopname">
  80. <text class="iconfont icon-shangdian"></text>
  81. <text>{{item.shop.name}}</text>
  82. </view>
  83. <view class="type">
  84. {{item.zhType||'暂无'}}
  85. </view>
  86. </view>
  87. <view class="list_2_2">
  88. <image class="image" v-if="item.spec.file&&item.spec.file.length>0"
  89. :src="item.spec.file&&item.spec.file.length>0?item.spec.file[0].url:''"
  90. mode=""></image>
  91. <image class="image" v-else
  92. :src="item.goods.file&&item.goods.file.length>0?item.goods.file[0].url:''"
  93. mode=""></image>
  94. <view class="other">
  95. <view class="name textOver">
  96. {{item.goods.name||'暂无'}}
  97. </view>
  98. <view class="other_1">
  99. 商品规格:<text>{{item.goodsSpec.name||'暂无'}}</text>
  100. </view>
  101. <view class="other_1" v-if="item.type!='3'">
  102. 退款:<text>¥{{item.money||0}}</text>
  103. </view>
  104. <view class="other_1">
  105. 申请时间:<text>{{item.apply_time||'暂无'}}</text>
  106. </view>
  107. <view class="other_1">
  108. 售后类型:<text>{{item.zhStatus||'暂无'}}</text>
  109. </view>
  110. </view>
  111. </view>
  112. <view class="btn">
  113. <button type="default" size="mini"
  114. @tap.stop="toView(item,'after')">详细信息</button>
  115. <button v-if="item.status=='0'" type="default" size="mini"
  116. @tap.stop="toCancels(item)">取消售后</button>
  117. <button
  118. v-if="item.type!='1'&&item.status=='2'||item.status=='3'&&!item.transport.shop_receive"
  119. type="default" size="mini"
  120. @tap.stop="toMaintain(item)">维护单号</button>
  121. <button
  122. v-if="item.type=='3'&&item.status=='3'||item.status=='-3'&&item.transport.customer_receive==true"
  123. type="default" size="mini"
  124. @tap.stop="toLogi(item,'after')">查看物流</button>
  125. <button
  126. v-if="item.type=='3'&&item.status=='3'&&item.transport.customer_receive==true"
  127. type="default" size="mini"
  128. @tap.stop="toConfirm(item,'after')">确认收货</button>
  129. </view>
  130. </view>
  131. <view class="list_2" v-else>
  132. <view class="list_2_1">
  133. <view class="shopname">
  134. <text class="iconfont icon-shangdian"></text>
  135. <text>{{item.shop.name||'暂无'}}</text>
  136. </view>
  137. <view class="type">
  138. {{item.zhStatus||'暂无'}}
  139. </view>
  140. </view>
  141. <view class="list_2_2">
  142. <image class="image"
  143. :src="item.goods.file&&item.goods.file.length>0?item.goods.file[0].url:''"
  144. mode="">
  145. </image>
  146. <view class="other">
  147. <view class="name textOver">
  148. {{item.goods.name||'暂无'}}
  149. </view>
  150. <view class="other_1">
  151. 开始时间:<text>{{item.start_time||'暂无'}}</text>
  152. </view>
  153. <view class="other_1">
  154. 结束时间:<text>{{item.end_time||'暂无'}}</text>
  155. </view>
  156. <view class="other_1">
  157. 人数限制:<text>{{item.person_limit||'暂无'}}人</text>
  158. </view>
  159. </view>
  160. </view>
  161. <view class="btn">
  162. <button type="default" v-if="item.status=='0'" size="mini"
  163. @tap.stop="toShare(item)">分享</button>
  164. <button type="default" v-if="item.status=='0'||item.status=='1'"
  165. size="mini" @tap.stop="toHandle(item)">团处理</button>
  166. </view>
  167. </view>
  168. </view>
  169. </view>
  170. </view>
  171. </scroll-view>
  172. </view>
  173. </tabs>
  174. </view>
  175. <view class="dialog" v-if="dialog.show==true">
  176. <view class="dialog_1" v-if="dialog.type=='1'">
  177. <uni-forms ref="form" :modelValue="searchInfo" :rules="rules" label-width="auto">
  178. <uni-forms-item v-if="tabs.active!='-1'" label="商品名称查询" name="goods">
  179. <uni-easyinput type="text" v-model="searchInfo.goods" placeholder="请输入商品名称" />
  180. </uni-forms-item>
  181. <uni-forms-item label="状态" name="status">
  182. <picker v-if="tabs.active=='0'" class="picker" mode="selector" :range="ostatusList"
  183. @change="statusChange" range-key="label">
  184. <view>{{status_name||'请选择状态'}}</view>
  185. </picker>
  186. <picker v-else-if="tabs.active=='-1'" class="picker" mode="selector" :range="astatusList"
  187. @change="statusChange" range-key="label">
  188. <view>{{status_name||'请选择状态'}}</view>
  189. </picker>
  190. <picker v-else-if="tabs.active=='1'" class="picker" mode="selector" :range="gstatusList"
  191. @change="statusChange" range-key="label">
  192. <view>{{status_name||'请选择状态'}}</view>
  193. </picker>
  194. </uni-forms-item>
  195. </uni-forms>
  196. <view class="btn">
  197. <button type="primary" @click="onSubmit" size="mini">确定</button>
  198. <button type="primary" @click="dialogClose" size="mini">取消</button>
  199. </view>
  200. </view>
  201. </view>
  202. </view>
  203. </mobile-frame>
  204. </template>
  205. <script>
  206. import moment from 'moment';
  207. import tabs from '@/components/tabs/index.vue';
  208. export default {
  209. components: {
  210. tabs
  211. },
  212. data() {
  213. return {
  214. // 设备平台信息
  215. system: {},
  216. user: {},
  217. searchInfo: {},
  218. list: [],
  219. total: 0,
  220. skip: 0,
  221. limit: 10,
  222. page: 0,
  223. statusList: [],
  224. tabs: {
  225. active: '0',
  226. menu: [{
  227. title: '团购订单',
  228. active: '0'
  229. },
  230. {
  231. title: '团购售后',
  232. active: '-1'
  233. }
  234. ]
  235. },
  236. // 订单状态
  237. ostatusList: [],
  238. // 售后状态
  239. astatusList: [],
  240. // 团状态
  241. gstatusList: [],
  242. // 售后类型
  243. typeList: [],
  244. // 条件弹出框
  245. dialog: {
  246. show: false,
  247. type: '1'
  248. },
  249. // 状态名称
  250. status_name: '',
  251. };
  252. },
  253. onShow: async function() {
  254. const that = this;
  255. await that.searchOther();
  256. await that.watchLogin();
  257. },
  258. onPullDownRefresh: async function() {
  259. const that = this;
  260. that.clearPage();
  261. await that.search()
  262. uni.stopPullDownRefresh();
  263. },
  264. methods: {
  265. // 监听用户是否登录
  266. watchLogin() {
  267. const that = this;
  268. uni.getStorage({
  269. key: 'token',
  270. success: async function(res) {
  271. let user = that.$jwt(res.data);
  272. that.$set(that, `user`, user);
  273. if (user.is_leader == '0' && that.tabs.menu.length <= 2) {
  274. that.tabs.menu.push({
  275. title: '团长处理',
  276. active: '1'
  277. })
  278. }
  279. // 设备平台信息
  280. let config = that.$config;
  281. that.$set(that, `system`, config.system);
  282. that.search()
  283. },
  284. fail: function(err) {
  285. uni.navigateTo({
  286. url: `/pages/login/index`
  287. })
  288. }
  289. })
  290. },
  291. // 查询列表
  292. async search() {
  293. const that = this;
  294. let user = that.user;
  295. if (user._id) {
  296. let info = {
  297. skip: that.skip,
  298. limit: that.limit,
  299. }
  300. let res;
  301. if (that.tabs.active == '0') {
  302. info.customer = user._id;
  303. res = await that.$api(`/groupOrder/userView`, 'GET', {
  304. ...info,
  305. ...that.searchInfo
  306. }, 'group')
  307. if (res.errcode == '0') {
  308. let list = [...that.list, ...res.data];
  309. for (let val of list) {
  310. let status = that.ostatusList.find(i => i.value == val.status)
  311. if (status) val.zhStatus = status.label;
  312. }
  313. that.$set(that, `list`, list);
  314. that.$set(that, `total`, res.total)
  315. }
  316. } else if (that.tabs.active == '-1') {
  317. info.customer = user._id;
  318. res = await that.$api(`/groupAfterSale/userView`, 'GET', {
  319. ...info,
  320. ...that.searchInfo
  321. }, 'group')
  322. if (res.errcode == '0') {
  323. let list = [...that.list, ...res.data];
  324. for (let val of list) {
  325. let type = that.typeList.find(i => i.value == val.type)
  326. if (type) val.zhType = type.label;
  327. let status = that.astatusList.find(i => i.value == val.status)
  328. if (status) val.zhStatus = status.label;
  329. }
  330. that.$set(that, `list`, list);
  331. that.$set(that, `total`, res.total)
  332. }
  333. } else {
  334. info.leader = user._id;
  335. res = await that.$api(`/group/userView`, 'GET', {
  336. ...info,
  337. ...that.searchInfo
  338. }, 'group')
  339. if (res.errcode == '0') {
  340. let list = [...that.list, ...res.data];
  341. for (let val of list) {
  342. let status = that.gstatusList.find(i => i.value == val.status)
  343. if (status) val.zhStatus = status.label;
  344. }
  345. that.$set(that, `list`, list);
  346. that.$set(that, `total`, res.total)
  347. }
  348. }
  349. }
  350. },
  351. // 查询条件
  352. toDislog() {
  353. const that = this;
  354. that.$set(that, `searchInfo`, {})
  355. that.$set(that, `status_name`, '')
  356. that.$set(that, `dialog`, {
  357. show: true,
  358. type: '1'
  359. })
  360. },
  361. // 状态选择
  362. statusChange(e) {
  363. const that = this;
  364. let data;
  365. if (that.tabs.active == '0') data = that.ostatusList[e.detail.value];
  366. if (that.tabs.active == '-1') data = that.astatusList[e.detail.value];
  367. if (that.tabs.active == '1') data = that.gstatusList[e.detail.value];
  368. if (data) {
  369. that.$set(that.searchInfo, `status`, data.value);
  370. that.$set(that, `status_name`, data.label);
  371. }
  372. },
  373. // 关闭弹框
  374. dialogClose() {
  375. const that = this;
  376. that.clearPage();
  377. that.search();
  378. that.$set(that, `dialog`, {
  379. show: false,
  380. type: '1'
  381. })
  382. },
  383. // 查询
  384. onSubmit() {
  385. const that = this;
  386. that.clearPage();
  387. that.search();
  388. that.$set(that, `dialog`, {
  389. show: false,
  390. type: '1'
  391. })
  392. },
  393. // 订单详细信息
  394. toView(item, type) {
  395. const that = this;
  396. that.clearPage();
  397. if (type == 'order') {
  398. uni.navigateTo({
  399. url: `/pagesMy/dough/info?id=${item._id}`
  400. })
  401. } else {
  402. uni.navigateTo({
  403. url: `/pagesMy/order/afterInfo?id=${item._id}&status=${'1'}`
  404. })
  405. }
  406. },
  407. // 取消订单-未支付||取消订单-已支付
  408. toCancel(e) {
  409. const that = this;
  410. uni.showModal({
  411. title: '提示',
  412. content: '确定取消订单吗?',
  413. success: async function(res) {
  414. if (res.confirm) {
  415. if (e.status == '0') {
  416. const arr = await that.$api(`/orderDeal/cancel`, 'POST', {
  417. order_id: e._id
  418. }, 'group');
  419. if (arr.errcode == '0') {
  420. uni.showToast({
  421. title: '申请取消订单完成',
  422. icon: 'none'
  423. })
  424. that.clearPage();
  425. that.search();
  426. } else {
  427. uni.showToast({
  428. title: arr.errmsg,
  429. icon: 'none'
  430. })
  431. }
  432. } else {
  433. if (e.is_afterSale != true) {
  434. let arr = await that.$api(`/groupAfterSale`, 'POST', {
  435. order: e._id,
  436. type: '4'
  437. }, 'group')
  438. if (arr.errcode == '0') {
  439. uni.showToast({
  440. title: '申请取消订单完成',
  441. icon: 'none'
  442. })
  443. that.clearPage();
  444. that.search();
  445. } else {
  446. uni.showToast({
  447. title: arr.errmsg,
  448. icon: 'none'
  449. })
  450. }
  451. } else {
  452. uni.showToast({
  453. title: `该订单有售后处理中`,
  454. icon: 'none'
  455. })
  456. }
  457. }
  458. }
  459. }
  460. });
  461. },
  462. // 支付
  463. async toPay(e) {
  464. const that = this;
  465. let system = that.system;
  466. if (system.uniPlatform == "mp-weixin") {
  467. uni.showLoading({
  468. title: '加载中'
  469. })
  470. // 支付信息
  471. let p2 = await that.$api('/orderDeal/pay', 'POST', {
  472. order_id: e._id,
  473. }, 'group')
  474. if (p2.errcode == '0' && p2.data.paySign) {
  475. uni.requestPayment({
  476. "provider": "wxpay",
  477. ...p2.data,
  478. success: function(res) {
  479. uni.showToast({
  480. title: '支付成功',
  481. icon: 'none'
  482. })
  483. },
  484. fail: function(err) {
  485. uni.showToast({
  486. title: `支付失败`,
  487. icon: 'none'
  488. })
  489. },
  490. complete: function() {
  491. uni.hideLoading();
  492. that.clearPage();
  493. that.search()
  494. }
  495. })
  496. } else {
  497. uni.showToast({
  498. title: p2.errmsg || '错误信息',
  499. icon: 'none'
  500. })
  501. }
  502. } else if (res.data.uniPlatform == "app") {
  503. // app支付
  504. uni.requestPayment({
  505. provider: 'alipay',
  506. orderInfo: 'orderInfo',
  507. success: function(res) {
  508. console.log('success:' + JSON.stringify(res));
  509. },
  510. fail: function(err) {
  511. console.log('fail:' + JSON.stringify(err));
  512. }
  513. });
  514. } else {
  515. uni.showToast({
  516. title: `平台不支持支付`,
  517. icon: 'none'
  518. })
  519. }
  520. },
  521. // 查看物流
  522. toLogi(e, type) {
  523. const that = this;
  524. that.clearPage();
  525. if (type == 'order') {
  526. uni.navigateTo({
  527. url: `/pagesMy/logistics/index?id=${e._id}&type=${'groupOrder'}`
  528. })
  529. } else {
  530. uni.navigateTo({
  531. url: `/pagesMy/logistics/index?id=${e._id}&type=${'groupAfterSale'}`
  532. })
  533. }
  534. },
  535. // 确认收货
  536. async toConfirm(e, type) {
  537. const that = this;
  538. uni.showModal({
  539. title: '提示',
  540. content: '确定确认收货吗?',
  541. success: async function(res) {
  542. if (res.confirm) {
  543. let arr;
  544. if (type == 'order') {
  545. arr = await that.$api(`/groupOrder/${e._id}`, 'POST', {
  546. status: '3'
  547. }, 'group');
  548. } else {
  549. e.transport.customer_receive = true;
  550. arr = await that.$api(`/groupAfterSale/${e._id}`, 'POST', {
  551. transport: e.transport
  552. }, 'group');
  553. }
  554. if (arr.errcode == '0') {
  555. uni.showToast({
  556. title: '确认收货成功',
  557. icon: 'none'
  558. })
  559. that.clearPage();
  560. that.search();
  561. } else {
  562. uni.showToast({
  563. title: arr.errmsg,
  564. icon: 'none'
  565. })
  566. }
  567. }
  568. }
  569. });
  570. },
  571. // 拒收
  572. async toReject(e) {
  573. const that = this;
  574. uni.showModal({
  575. title: '提示',
  576. content: '确定拒收快递吗?',
  577. success: async function(res) {
  578. if (res.confirm) {
  579. let arr = await that.$api(`/groupAfterSale`, 'POST', {
  580. order: e._id,
  581. type: '5'
  582. }, 'group')
  583. if (arr.errcode == '0') {
  584. uni.showToast({
  585. title: '拒收申请完成',
  586. icon: 'none'
  587. })
  588. that.clearPage();
  589. that.search();
  590. } else {
  591. uni.showToast({
  592. title: arr.errmsg,
  593. icon: 'none'
  594. })
  595. }
  596. }
  597. }
  598. });
  599. },
  600. // 立即评价
  601. toAppraise(e) {
  602. const that = this;
  603. that.clearPage();
  604. uni.navigateTo({
  605. url: `/pagesMy/order/appraise?id=${e._id}`
  606. })
  607. },
  608. // 申请售后
  609. toAfter(e) {
  610. const that = this;
  611. if (e.is_afterSale != true) {
  612. that.clearPage();
  613. uni.navigateTo({
  614. url: `/pagesMy/order/service?id=${e._id}&status=${'-3'}`
  615. })
  616. } else {
  617. uni.showToast({
  618. title: `该订单有售后处理中`,
  619. icon: 'none'
  620. })
  621. }
  622. },
  623. // 维护单号
  624. toMaintain(e) {
  625. uni.navigateTo({
  626. url: `/pagesMy/order/detail?id=${e._id}&status=${'1'}`
  627. })
  628. },
  629. // 取消售后
  630. toCancels(e) {
  631. const that = this;
  632. uni.showModal({
  633. title: '提示',
  634. content: '确定取消售后申请吗?',
  635. success: async function(res) {
  636. if (res.confirm) {
  637. const arr = await that.$api(`/groupAfterSale/${e._id}`, 'DELETE', {}, 'group');
  638. if (arr.errcode == '0') {
  639. uni.showToast({
  640. title: '取消售后成功',
  641. icon: 'none'
  642. })
  643. that.clearPage();
  644. that.search();
  645. } else {
  646. uni.showToast({
  647. title: arr.errmsg,
  648. icon: 'none'
  649. })
  650. }
  651. }
  652. }
  653. });
  654. },
  655. // 团处理
  656. toHandle(e) {
  657. const that = this;
  658. that.clearPage();
  659. uni.navigateTo({
  660. url: `/pagesMy/dough/handle?id=${e._id}`
  661. })
  662. },
  663. // 分页
  664. toPage(e) {
  665. const that = this;
  666. let list = that.list;
  667. let limit = that.limit;
  668. if (that.total > list.length) {
  669. uni.showLoading({
  670. title: '加载中',
  671. mask: true
  672. })
  673. let page = that.page + 1;
  674. that.$set(that, `page`, page)
  675. let skip = page * limit;
  676. that.$set(that, `skip`, skip)
  677. that.search();
  678. uni.hideLoading();
  679. } else {}
  680. },
  681. // 选择选项卡
  682. tabsChange(e) {
  683. const that = this;
  684. that.$set(that.tabs, `active`, e.active)
  685. that.$set(that, `searchInfo`, {})
  686. that.$set(that, `status_name`, '')
  687. that.clearPage();
  688. that.search()
  689. },
  690. // 查询其他信息
  691. async searchOther() {
  692. const that = this;
  693. let res;
  694. // 查询状态
  695. res = await that.$api(`/dictData`, 'GET', {
  696. code: 'order_process'
  697. })
  698. if (res.errcode == '0') that.$set(that, `ostatusList`, res.data);
  699. res = await that.$api(`/dictData`, 'GET', {
  700. code: "afterSale_type"
  701. });
  702. if (res.errcode == '0') that.$set(that, `typeList`, res.data)
  703. res = await that.$api(`/dictData`, 'GET', {
  704. code: "afterSale_status"
  705. });
  706. if (res.errcode == '0') that.$set(that, `astatusList`, res.data)
  707. res = await that.$api(`/dictData`, 'GET', {
  708. code: "group_status"
  709. });
  710. if (res.errcode == '0') that.$set(that, `gstatusList`, res.data)
  711. },
  712. // 分享
  713. toShare(e) {
  714. const that = this;
  715. that.clearPage();
  716. uni.navigateTo({
  717. url: `/pagesHome/group/share?id=${e.goods._id}&group=${e._id}`
  718. })
  719. },
  720. // 清空列表
  721. clearPage() {
  722. const that = this;
  723. that.$set(that, `list`, [])
  724. that.$set(that, `skip`, 0)
  725. that.$set(that, `limit`, 6)
  726. that.$set(that, `page`, 0)
  727. }
  728. }
  729. }
  730. </script>
  731. <style lang="scss">
  732. .main {
  733. display: flex;
  734. flex-direction: column;
  735. width: 100vw;
  736. height: 100vh;
  737. .one {
  738. position: relative;
  739. flex-grow: 1;
  740. padding: 2vw 0 0 0;
  741. .tabsList {
  742. position: relative;
  743. width: 100vw;
  744. height: 90vh;
  745. .one_1 {
  746. padding: 2vw;
  747. text-align: center;
  748. button {
  749. background-color: #23B67A;
  750. color: #ffffff;
  751. }
  752. }
  753. .one_2 {
  754. .list {
  755. background-color: #fff;
  756. border: 1px solid var(--f5Color);
  757. padding: 2vw;
  758. margin: 0 2vw 2vw 2vw;
  759. border-radius: 5px;
  760. .list_1 {
  761. .list_1_1 {
  762. display: flex;
  763. justify-content: space-between;
  764. margin: 0 0 2vw 0;
  765. .shopname {
  766. text:last-child {
  767. padding: 0 0 0 2vw;
  768. }
  769. }
  770. .status {
  771. color: var(--ff0Color);
  772. }
  773. }
  774. .list_1_2 {
  775. border-bottom: 1px solid #f1f1f1;
  776. .goods {
  777. display: flex;
  778. padding: 0 0 2vw 0;
  779. .goods_1 {
  780. width: 20vw;
  781. height: 20vw;
  782. .image {
  783. width: 100%;
  784. height: 100%;
  785. border-radius: 5px;
  786. }
  787. }
  788. .goods_2 {
  789. width: 55vw;
  790. padding: 0 0 0 2vw;
  791. .goodsname {
  792. font-size: 16px;
  793. margin: 0 0 1vw 0;
  794. }
  795. .specs {
  796. font-size: 14px;
  797. color: #858585;
  798. }
  799. }
  800. .goods_3 {
  801. width: 15vw;
  802. text-align: right;
  803. .price {
  804. color: #ff0000;
  805. }
  806. }
  807. }
  808. }
  809. .other {
  810. padding: 0 0 2vw 0;
  811. margin: 2vw 0;
  812. text-align: right;
  813. border-bottom: 1px solid #f1f1f1;
  814. text {
  815. font-size: 14px;
  816. padding: 0 0 0 2vw;
  817. }
  818. }
  819. .btn {
  820. text-align: right;
  821. button {
  822. margin: 0 1vw 0 0;
  823. }
  824. }
  825. }
  826. .list_2 {
  827. .list_2_1 {
  828. display: flex;
  829. justify-content: space-between;
  830. font-size: var(--font16Size);
  831. margin: 0 0 2vw 0;
  832. .shopname {
  833. text {
  834. margin: 0 0 0 1vw;
  835. }
  836. }
  837. .type {
  838. color: var(--ff0Color);
  839. }
  840. }
  841. .list_2_2 {
  842. display: flex;
  843. justify-content: space-between;
  844. .image {
  845. width: 25vw;
  846. height: 25vw;
  847. margin: 0 2vw 1vw 0;
  848. border: 1px solid var(--f85Color);
  849. }
  850. .other {
  851. width: 65vw;
  852. flex-grow: 1;
  853. .name {
  854. font-size: var(--font16Size);
  855. margin: 0 0 1vw 0;
  856. }
  857. .other_1 {
  858. font-size: var(--font14Size);
  859. text {
  860. color: var(--f85Color);
  861. }
  862. }
  863. }
  864. }
  865. .btn {
  866. text-align: right;
  867. button {
  868. margin: 2vw 0 0 2vw;
  869. }
  870. }
  871. }
  872. }
  873. }
  874. }
  875. }
  876. }
  877. .dialog {
  878. position: fixed;
  879. width: 96vw;
  880. height: 100vh;
  881. background-color: #ffffff;
  882. z-index: 99999;
  883. display: flex;
  884. flex-direction: column;
  885. padding: 2vw;
  886. .uni-input {
  887. border: #f1f1ff 1px solid;
  888. padding: 2vw 2vw;
  889. border-radius: 1vw;
  890. }
  891. .picker {
  892. border: 1px solid #3333;
  893. border-radius: 5px;
  894. padding: 2vw;
  895. }
  896. .btn {
  897. text-align: center;
  898. button {
  899. margin: 0 2vw 2vw 2vw;
  900. background-color: #23B67A;
  901. color: #ffffff;
  902. }
  903. .name {
  904. color: var(--f85Color);
  905. font-size: var(--font14Size);
  906. }
  907. }
  908. }
  909. .scroll-view {
  910. position: absolute;
  911. top: 0;
  912. left: 0;
  913. right: 0;
  914. bottom: 0;
  915. .list-scroll-view {
  916. display: flex;
  917. flex-direction: column;
  918. }
  919. }
  920. </style>