index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959
  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.$set(that, `dialog`, {
  377. show: false,
  378. type: '1'
  379. })
  380. },
  381. onSubmit() {
  382. const that = this;
  383. that.clearPage();
  384. that.search();
  385. that.$set(that, `dialog`, {
  386. show: false,
  387. type: '1'
  388. })
  389. },
  390. // 订单详细信息
  391. toView(item, type) {
  392. const that = this;
  393. that.clearPage();
  394. if (type == 'order') {
  395. uni.navigateTo({
  396. url: `/pagesMy/dough/info?id=${item._id}`
  397. })
  398. } else {
  399. uni.navigateTo({
  400. url: `/pagesMy/order/afterInfo?id=${item._id}&status=${'1'}`
  401. })
  402. }
  403. },
  404. // 取消订单-未支付||取消订单-已支付
  405. toCancel(e) {
  406. const that = this;
  407. uni.showModal({
  408. title: '提示',
  409. content: '确定取消订单吗?',
  410. success: async function(res) {
  411. if (res.confirm) {
  412. if (e.status == '0') {
  413. const arr = await that.$api(`/orderDeal/cancel`, 'POST', {
  414. order_id: e._id
  415. }, 'group');
  416. if (arr.errcode == '0') {
  417. uni.showToast({
  418. title: '申请取消订单完成',
  419. icon: 'none'
  420. })
  421. that.clearPage();
  422. that.search();
  423. } else {
  424. uni.showToast({
  425. title: arr.errmsg,
  426. icon: 'none'
  427. })
  428. }
  429. } else {
  430. if (e.is_afterSale != true) {
  431. let arr = await that.$api(`/groupAfterSale`, 'POST', {
  432. order: e._id,
  433. type: '4'
  434. }, 'group')
  435. if (arr.errcode == '0') {
  436. uni.showToast({
  437. title: '申请取消订单完成',
  438. icon: 'none'
  439. })
  440. that.clearPage();
  441. that.search();
  442. } else {
  443. uni.showToast({
  444. title: arr.errmsg,
  445. icon: 'none'
  446. })
  447. }
  448. } else {
  449. uni.showToast({
  450. title: `该订单有售后处理中`,
  451. icon: 'none'
  452. })
  453. }
  454. }
  455. }
  456. }
  457. });
  458. },
  459. // 支付
  460. async toPay(e) {
  461. const that = this;
  462. let system = that.system;
  463. if (system.uniPlatform == "mp-weixin") {
  464. uni.showLoading({
  465. title: '加载中'
  466. })
  467. // 支付信息
  468. let p2 = await that.$api('/orderDeal/pay', 'POST', {
  469. order_id: e._id,
  470. }, 'group')
  471. if (p2.errcode == '0' && p2.data.paySign) {
  472. uni.requestPayment({
  473. "provider": "wxpay",
  474. ...p2.data,
  475. success: function(res) {
  476. uni.showToast({
  477. title: '支付成功',
  478. icon: 'none'
  479. })
  480. },
  481. fail: function(err) {
  482. uni.showToast({
  483. title: `支付失败`,
  484. icon: 'none'
  485. })
  486. },
  487. complete: function() {
  488. uni.hideLoading();
  489. that.clearPage();
  490. that.search()
  491. }
  492. })
  493. } else {
  494. uni.showToast({
  495. title: p2.errmsg || '错误信息',
  496. icon: 'none'
  497. })
  498. }
  499. } else if (res.data.uniPlatform == "app") {
  500. // app支付
  501. uni.requestPayment({
  502. provider: 'alipay',
  503. orderInfo: 'orderInfo',
  504. success: function(res) {
  505. console.log('success:' + JSON.stringify(res));
  506. },
  507. fail: function(err) {
  508. console.log('fail:' + JSON.stringify(err));
  509. }
  510. });
  511. } else {
  512. uni.showToast({
  513. title: `平台不支持支付`,
  514. icon: 'none'
  515. })
  516. }
  517. },
  518. // 查看物流
  519. toLogi(e, type) {
  520. const that = this;
  521. that.clearPage();
  522. if (type == 'order') {
  523. uni.navigateTo({
  524. url: `/pagesMy/logistics/index?id=${e._id}&type=${'groupOrder'}`
  525. })
  526. } else {
  527. uni.navigateTo({
  528. url: `/pagesMy/logistics/index?id=${e._id}&type=${'groupAfterSale'}`
  529. })
  530. }
  531. },
  532. // 确认收货
  533. async toConfirm(e, type) {
  534. const that = this;
  535. uni.showModal({
  536. title: '提示',
  537. content: '确定确认收货吗?',
  538. success: async function(res) {
  539. if (res.confirm) {
  540. let arr;
  541. if (type == 'order') {
  542. arr = await that.$api(`/groupOrder/${e._id}`, 'POST', {
  543. status: '3'
  544. }, 'group');
  545. } else {
  546. e.transport.customer_receive = true;
  547. arr = await that.$api(`/groupAfterSale/${e._id}`, 'POST', {
  548. transport: e.transport
  549. }, 'group');
  550. }
  551. if (arr.errcode == '0') {
  552. uni.showToast({
  553. title: '确认收货成功',
  554. icon: 'none'
  555. })
  556. that.clearPage();
  557. that.search();
  558. } else {
  559. uni.showToast({
  560. title: arr.errmsg,
  561. icon: 'none'
  562. })
  563. }
  564. }
  565. }
  566. });
  567. },
  568. // 拒收
  569. async toReject(e) {
  570. const that = this;
  571. uni.showModal({
  572. title: '提示',
  573. content: '确定拒收快递吗?',
  574. success: async function(res) {
  575. if (res.confirm) {
  576. let arr = await that.$api(`/groupAfterSale`, 'POST', {
  577. order: e._id,
  578. type: '5'
  579. }, 'group')
  580. if (arr.errcode == '0') {
  581. uni.showToast({
  582. title: '拒收申请完成',
  583. icon: 'none'
  584. })
  585. that.clearPage();
  586. that.search();
  587. } else {
  588. uni.showToast({
  589. title: arr.errmsg,
  590. icon: 'none'
  591. })
  592. }
  593. }
  594. }
  595. });
  596. },
  597. // 立即评价
  598. toAppraise(e) {
  599. const that = this;
  600. that.clearPage();
  601. uni.navigateTo({
  602. url: `/pagesMy/order/appraise?id=${e._id}`
  603. })
  604. },
  605. // 申请售后
  606. toAfter(e) {
  607. const that = this;
  608. if (e.is_afterSale != true) {
  609. that.clearPage();
  610. uni.navigateTo({
  611. url: `/pagesMy/order/service?id=${e._id}&status=${'-3'}`
  612. })
  613. } else {
  614. uni.showToast({
  615. title: `该订单有售后处理中`,
  616. icon: 'none'
  617. })
  618. }
  619. },
  620. // 维护单号
  621. toMaintain(e) {
  622. uni.navigateTo({
  623. url: `/pagesMy/order/detail?id=${e._id}&status=${'1'}`
  624. })
  625. },
  626. // 取消售后
  627. toCancels(e) {
  628. const that = this;
  629. uni.showModal({
  630. title: '提示',
  631. content: '确定取消售后申请吗?',
  632. success: async function(res) {
  633. if (res.confirm) {
  634. const arr = await that.$api(`/groupAfterSale/${e._id}`, 'DELETE', {}, 'group');
  635. if (arr.errcode == '0') {
  636. uni.showToast({
  637. title: '取消售后成功',
  638. icon: 'none'
  639. })
  640. that.clearPage();
  641. that.search();
  642. } else {
  643. uni.showToast({
  644. title: arr.errmsg,
  645. icon: 'none'
  646. })
  647. }
  648. }
  649. }
  650. });
  651. },
  652. toHandle(e) {
  653. const that = this;
  654. that.clearPage();
  655. uni.navigateTo({
  656. url: `/pagesMy/dough/handle?id=${e._id}`
  657. })
  658. },
  659. // 分页
  660. toPage(e) {
  661. const that = this;
  662. let list = that.list;
  663. let limit = that.limit;
  664. if (that.total > list.length) {
  665. uni.showLoading({
  666. title: '加载中',
  667. mask: true
  668. })
  669. let page = that.page + 1;
  670. that.$set(that, `page`, page)
  671. let skip = page * limit;
  672. that.$set(that, `skip`, skip)
  673. that.search();
  674. uni.hideLoading();
  675. } else {}
  676. },
  677. // 选择选项卡
  678. tabsChange(e) {
  679. const that = this;
  680. that.$set(that.tabs, `active`, e.active)
  681. that.$set(that, `searchInfo`, {})
  682. that.$set(that, `status_name`, '')
  683. that.clearPage();
  684. that.search()
  685. },
  686. // 查询其他信息
  687. async searchOther() {
  688. const that = this;
  689. let res;
  690. // 查询状态
  691. res = await that.$api(`/dictData`, 'GET', {
  692. code: 'order_process'
  693. })
  694. if (res.errcode == '0') that.$set(that, `ostatusList`, res.data);
  695. res = await that.$api(`/dictData`, 'GET', {
  696. code: "afterSale_type"
  697. });
  698. if (res.errcode == '0') that.$set(that, `typeList`, res.data)
  699. res = await that.$api(`/dictData`, 'GET', {
  700. code: "afterSale_status"
  701. });
  702. if (res.errcode == '0') that.$set(that, `astatusList`, res.data)
  703. res = await that.$api(`/dictData`, 'GET', {
  704. code: "group_status"
  705. });
  706. if (res.errcode == '0') that.$set(that, `gstatusList`, res.data)
  707. },
  708. // 分享
  709. toShare(e) {
  710. const that = this;
  711. that.clearPage();
  712. uni.navigateTo({
  713. url: `/pagesHome/group/share?id=${e.goods._id}&group=${e._id}`
  714. })
  715. },
  716. // 清空列表
  717. clearPage() {
  718. const that = this;
  719. that.$set(that, `list`, [])
  720. that.$set(that, `skip`, 0)
  721. that.$set(that, `limit`, 6)
  722. that.$set(that, `page`, 0)
  723. }
  724. }
  725. }
  726. </script>
  727. <style lang="scss">
  728. .main {
  729. display: flex;
  730. flex-direction: column;
  731. width: 100vw;
  732. height: 100vh;
  733. .one {
  734. position: relative;
  735. flex-grow: 1;
  736. padding: 2vw 0 0 0;
  737. .tabsList {
  738. position: relative;
  739. width: 100vw;
  740. height: 90vh;
  741. .one_1 {
  742. padding: 2vw;
  743. text-align: center;
  744. button {
  745. background-color: #23B67A;
  746. color: #ffffff;
  747. }
  748. }
  749. .one_2 {
  750. .list {
  751. background-color: #fff;
  752. border: 1px solid var(--f5Color);
  753. padding: 2vw;
  754. margin: 0 2vw 2vw 2vw;
  755. border-radius: 5px;
  756. .list_1 {
  757. .list_1_1 {
  758. display: flex;
  759. justify-content: space-between;
  760. margin: 0 0 2vw 0;
  761. .shopname {
  762. text:last-child {
  763. padding: 0 0 0 2vw;
  764. }
  765. }
  766. .status {
  767. color: var(--ff0Color);
  768. }
  769. }
  770. .list_1_2 {
  771. border-bottom: 1px solid #f1f1f1;
  772. .goods {
  773. display: flex;
  774. padding: 0 0 2vw 0;
  775. .goods_1 {
  776. width: 20vw;
  777. height: 20vw;
  778. .image {
  779. width: 100%;
  780. height: 100%;
  781. border-radius: 5px;
  782. }
  783. }
  784. .goods_2 {
  785. width: 55vw;
  786. padding: 0 0 0 2vw;
  787. .goodsname {
  788. font-size: 16px;
  789. margin: 0 0 1vw 0;
  790. }
  791. .specs {
  792. font-size: 14px;
  793. color: #858585;
  794. }
  795. }
  796. .goods_3 {
  797. width: 15vw;
  798. text-align: right;
  799. .price {
  800. color: #ff0000;
  801. }
  802. }
  803. }
  804. }
  805. .other {
  806. padding: 0 0 2vw 0;
  807. margin: 2vw 0;
  808. text-align: right;
  809. border-bottom: 1px solid #f1f1f1;
  810. text {
  811. font-size: 14px;
  812. padding: 0 0 0 2vw;
  813. }
  814. }
  815. .btn {
  816. text-align: right;
  817. button {
  818. margin: 0 1vw 0 0;
  819. }
  820. }
  821. }
  822. .list_2 {
  823. .list_2_1 {
  824. display: flex;
  825. justify-content: space-between;
  826. font-size: var(--font16Size);
  827. margin: 0 0 2vw 0;
  828. .shopname {
  829. text {
  830. margin: 0 0 0 1vw;
  831. }
  832. }
  833. .type {
  834. color: var(--ff0Color);
  835. }
  836. }
  837. .list_2_2 {
  838. display: flex;
  839. justify-content: space-between;
  840. .image {
  841. width: 25vw;
  842. height: 25vw;
  843. margin: 0 2vw 1vw 0;
  844. border: 1px solid var(--f85Color);
  845. }
  846. .other {
  847. width: 65vw;
  848. flex-grow: 1;
  849. .name {
  850. font-size: var(--font16Size);
  851. margin: 0 0 1vw 0;
  852. }
  853. .other_1 {
  854. font-size: var(--font14Size);
  855. text {
  856. color: var(--f85Color);
  857. }
  858. }
  859. }
  860. }
  861. .btn {
  862. text-align: right;
  863. button {
  864. margin: 2vw 0 0 2vw;
  865. }
  866. }
  867. }
  868. }
  869. }
  870. }
  871. }
  872. }
  873. .dialog {
  874. position: fixed;
  875. width: 96vw;
  876. height: 100vh;
  877. background-color: #ffffff;
  878. z-index: 99999;
  879. display: flex;
  880. flex-direction: column;
  881. padding: 2vw;
  882. .uni-input {
  883. border: #f1f1ff 1px solid;
  884. padding: 2vw 2vw;
  885. border-radius: 1vw;
  886. }
  887. .picker {
  888. border: 1px solid #3333;
  889. border-radius: 5px;
  890. padding: 2vw;
  891. }
  892. .btn {
  893. text-align: center;
  894. button {
  895. margin: 0 2vw 2vw 2vw;
  896. background-color: #23B67A;
  897. color: #ffffff;
  898. }
  899. .name {
  900. color: var(--f85Color);
  901. font-size: var(--font14Size);
  902. }
  903. }
  904. }
  905. .scroll-view {
  906. position: absolute;
  907. top: 0;
  908. left: 0;
  909. right: 0;
  910. bottom: 0;
  911. .list-scroll-view {
  912. display: flex;
  913. flex-direction: column;
  914. }
  915. }
  916. </style>