order.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852
  1. <template>
  2. <view class="content">
  3. <view class="navbar">
  4. <view v-for="(item, index) in navList" :key="index" class="nav-item" :class="{current: tabCurrentIndex === index}"
  5. @click="tabClick(index)">
  6. {{item.text}}
  7. </view>
  8. </view>
  9. <swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
  10. <swiper-item class="tab-content" v-for="(tabItem,tabIndex) in navList" :key="tabIndex">
  11. <scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
  12. <!-- 空白页 -->
  13. <empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
  14. <!-- 订单列表 -->
  15. <view v-for="(item,index) in tabItem.orderList" :key="index" class="order-item" @click="navTo('/pages/order/orderDetail?order_id='+item.order_id)">
  16. <view class="i-top b-b">
  17. <text class="time">{{item.createtime}}</text>
  18. <text class="state" :style="{color: item.stateTipColor}">{{item.stateTip + (item.refund_status_text ? ':'+item.refund_status_text : '')}} </text>
  19. <text v-if="item.state===9" class="del-btn yticon icon-lajitong" @click.stop="deleteOrder(index)"></text>
  20. </view>
  21. <view class="goods-box-single" v-for="(goodsItem, goodsIndex) in item.products"
  22. :key="goodsIndex">
  23. <image class="goods-img" :src="goodsItem.image" mode="aspectFill"></image>
  24. <view class="right">
  25. <text class="refund" v-if="goodsItem.refund">退款成功</text>
  26. <text class="title clamp">{{goodsItem.title}}</text>
  27. <text class="attr-box">{{goodsItem.spec}} x {{goodsItem.number}}</text>
  28. <text class="price">{{goodsItem.price}}</text>
  29. <button class="action-btn" v-if="item.have_received != 0 && goodsItem.evaluate == false && goodsItem.refund==false" @click.stop="button('evaluate', {order_id:item.order_id,id:goodsItem.id,image:goodsItem.image,title:goodsItem.title,spec:goodsItem.spec})">评价</button>
  30. </view>
  31. </view>
  32. <view class="price-box">
  33. <text class="num">{{quantity(item.products)}}</text>
  34. 件商品 合计
  35. <text class="price">{{item.total_price}}</text>
  36. <text v-if="item.discount_price > 0">(已优惠¥{{item.discount_price}})</text>
  37. <text v-if="item.delivery_price > 0">(含运费¥{{item.delivery_price}})</text>
  38. </view>
  39. <view class="action-box b-t" v-if="item.state != 9">
  40. <button class="action-btn" v-if="item.state == 1" @click.stop="button('cancel',item)">取消订单</button>
  41. <button class="action-btn recom" v-if="item.have_paid == 0" @click.stop="button('pay',item)">立即支付</button>
  42. <!-- <button class="action-btn" v-if="item.have_paid != 0 && item.have_delivered == 0">提醒发货</button> -->
  43. <button class="action-btn" v-if="item.have_paid != 0 && item.extend.express_number != ''" @click.stop="button('delivery',item)">查看物流</button>
  44. <button class="action-btn" @click.stop="writeOff(item)" v-if="item.status == 2 && item.have_paid != 0 && item.have_received == 0">核销</button>
  45. <button class="action-btn" v-if="item.status == 1 && item.have_paid != 0 && item.have_received == 0" @click.stop="button('recerved',item)">确认收货</button>
  46. <!-- <button class="action-btn" v-if="item.have_received != 0 && item.have_commented != 0">追加评价</button> -->
  47. <!--<button class="action-btn" v-if="item.have_paid != 0" @click.stop="button('refund', item)">申请售后</button>-->
  48. </view>
  49. <view class="action-box b-t" v-if="item.state == 9 && item.status == -1">
  50. <button class="action-btn" v-if="item.have_paid != 0" @click.stop="button('refund', item)">查看售后</button>
  51. </view>
  52. </view>
  53. <uni-load-more :status="tabItem.loadingType"></uni-load-more>
  54. </scroll-view>
  55. </swiper-item>
  56. </swiper>
  57. <view class="write_off_image_panel" v-if="isShowWriteOffImage" @click="hideWriteOffImage">
  58. <image :src="writeOffImage"></image>
  59. <button>关闭</button>
  60. </view>
  61. </view>
  62. </template>
  63. <script>
  64. import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
  65. import empty from "@/components/empty";
  66. export default {
  67. components: {
  68. uniLoadMore,
  69. empty
  70. },
  71. data() {
  72. return {
  73. tabCurrentIndex: 0,
  74. isShowWriteOffImage: false,
  75. writeOffImage: '',
  76. navList: [{
  77. state: 0,
  78. text: '全部',
  79. loadingType: 'more',
  80. orderList: [],
  81. page: 1
  82. },
  83. {
  84. state: 1,
  85. text: '待付款',
  86. loadingType: 'more',
  87. orderList: [],
  88. page: 1
  89. },
  90. {
  91. state: 2,
  92. text: '待发货',
  93. loadingType: 'more',
  94. orderList: [],
  95. page: 1
  96. },
  97. {
  98. state: 3,
  99. text: '待收货',
  100. loadingType: 'more',
  101. orderList: [],
  102. page: 1
  103. },
  104. {
  105. state: 4,
  106. text: '评价',
  107. loadingType: 'more',
  108. orderList: [],
  109. page: 1
  110. },
  111. /*
  112. {
  113. state: 5,
  114. text: '售后',
  115. loadingType: 'more',
  116. orderList: [],
  117. page: 1
  118. }
  119. */
  120. ],
  121. pageSize: 10
  122. };
  123. },
  124. onLoad(options) {
  125. /**
  126. * 修复app端点击除全部订单外的按钮进入时不加载数据的问题
  127. * 替换onLoad下代码即可
  128. */
  129. this.tabCurrentIndex = +options.state;
  130. // #ifndef MP
  131. this.loadData()
  132. // #endif
  133. // #ifdef MP
  134. if (options.state == 0) {
  135. this.loadData()
  136. }
  137. // #endif
  138. },
  139. onPullDownRefresh() {
  140. this.pullDownRefresh()
  141. },
  142. methods: {
  143. //获取订单列表
  144. async loadData(source) {
  145. //这里是将订单挂载到tab列表下
  146. let index = this.tabCurrentIndex;
  147. let navItem = this.navList[index];
  148. let state = navItem.state;
  149. if (source === 'tabChange' && navItem.loaded === true) {
  150. //tab切换只有第一次需要加载数据
  151. return;
  152. }
  153. if (navItem.loadingType === 'loading') {
  154. //防止重复加载
  155. return;
  156. }
  157. if (navItem.loadingType == 'noMore') {
  158. //没有更多数据
  159. return;
  160. }
  161. navItem.loadingType = 'loading';
  162. let result = await this.$api.request('/order/getOrders', 'GET', {
  163. type:0,
  164. state: state,
  165. page: navItem.page,
  166. pagesize: this.pageSize
  167. });
  168. uni.stopPullDownRefresh();
  169. if (!result) {
  170. navItem.loadingType = 'more';
  171. } else {
  172. //console.log(result)
  173. if (result.length >= this.pageSize) {
  174. //判断是否还有数据, 有改为 more, 没有改为noMore
  175. navItem.loadingType = 'more';
  176. } else {
  177. navItem.loadingType = 'noMore';
  178. }
  179. // 页数加一
  180. navItem.page++;
  181. result.forEach(item => {
  182. item = Object.assign(item, this.orderStateExp(item.state));
  183. navItem.orderList.push(item);
  184. });
  185. //loaded新字段用于表示数据加载完毕,如果为空可以显示空白页
  186. this.$set(navItem, 'loaded', true);
  187. }
  188. },
  189. //swiper 切换
  190. changeTab(e) {
  191. this.tabCurrentIndex = e.target.current;
  192. this.loadData('tabChange');
  193. },
  194. //顶部tab点击
  195. tabClick(index) {
  196. this.tabCurrentIndex = index;
  197. },
  198. async writeOff(item){
  199. const order_id = item.order_id;
  200. let access_token = uni.getStorageSync('access_token');
  201. let result = await this.$api.request('/order/writeOff', 'POST', {
  202. order_id: order_id,
  203. access_token: access_token,
  204. env_version: 'trial'
  205. });
  206. if(result) {
  207. this.isShowWriteOffImage = true;
  208. this.writeOffImage = result.base64;
  209. }
  210. },
  211. //删除订单
  212. async deleteOrder(index) {
  213. let [error, res] = await uni.showModal({
  214. title: '确认删除订单'
  215. });
  216. if (res.confirm) {
  217. let order_id = this.navList[this.tabCurrentIndex].orderList[index].order_id;
  218. let result = await this.$api.request('/order/delete?order_id=' + order_id)
  219. if (result) {
  220. this.navList[this.tabCurrentIndex].orderList.splice(index, 1);
  221. }
  222. }
  223. },
  224. //取消订单
  225. async cancelOrder(item) {
  226. let that = this;
  227. let [error, res] = await uni.showModal({
  228. title: '确认取消订单',
  229. content: '取消之后不可恢复',
  230. });
  231. if (res.confirm) {
  232. let result = await that.$api.request('/order/cancel?order_id=' + item.order_id);
  233. if (result) {
  234. let {
  235. stateTip,
  236. stateTipColor
  237. } = that.orderStateExp(9);
  238. item = Object.assign(item, {
  239. state: 9,
  240. stateTip,
  241. stateTipColor
  242. });
  243. // 更新全部订单里面的状态
  244. let position = that.navList[0].orderList.findIndex(val => val.order_id === item.order_id);
  245. if (position !== -1) {
  246. that.navList[0].orderList[position] = item;
  247. }
  248. //取消订单后删除待付款中该项
  249. let list = that.navList[1].orderList;
  250. let index = list.findIndex(val => val.order_id === item.order_id);
  251. index !== -1 && list.splice(index, 1);
  252. }
  253. return true;
  254. }
  255. //this.$api.msg('取消失败');
  256. return false;
  257. },
  258. // 收货
  259. async receivedOrder(item) {
  260. let that = this;
  261. let [error, res] = await uni.showModal({
  262. title: '确认收货'
  263. });
  264. if (res.confirm == true) {
  265. let res = await that.$api.request('/order/received', 'GET', {
  266. order_id: item.order_id
  267. });
  268. if (res) {
  269. // 已确认收货
  270. let {
  271. stateTip,
  272. stateTipColor
  273. } = that.orderStateExp(4);
  274. // 更新全部订单里面的状态
  275. let position = that.navList[0].orderList.findIndex(val => val.order_id === item.order_id);
  276. if (position !== -1) {
  277. let item = that.navList[0].orderList[position];
  278. console.log(item);
  279. that.navList[0].orderList[position] = Object.assign(item, {
  280. state: 4,
  281. stateTip,
  282. stateTipColor,
  283. have_received: 1
  284. });
  285. }
  286. //收货订单后删除待收货中该项
  287. let list = that.navList[3].orderList;
  288. let index = list.findIndex(val => val.order_id === item.order_id);
  289. index !== -1 && list.splice(index, 1);
  290. }
  291. return true;
  292. }
  293. this.$api.msg('收货失败');
  294. return false;
  295. },
  296. // 订单状态文字和颜色
  297. orderStateExp(state) {
  298. let stateTip = '',
  299. stateTipColor = '#fa436a';
  300. switch (+state) {
  301. case 0:
  302. stateTip = '交易成功';
  303. break;
  304. case 1:
  305. stateTip = '待付款';
  306. break;
  307. case 2:
  308. stateTip = '待发货';
  309. break;
  310. case 3:
  311. stateTip = '待收货';
  312. break;
  313. case 4:
  314. stateTip = '待评价';
  315. break;
  316. case 5:
  317. stateTip = '售后';
  318. break;
  319. case 6:
  320. stateTip = '拒绝退款';
  321. break;
  322. case 9:
  323. stateTip = '订单已关闭';
  324. stateTipColor = '#909399';
  325. break;
  326. //更多自定义
  327. }
  328. return {
  329. stateTip,
  330. stateTipColor
  331. };
  332. },
  333. // 计算当前订单有多少个商品
  334. quantity(products) {
  335. let number = 0;
  336. for (let i in products) {
  337. number += parseInt(products[i].number);
  338. }
  339. return number;
  340. },
  341. navTo(url) {
  342. this.$api.navTo(url);
  343. },
  344. // 下面的一排按钮
  345. button(action, item) {
  346. switch (action) {
  347. case 'cancel':
  348. this.cancelOrder(item);
  349. break;
  350. case 'pay':
  351. this.navTo('/pages/money/pay?order_id=' + item.order_id + '&total=' + item.total_price);
  352. break;
  353. case 'delivery':
  354. this.navTo('/pages/order/express?expresssn=' + item.extend.express_number + '&express=' + item.extend.express_company);
  355. break;
  356. case 'recerved':
  357. this.receivedOrder(item);
  358. break;
  359. case 'evaluate':
  360. this.$api.navTo('/pages/order/evaluate?product_id='+item.id+'&order_id='+item.order_id+'&image='+item.image+'&title='+item.title+'&spec='+item.spec);
  361. break;
  362. case 'refund':
  363. this.$api.navTo('/pages/order/refund?order_id=' + item.order_id);
  364. break;
  365. }
  366. },
  367. pullDownRefresh() {
  368. this.navList = [];
  369. this.navList = [{
  370. state: 0,
  371. text: '全部',
  372. loadingType: 'more',
  373. orderList: [],
  374. page: 1
  375. },
  376. {
  377. state: 1,
  378. text: '待付款',
  379. loadingType: 'more',
  380. orderList: [],
  381. page: 1
  382. },
  383. {
  384. state: 2,
  385. text: '待发货',
  386. loadingType: 'more',
  387. orderList: [],
  388. page: 1
  389. },
  390. {
  391. state: 3,
  392. text: '待收货',
  393. loadingType: 'more',
  394. orderList: [],
  395. page: 1
  396. },
  397. {
  398. state: 4,
  399. text: '评价',
  400. loadingType: 'more',
  401. orderList: [],
  402. page: 1
  403. },
  404. {
  405. state: 5,
  406. text: '售后',
  407. loadingType: 'more',
  408. orderList: [],
  409. page: 1
  410. }
  411. ];
  412. this.loadData();
  413. },
  414. hideWriteOffImage () {
  415. this.isShowWriteOffImage = false;
  416. }
  417. },
  418. }
  419. </script>
  420. <style lang="scss">
  421. page,
  422. .content {
  423. background: $page-color-base;
  424. height: 100%;
  425. }
  426. .swiper-box {
  427. height: calc(100% - 40px);
  428. }
  429. .list-scroll-content {
  430. height: 100%;
  431. }
  432. .navbar {
  433. display: flex;
  434. height: 40px;
  435. padding: 0 5px;
  436. background: #fff;
  437. box-shadow: 0 1px 5px rgba(0, 0, 0, .06);
  438. position: relative;
  439. z-index: 10;
  440. .nav-item {
  441. flex: 1;
  442. display: flex;
  443. justify-content: center;
  444. align-items: center;
  445. height: 100%;
  446. font-size: 15px;
  447. color: $font-color-dark;
  448. position: relative;
  449. &.current {
  450. color: $base-color;
  451. &:after {
  452. content: '';
  453. position: absolute;
  454. left: 50%;
  455. bottom: 0;
  456. transform: translateX(-50%);
  457. width: 44px;
  458. height: 0;
  459. border-bottom: 2px solid $base-color;
  460. }
  461. }
  462. }
  463. }
  464. .uni-swiper-item {
  465. height: auto;
  466. }
  467. .order-item {
  468. display: flex;
  469. flex-direction: column;
  470. padding-left: 30upx;
  471. background: #fff;
  472. margin-top: 16upx;
  473. .i-top {
  474. display: flex;
  475. align-items: center;
  476. height: 80upx;
  477. padding-right: 30upx;
  478. font-size: $font-base;
  479. color: $font-color-dark;
  480. position: relative;
  481. .time {
  482. flex: 1;
  483. }
  484. .state {
  485. color: $base-color;
  486. }
  487. .del-btn {
  488. padding: 10upx 0 10upx 36upx;
  489. font-size: $font-lg;
  490. color: $font-color-light;
  491. position: relative;
  492. &:after {
  493. content: '';
  494. width: 0;
  495. height: 30upx;
  496. border-left: 1px solid $border-color-dark;
  497. position: absolute;
  498. left: 20upx;
  499. top: 50%;
  500. transform: translateY(-50%);
  501. }
  502. }
  503. }
  504. /* 多条商品 */
  505. .goods-box {
  506. height: 160upx;
  507. padding: 20upx 0;
  508. white-space: nowrap;
  509. .goods-item {
  510. width: 120upx;
  511. height: 120upx;
  512. display: inline-block;
  513. margin-right: 24upx;
  514. }
  515. .goods-img {
  516. display: block;
  517. width: 100%;
  518. height: 100%;
  519. }
  520. }
  521. /* 单条商品 */
  522. .goods-box-single {
  523. display: flex;
  524. padding: 20upx 0;
  525. .goods-img {
  526. display: block;
  527. width: 120upx;
  528. height: 120upx;
  529. }
  530. .right {
  531. flex: 1;
  532. display: flex;
  533. flex-direction: column;
  534. padding: 0 30upx 0 24upx;
  535. overflow: hidden;
  536. position: relative;
  537. .title {
  538. font-size: $font-base + 2upx;
  539. color: $font-color-dark;
  540. line-height: 1;
  541. }
  542. .attr-box {
  543. font-size: $font-sm + 2upx;
  544. color: $font-color-light;
  545. padding: 10upx 12upx;
  546. }
  547. .price {
  548. font-size: $font-base + 2upx;
  549. color: $font-color-dark;
  550. &:before {
  551. content: '¥';
  552. font-size: $font-sm;
  553. margin: 0 2upx 0 8upx;
  554. }
  555. }
  556. .action-btn{
  557. width: 160rpx;
  558. height: 60rpx;
  559. padding: 0;
  560. text-align: center;
  561. line-height: 60rpx;
  562. font-size: 26rpx;
  563. color: #303133;
  564. background: #fff;
  565. border-radius: 100px;
  566. float: right;
  567. position: absolute;
  568. right: 30rpx;
  569. bottom: 0;
  570. }
  571. .refund{
  572. position: absolute;
  573. right: 30rpx;
  574. font-size: 28rpx;
  575. color: #fa436a;
  576. top: 35rpx;
  577. }
  578. }
  579. }
  580. .price-box {
  581. display: flex;
  582. justify-content: flex-end;
  583. align-items: baseline;
  584. padding: 20upx 30upx;
  585. font-size: $font-sm + 2upx;
  586. color: $font-color-light;
  587. .num {
  588. margin: 0 8upx;
  589. color: $font-color-dark;
  590. }
  591. .price {
  592. font-size: $font-lg;
  593. color: $font-color-dark;
  594. &:before {
  595. content: '¥';
  596. font-size: $font-sm;
  597. margin: 0 2upx 0 8upx;
  598. }
  599. }
  600. }
  601. .action-box {
  602. display: flex;
  603. justify-content: flex-end;
  604. align-items: center;
  605. height: 100upx;
  606. position: relative;
  607. padding-right: 30upx;
  608. }
  609. .action-btn {
  610. width: 160upx;
  611. height: 60upx;
  612. margin: 0;
  613. margin-left: 24upx;
  614. padding: 0;
  615. text-align: center;
  616. line-height: 60upx;
  617. font-size: $font-sm + 2upx;
  618. color: $font-color-dark;
  619. background: #fff;
  620. border-radius: 100px;
  621. &:after {
  622. border-radius: 100px;
  623. }
  624. &.recom {
  625. background: #fff9f9;
  626. color: $base-color;
  627. &:after {
  628. border-color: #f7bcc8;
  629. }
  630. }
  631. }
  632. }
  633. /* load-more */
  634. .uni-load-more {
  635. display: flex;
  636. flex-direction: row;
  637. height: 80upx;
  638. align-items: center;
  639. justify-content: center
  640. }
  641. .uni-load-more__text {
  642. font-size: 28upx;
  643. color: #999
  644. }
  645. .uni-load-more__img {
  646. height: 24px;
  647. width: 24px;
  648. margin-right: 10px
  649. }
  650. .uni-load-more__img>view {
  651. position: absolute
  652. }
  653. .uni-load-more__img>view view {
  654. width: 6px;
  655. height: 2px;
  656. border-top-left-radius: 1px;
  657. border-bottom-left-radius: 1px;
  658. background: #999;
  659. position: absolute;
  660. opacity: .2;
  661. transform-origin: 50%;
  662. animation: load 1.56s ease infinite
  663. }
  664. .uni-load-more__img>view view:nth-child(1) {
  665. transform: rotate(90deg);
  666. top: 2px;
  667. left: 9px
  668. }
  669. .uni-load-more__img>view view:nth-child(2) {
  670. transform: rotate(180deg);
  671. top: 11px;
  672. right: 0
  673. }
  674. .uni-load-more__img>view view:nth-child(3) {
  675. transform: rotate(270deg);
  676. bottom: 2px;
  677. left: 9px
  678. }
  679. .uni-load-more__img>view view:nth-child(4) {
  680. top: 11px;
  681. left: 0
  682. }
  683. .load1,
  684. .load2,
  685. .load3 {
  686. height: 24px;
  687. width: 24px
  688. }
  689. .load2 {
  690. transform: rotate(30deg)
  691. }
  692. .load3 {
  693. transform: rotate(60deg)
  694. }
  695. .load1 view:nth-child(1) {
  696. animation-delay: 0s
  697. }
  698. .load2 view:nth-child(1) {
  699. animation-delay: .13s
  700. }
  701. .load3 view:nth-child(1) {
  702. animation-delay: .26s
  703. }
  704. .load1 view:nth-child(2) {
  705. animation-delay: .39s
  706. }
  707. .load2 view:nth-child(2) {
  708. animation-delay: .52s
  709. }
  710. .load3 view:nth-child(2) {
  711. animation-delay: .65s
  712. }
  713. .load1 view:nth-child(3) {
  714. animation-delay: .78s
  715. }
  716. .load2 view:nth-child(3) {
  717. animation-delay: .91s
  718. }
  719. .load3 view:nth-child(3) {
  720. animation-delay: 1.04s
  721. }
  722. .load1 view:nth-child(4) {
  723. animation-delay: 1.17s
  724. }
  725. .load2 view:nth-child(4) {
  726. animation-delay: 1.3s
  727. }
  728. .load3 view:nth-child(4) {
  729. animation-delay: 1.43s
  730. }
  731. @-webkit-keyframes load {
  732. 0% {
  733. opacity: 1
  734. }
  735. 100% {
  736. opacity: .2
  737. }
  738. }
  739. .write_off_image_panel {
  740. position: fixed;
  741. left: 0px;
  742. top: 0px;
  743. width: 100%;
  744. height: 100%;
  745. background: #00000080;
  746. image {
  747. width: 16em;
  748. height: 16em;
  749. position: absolute;
  750. left: 50%;
  751. top: 50%;
  752. margin-left: -8em;
  753. margin-top: -10em;
  754. border-radius: 8px;
  755. }
  756. button {
  757. position: absolute;
  758. left: 50%;
  759. top: 50%;
  760. margin-left: -8em;
  761. margin-top: 8em;
  762. width: 16em;
  763. height: 3em;
  764. line-height: 3em;
  765. background: #fffff;
  766. text-align: center;
  767. display: block;
  768. }
  769. }
  770. </style>