|
@@ -50,20 +50,20 @@
|
|
|
<span v-else-if=" orderDetailData.payStatus != 'PAID' ">{{ 0 }} 元</span>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <!-- <a-col :span="8">
|
|
|
+ <a-col :span="8" v-if="orderDetailData.beginImage">
|
|
|
<a-form-item label="洗车照片" :label-col="{ span:6 }" :wrapper-col="{ span:12}">
|
|
|
<div style="display: flex;">
|
|
|
<div>
|
|
|
- <img :src="imgBefore" alt="" @click="isShowImgModal=true">
|
|
|
+ <img class="imgCar" :src="orderDetailData.beginImage" alt="" @click="isShowBeginImageModal=true">
|
|
|
<div style="text-align: center;">洗车前</div>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <img :src="imgAfter" alt="" @click="isShowImgModal=true">
|
|
|
+ <img class="imgCar" :src="orderDetailData.endImage" alt="" @click="isShowEndImageModal=true">
|
|
|
<div style="text-align: center;">洗车后</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</a-form-item>
|
|
|
- </a-col> -->
|
|
|
+ </a-col>
|
|
|
</a-row>
|
|
|
<a-row :gutter="24">
|
|
|
<!-- <a-col :span="8">
|
|
@@ -80,7 +80,7 @@
|
|
|
<a-row style="text-align: center;margin-top: 100px;">
|
|
|
<a-col>
|
|
|
<a-form-item>
|
|
|
- <a-button type="default" @click="isShow=false" >返回列表</a-button>
|
|
|
+ <a-button type="default" @click="isShow=false">返回列表</a-button>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
@@ -88,85 +88,73 @@
|
|
|
</div>
|
|
|
</a-modal>
|
|
|
<!-- 查看洗车前后照片对比 -->
|
|
|
- <!-- <a-modal class="picModal" :width="600" :footer="null" :destroyOnClose="true" @cancel="isShowImgModal=false" v-model="isShowImgModal">
|
|
|
- <img :src="imgBefore" class="pic" />
|
|
|
- </a-modal> -->
|
|
|
+ <a-modal class="imgModal" title="洗车前照片" :width="600" :footer="null" :destroyOnClose="true" @cancel="isShowBeginImageModal=false"
|
|
|
+ v-model="isShowBeginImageModal">
|
|
|
+ <img :src="orderDetailData.beginImage" class="pic" />
|
|
|
+ </a-modal>
|
|
|
+ <a-modal class="imgModal" title="洗车后照片" :width="600" :footer="null" :destroyOnClose="true" @cancel="isShowEndImageModal=false"
|
|
|
+ v-model="isShowEndImageModal">
|
|
|
+ <img :src="orderDetailData.endImage" class="pic" />
|
|
|
+ </a-modal>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import { Upload, VSelect } from '@/components'
|
|
|
- import { orderDetail } from '../../api/order.js'
|
|
|
+ import {
|
|
|
+ Upload,
|
|
|
+ VSelect
|
|
|
+ } from '@/components'
|
|
|
+ import {
|
|
|
+ orderDetail
|
|
|
+ } from '../../api/order.js'
|
|
|
export default {
|
|
|
- components: { Upload, VSelect },
|
|
|
- name:'OrderDetailModal',
|
|
|
+ components: {
|
|
|
+ Upload,
|
|
|
+ VSelect
|
|
|
+ },
|
|
|
+ name: 'OrderDetailModal',
|
|
|
props: {
|
|
|
- openModal: { // 弹框是否展示
|
|
|
+ openModal: { // 弹框是否展示
|
|
|
type: Boolean,
|
|
|
default: false
|
|
|
},
|
|
|
- nowId:{
|
|
|
+ nowId: {
|
|
|
type: Number,
|
|
|
- default: null
|
|
|
- },
|
|
|
- nowStatus:{
|
|
|
- type: String,
|
|
|
- default: ''
|
|
|
+ default: null
|
|
|
}
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- orderDetailData:[],
|
|
|
+ orderDetailData: [],
|
|
|
isShow: this.openModal,
|
|
|
- // rowId:null
|
|
|
- // isShowImgModal: false,
|
|
|
- // imgBefore:require('../../assets/logo.png')
|
|
|
+ isShowBeginImageModal: false, // 洗车前图片弹窗
|
|
|
+ isShowEndImageModal: false, // 洗车后图片弹窗
|
|
|
}
|
|
|
},
|
|
|
- methods: {
|
|
|
- // getDetailData(){
|
|
|
- // if(this.rowId){
|
|
|
- // orderDetail({id:this.rowId}).then(res=>{
|
|
|
- // console.log(res,'------------')
|
|
|
- // if(res.status == 200){
|
|
|
- // // setTimeout(() => {
|
|
|
- // // res.data.orderStatus = this.$refs.orderStatus.getNameByCode(res.data.orderStatus)
|
|
|
- // // }, 100)
|
|
|
- // this.orderDetailData = res.data
|
|
|
- // }
|
|
|
- // })
|
|
|
- // }
|
|
|
- // }
|
|
|
- },
|
|
|
+ methods: {},
|
|
|
watch: {
|
|
|
// 父页面传过来的弹框状态以及当前行id
|
|
|
- openModal (newValue, oldValue) {
|
|
|
+ openModal(newValue, oldValue) {
|
|
|
this.isShow = newValue
|
|
|
},
|
|
|
- nowStatus (newValue, oldValue) {
|
|
|
- console.log(newValue)
|
|
|
- },
|
|
|
- nowId(newValue, oldValue){
|
|
|
- // this.rowId = newValue
|
|
|
- // console.log(this.rowId)
|
|
|
- // this.getDetailData()
|
|
|
- if(newValue){
|
|
|
- orderDetail({id:newValue}).then(res=>{
|
|
|
- console.log(res,'------------')
|
|
|
- if(res.status == 200){
|
|
|
- console.log(res.data,'+++')
|
|
|
+ nowId(newValue, oldValue) {
|
|
|
+ if (newValue) {
|
|
|
+ orderDetail({
|
|
|
+ id: newValue
|
|
|
+ }).then(res => {
|
|
|
+ console.log(res, '------------')
|
|
|
+ if (res.status == 200)
|
|
|
setTimeout(() => {
|
|
|
- res.data.orderStatus = this.$refs.orderStatus.getNameByCode(res.data.orderStatus)
|
|
|
- }, 100)
|
|
|
- this.orderDetailData = res.data
|
|
|
- console.log(this.orderDetailData,'---')
|
|
|
- }
|
|
|
+ res.data.orderStatus = this.$refs.orderStatus.getNameByCode(res.data.orderStatus)
|
|
|
+ }, 500)
|
|
|
+ this.orderDetailData = res.data
|
|
|
+ console.log(this.orderDetailData, '---')
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
// 重定义的弹框状态
|
|
|
- isShow (val){
|
|
|
- if (!val){
|
|
|
+ isShow(val) {
|
|
|
+ if (!val) {
|
|
|
this.$emit('close')
|
|
|
}
|
|
|
}
|
|
@@ -177,11 +165,18 @@
|
|
|
.orderDetail-content .ant-form-inline .ant-form-item {
|
|
|
margin-bottom: 20px;
|
|
|
}
|
|
|
- .pic{
|
|
|
- transform: scale(3);
|
|
|
+
|
|
|
+ .imgCar {
|
|
|
+ width: 100px;
|
|
|
+ height: auto;
|
|
|
+ margin: 0 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .pic {
|
|
|
+ transform: scale(1);
|
|
|
display: block;
|
|
|
max-width: 100%;
|
|
|
- height:100%;
|
|
|
+ height: 100%;
|
|
|
margin: 0 auto;
|
|
|
}
|
|
|
</style>
|