123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631 |
- <template>
- <view class="box">
- <view class="top">
- <view class="orderState">
- <image src="../../../static/img/icon_order_def.png" mode="" style="width: 44rpx;height: 44rpx;"></image>
- <view class="SheetState" v-if="orderData.orderSheet.sheetState == 1">待付款</view>
- <view class="SheetState" v-if="orderData.orderSheet.sheetState == 2">待服务</view>
- <view class="SheetState" v-if="orderData.orderSheet.sheetState == 3">已完成</view>
- <view class="SheetState" v-if="orderData.orderSheet.sheetState == 4">已取消</view>
- </view>
- </view>
- <!-- 店铺信息 -->
- <view class="shopBox">
- <image src="../../../static/img/icon_store.png" mode="" class="shopBoximg"></image>
- <view class="shopCont">
- <view class="shopName">{{orderData.shopInfo.shopName}}</view>
- <view class="Address">
- {{orderData.shopInfo.provinceName}}{{orderData.shopInfo.cityName}}{{orderData.shopInfo.areaName}}{{orderData.shopInfo.address}}
- </view>
- </view>
- <view class="shopRightBox" @click="map">
- <image src="../../../static/img/icon_ditu.png" mode="" class="shopRightImg"></image>
- <view class="shopRihgtTxt">地图</view>
- </view>
- <view class="shopsx"></view>
- <view class="shopRightBox" @click="call">
- <image src="../../../static/img/icon_phone.png" mode="" class="shopRightImg"></image>
- <view class="shopRihgtTxt">电话</view>
- </view>
- </view>
- <!-- 订单内容 -->
- <view class="information">
- <view class="detailedTitle">订单内容</view>
- <view class="goodsName">{{orderData.OpenSheetQRCodeList.itemName}}轮毂去污护理(4支)</view>
- <view class="informationLine2">
- <view class="informationNum">¥{{orderData.OpenSheetQRCodeList.totalPrice}}24</view>
- <view class="informationNum">
- x2{{orderData.OpenSheetQRCodeList.noWriteoffQty+orderData.OpenSheetQRCodeList.writeoffQty}}</view>
- </view>
- <view>
- <view class="goodsName">券码信息({{orderData.OpenSheetQRCodeList.noWriteoffQty}}张可用)</view>
- <view class="detailedLine" v-for="(v,index) in orderData.OpenSheetQRCodeList.OpenSheetQRCode">
- <view class="detailedName"><span class="redPoint"></span> 938393 <span class="quanState"
- v-if="v.WriteoffState==3">待使用</span></view>
- <view class="detailedName old"><span class="redPoint"></span> 938393 <span class="quanState"
- v-if="v.WriteoffState==1">已使用</span></view>
- <image src="../../../static/img/icon_erweima.png" mode="" style="width: 36rpx;height: 36rpx;"
- v-if="v.WriteoffState==3"></image>
- </view>
- </view>
- </view>
- <!-- 套餐内容 -->
- <view class="information">
- <view class="detailedTitle">套餐内容</view>
- <!-- 项目 -->
- <view class="itemBox">
- <!-- 头 -->
- <view class="itemTop">
- <view class="topTitle leftItem">项目名称</view>
- <view class="topTitle">数量</view>
- <view class="topTitle">有效期</view>
- </view>
- <view v-for="(item,index) in orderData.projectList" :key="index">
- <view class="itemContent">
- <view class="topTitle leftItem">{{item.flowName}}</view>
- <view class="topTitle">{{item.flowQty}}</view>
- <view class="topTitle">{{item.date}}</view>
- </view>
- </view>
- </view>
-
- <!-- 商品 -->
- <view class="itemBox">
- <!-- 头 -->
- <view class="itemTop">
- <view class="topTitle leftItem">商品名称</view>
- <view class="topTitle">数量</view>
- <view class="topTitle">有效期</view>
- </view>
-
- <view v-for="(item,index) in orderData.shopList" :key="index">
- <view class="itemContent">
- <view class="topTitle leftItem">{{item.flowName}}</view>
- <view class="topTitle">{{item.flowQty}}</view>
- <view class="topTitle">{{item.date}}</view>
- </view>
- </view>
- </view>
-
- </view>
- <!-- 实付款 -->
- <view class="money">
- <view class="informationNum">实付款:</view>
- <view class="informationNum" style="color: #FF0000;">¥235{{orderData.data.realMoney}}</view>
- </view>
- <!-- 订单信息 -->
- <view class="information">
- <view class="detailedTitle">订单信息</view>
- <view class="informationLine">
- <view class="informationTxt">订单单号:</view>
- <view class="informationNum">{{orderData.data.code}}<span class="codeCopy"
- @click="copy(orderData.data.code)">复制</span></view>
- </view>
- <view class="informationLine">
- <view class="informationTxt">下单人:</view>
- <view class="informationNum">{{orderData.data.nickName}}</view>
- </view>
- <view class="informationLine">
- <view class="informationTxt">下单时间:</view>
- <view class="informationNum">{{orderData.data.createTime}}</view>
- </view>
- <view class="informationLine">
- <view class="informationTxt">订单备注:</view>
- <view class="informationNum">{{orderData.data.comment}}</view>
- </view>
- </view>
- <!-- 支付信息 -->
- <view class="information">
- <view class="detailedTitle">支付信息</view>
- <view class="informationLine">
- <view class="informationTxt">支付状态:</view>
- <view class="informationNum" v-if="orderData.data.payState==1">未支付</view>
- <view class="informationNum" v-if="orderData.data.payState==2">已支付</view>
- </view>
- <view class="informationLine">
- <view class="informationTxt">支付方式:</view>
- <view class="informationNum" v-if="orderData.data.payType==1">在线支付</view>
- <view class="informationNum" v-if="orderData.data.payType==2">线下支付</view>
- </view>
- <view class="informationLine">
- <view class="informationTxt">支付时间:</view>
- <view class="informationNum">{{orderData.data.payTime}}</view>
- </view>
- </view>
- <view style="height: 50rpx;background-color: #F4F5F7;"></view>
- <view class="bottom" v-if="orderData.orderSheet.sheetState == 1">
- <view class="cancel" @click="cancelBespeak">取消订单</view>
- <view class="defer" @click="pay">立即支付</view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- id: '',
- orderData: '',
- }
- },
- onLoad(opt) {
- this.id = opt.id
- if (this.id) {
- this.getData()
- }
- },
- methods: {
- copy(txt) {
- uni.setClipboardData({
- data: txt,
- success: function() {
- uni.showToast({
- title: '复制成功',
- icon: 'none',
- duration: 2000
- });
- }
- });
- },
- upTime() {
- uni.showLoading({
- title: '加载中'
- })
- var that = this
- this.$http('openreservation/carOwner/updateTimeOfAppointment', {
- id: this.id,
- shopId: this.orderData.shopInfo.id,
- billDate: this.billDate
- }, 'POST').then(res => {
- uni.hideLoading();
- // var list = res.data.Items
- var list = res.data
- console.log("result+=", res.data);
- uni.showToast({
- title: '延期成功',
- icon: 'none',
- duration: 2000
- });
- setTimeout(function() {
- that.getData();
- }, 1000);
- })
- },
- cancelBespeak() {
- uni.showLoading({
- title: '加载中'
- })
- var that = this
- this.$http('openOrderManagement/updateSheetState', {
- id: this.id,
- }, 'POST').then(res => {
- uni.hideLoading();
- // var list = res.data.Items
- var list = res.data
- uni.showToast({
- title: '取消成功',
- icon: 'none',
- duration: 2000
- });
- setTimeout(function() {
- that.getData();
- }, 1000);
- })
- },
- map() {
- console.log("打开地图")
- var that = this;
- if (!that.orderData.shopInfo.lat || !that.orderData.shopInfo.lng) {
- uni.showToast({
- title: '该店铺未设置定位',
- icon: 'none',
- duration: 3000
- });
- } else {
- uni.openLocation({
- latitude: Number(that.orderData.shopInfo.lat),
- longitude: Number(that.orderData.shopInfo.lng),
- name: that.orderData.shopInfo.shopName,
- address: that.orderData.shopInfo.provinceName + that.orderData.shopInfo.cityName + that
- .orderData.shopInfo.areaName + that.orderData.shopInfo.address,
- success: function() {
- console.log('success');
- },
- fail(err) {
- console.log(err)
- }
- });
- }
- },
- call() {
- uni.makePhoneCall({
- phoneNumber: this.orderData.orderSheet.mobilePhone
- });
- },
- getData() {
- uni.showLoading({
- title: '加载中'
- });
- this.$http('openOrderManagement/queryOpenSheet', {
- id: this.id,
- }, 'GET').then(res => {
- uni.hideLoading();
- this.orderData = res.data;
- })
- },
- goback() {
- uni.navigateBack({})
- },
- },
- onPullDownRefresh() {
- this.getData()
- setTimeout(function() {
- uni.stopPullDownRefresh();
- }, 1000);
- },
- }
- </script>
- <style scoped>
- .box {
- min-height: 100vh;
- background: #F4F5F7;
- }
- .top {
- height: 190rpx;
- background-color: #FF0000;
- }
- .orderState {
- display: flex;
- justify-content: center;
- align-items: center;
- padding-top: 40rpx;
- }
- .SheetState {
- display: flex;
- justify-content: center;
- font-size: 36rpx;
- font-weight: 500;
- color: #FFFFFF;
- margin-left: 15rpx;
- }
- .timeEditImg {
- width: 25rpx;
- height: 25rpx;
- padding-left: 20rpx;
- }
- .shopBoximg {
- width: 40rpx;
- height: 40rpx;
- }
- .shopRightImg {
- width: 44rpx;
- height: 45rpx;
- }
- .shopsx {
- width: 1px;
- height: 50rpx;
- background: #EEEEEE;
- margin-top: 30rpx;
- margin-left: 28rpx;
- }
- .shopBox {
- display: flex;
- padding: 30rpx 20rpx;
- margin: 0rpx 24rpx;
- margin-top: -60rpx;
- background-color: #FFFFFF;
- border-radius: 10rpx;
- }
- .shopCont {
- width: 405rpx;
- padding-left: 20rpx;
- }
- .shopName {
- font-size: 30rpx;
- font-weight: bold;
- color: #3C3C3C;
- line-height: 42rpx;
- }
- .Address {
- color: #999999;
- font-size: 24rpx;
- margin-top: 10rpx;
- }
- .shopRihgtTxt {
- color: #999999;
- font-size: 24rpx;
- }
- .shopRightBox {
- padding-left: 28rpx;
- }
- .detailedTitle {
- padding: 23rpx 20rpx;
- display: flex;
- text-align: center;
- align-content: flex-start;
- border-bottom: 1rpx solid #EEEEEE;
- font-size: 30rpx;
- font-weight: bold;
- color: #3C3C3C;
- }
- .detailedLine {
- display: flex;
- padding: 15rpx 20rpx;
- justify-content: space-between;
- align-items: center;
- }
- .detailedImg {
- width: 120rpx;
- height: 120rpx;
- border-radius: 10rpx;
- }
- .detailedName {
- font-size: 26rpx;
- color: #333333;
- }
- .old {
- color: #999999;
- text-decoration: line-through;
- }
- .redPoint {
- width: 10rpx;
- height: 10rpx;
- background: #FF0000;
- border-radius: 5rpx;
- margin-right: 10rpx;
- }
- .information {
- background: #FFFFFF;
- border-radius: 10rpx;
- margin: 20rpx 24rpx;
- padding-bottom: 15rpx;
- }
- .informationLine {
- display: flex;
- padding: 15rpx 20rpx;
- }
- .informationLine2 {
- display: flex;
- justify-content: space-between;
- font-size: 26rpx;
- padding: 15rpx 20rpx;
- }
- .money {
- background: #FFFFFF;
- border-radius: 10rpx;
- margin: 20rpx 24rpx;
- display: flex;
- justify-content: space-between;
- font-size: 26rpx;
- padding: 30rpx 20rpx;
- }
- .informationTxt {
- width: 190rpx;
- font-size: 26rpx;
- color: #999999;
- }
- .goodsName {
- padding: 20rpx 20rpx 15rpx;
- border-top: 1rpx solid #EEEEEE;
- color: #333333;
- font-size: 26rpx;
- }
- .informationNum {
- color: #333333;
- font-size: 26rpx;
- }
- .codeCopy {
- width: 77rpx;
- height: 36rpx;
- background: #F4F5F7;
- border-radius: 22rpx;
- font-size: 24rpx;
- color: #333333;
- text-align: center;
- line-height: 33rpx;
- padding: 0 15rpx;
- }
- .orderBottom {
- width: 750rpx;
- height: 98rpx;
- background: #FFFFFF;
- position: fixed;
- left: 0;
- bottom: 0;
- display: flex;
- justify-content: flex-end;
- }
- .bottom {
- display: flex;
- justify-content: flex-end;
- padding: 20rpx;
- background-color: #FFFFFF;
- align-items: center;
- height: 98rpx;
- width: 100vw;
- position: fixed;
- bottom: 0rpx;
- }
- .cancel {
- color: #3C3C3C;
- font-size: 28rpx;
- width: 150rpx;
- height: 56rpx;
- border-radius: 36rpx;
- border: 1rpx solid #DDDDDD;
- text-align: center;
- line-height: 56rpx;
- margin-right: 40rpx;
- }
- .defer {
- color: #D53533;
- font-size: 28rpx;
- width: 150rpx;
- height: 56rpx;
- border-radius: 36rpx;
- border: 1rpx solid #D53533;
- text-align: center;
- line-height: 56rpx;
- margin-right: 40rpx;
- }
- .itemBox {
- margin: 20rpx;
- border-radius: 10rpx;
- border: 2rpx solid #EEEEEE;
- }
- .itemTop {
- padding: 18rpx 20rpx;
- background-color: #FFEFD5;
- display: flex;
- justify-content: space-between;
- align-content: center;
- }
- .topTitle {
- font-size: 26rpx;
- color: #333333;
- margin-right: 10rpx;
- }
- .leftItem {
- flex-grow: 1;
- }
- .itemContent {
- padding: 20rpx;
- background-color: #FFFFFF;
- display: flex;
- justify-content: space-between;
- align-content: center;
- }
- </style>
|