Browse Source

添加订单跟踪

master
xuwenbo 4 years ago
parent
commit
4fc5da0ba8
  1. 48
      src/views/shop/order/detail.vue

48
src/views/shop/order/detail.vue

@ -337,6 +337,19 @@
<!-- <el-button type="primary" @click="handleCloseOrder"> </el-button>--> <!-- <el-button type="primary" @click="handleCloseOrder"> </el-button>-->
<!-- </span>--> <!-- </span>-->
<!-- </el-dialog>--> <!-- </el-dialog>-->
<el-dialog title="订单跟踪"
:visible.sync="kuaidiDialogVisible"
width="40%">
<el-steps direction="vertical"
:active="90"
finish-status="success"
space="50px">
<el-step v-for="item in logisticsList"
:key="item.acceptStation"
:title="item.acceptStation"
:description="item.acceptTime"></el-step>
</el-steps>
</el-dialog>
<el-dialog title="备注订单" <el-dialog title="备注订单"
:visible.sync="markOrderDialogVisible" :visible.sync="markOrderDialogVisible"
width="40%"> width="40%">
@ -352,15 +365,11 @@
<el-button type="primary" @click="handleMarkOrder"> </el-button> <el-button type="primary" @click="handleMarkOrder"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
<!--订单跟踪信息-->
<eForm ref="form" v-if="logisticsDialogVisible" :is-add="isAdd"></eForm>
</div> </div>
</template> </template>
<script> <script>
import {getOrderDetail} from '@/api/yxStoreOrder'; import { express, getOrderDetail } from '@/api/yxStoreOrder'
import {formatTimeTwo} from '@/utils/index'; import {formatTimeTwo} from '@/utils/index';
import eForm from './form';
const defaultReceiverInfo = { const defaultReceiverInfo = {
orderId:null, orderId:null,
receiverName:null, receiverName:null,
@ -373,7 +382,7 @@ import eForm from './form';
status:null status:null
}; };
export default { export default {
components: {eForm}, components: {},
data() { data() {
return { return {
isAdd: false, isAdd: false,
@ -384,6 +393,7 @@ import eForm from './form';
user:{ user:{
}, },
logisticsList:[],
receiverDialogVisible:false, receiverDialogVisible:false,
receiverInfo:Object.assign({},defaultReceiverInfo), receiverInfo:Object.assign({},defaultReceiverInfo),
moneyDialogVisible:false, moneyDialogVisible:false,
@ -391,10 +401,14 @@ import eForm from './form';
messageDialogVisible:false, messageDialogVisible:false,
message: {title:null, content:null}, message: {title:null, content:null},
closeDialogVisible:false, closeDialogVisible:false,
kuaidiDialogVisible:false,
closeInfo:{note:null,id:null}, closeInfo:{note:null,id:null},
markOrderDialogVisible:false, markOrderDialogVisible:false,
markInfo:{note:null}, markInfo:{note:null},
logisticsDialogVisible:false logisticsDialogVisible: {
visible: false,
list: []
}
} }
}, },
filters: { filters: {
@ -504,6 +518,22 @@ import eForm from './form';
this.getInfo(); this.getInfo();
}, },
methods: { methods: {
express() {
let params ={
"orderCode": this.order.id,
"shipperCode": this.order.deliverySn,
"logisticCode": this.order.deliveryId
}
express(params).then(res=>{
console.log(res,89888)
this.expressInfo = res.Traces
this.kuaidiDialogVisible=true;
this.logisticsList = this.expressInfo
}).catch(err => {
})
},
getInfo(){ getInfo(){
let that = this; let that = this;
let id = that.$route.params.id || 0; let id = that.$route.params.id || 0;
@ -619,6 +649,7 @@ import eForm from './form';
this.closeInfo.note=null; this.closeInfo.note=null;
this.closeInfo.id=this.id; this.closeInfo.id=this.id;
}, },
// handleCloseOrder(){ // handleCloseOrder(){
// this.$confirm('?', '', { // this.$confirm('?', '', {
// confirmButtonText: '', // confirmButtonText: '',
@ -686,7 +717,8 @@ import eForm from './form';
}) })
}, },
showLogisticsDialog(){ showLogisticsDialog(){
this.logisticsDialogVisible=true; this.express();
} }
} }
} }

Loading…
Cancel
Save