联调订单相关接口

main
jinna 2 years ago
parent 4fa9de1f46
commit 8dadbd49a9
  1. 78
      pages/pages_zhentou/form/form.vue
  2. 215
      pages/pages_zhentou/order/checkOrder.vue
  3. 18
      pages/pages_zhentou/order/express.vue

@ -159,6 +159,7 @@
export default { export default {
data() { data() {
return { return {
phoneNumber:'',
imgPrefix: getApp().globalData.imgPrefix, imgPrefix: getApp().globalData.imgPrefix,
isShowLink:false, isShowLink:false,
fontsize: 12, fontsize: 12,
@ -279,38 +280,38 @@
// //
posData: [{ posData: [{
text: '偏硬', text: '偏硬',
value: '1' value: 1
}, { }, {
text: '适中', text: '适中',
value: '2' value: 2
}, { }, {
text: '偏软', text: '偏软',
value: '3' value: 3
}], }],
// //
matData: [{ matData: [{
text: '羽丝绒枕', text: '羽丝绒枕',
value: '1' value: 1
}, },
{ {
text: '草本植物枕(荞麦、决明子等)', text: '草本植物枕(荞麦、决明子等)',
value: '2' value: 2
}, },
{ {
text: '乳胶枕', text: '乳胶枕',
value: '3' value: 3
}, },
{ {
text: '慢回弹记忆枕', text: '慢回弹记忆枕',
value: '4' value: 4
}, },
{ {
text: '软管枕', text: '软管枕',
value: '5' value: 5
}, },
{ {
text: '其他', text: '其他',
value: '6' value: 6
}, },
], ],
cerData: [{ cerData: [{
@ -335,9 +336,8 @@
} }
}, },
onShow(){ onShow(){
console.log(getApp().globalData)
}, },
onLoad() { onLoad(options) {
// let srceenNunber=15; //192019.2html100px // let srceenNunber=15; //192019.2html100px
let that = this; let that = this;
@ -365,9 +365,65 @@
}; };
// console.log(this.a) // console.log(this.a)
this.getData() this.getData()
console.log(options)
if(options.phone){
this.phoneNumber = options.phone
this.getInfo()
}
}, },
methods: { methods: {
//
getInfo(){
uni.request({
// this.phoneNumber
url:getApp().globalData.baseUrl + '/blade-desk/custom-made-info/get-newest?phone=13214521014' ,
method:'GET',
header:{
'Blade-Auth': 'bearer ' + uni.getStorageSync('token')
},
success:(res) =>{
console.log(res)
if(res.data.code == 200){
this.valiFormData = {
username:res.data.data.username == '-1' ? '' : res.data.data.username,
ageRange:res.data.data.ageRange == '-1' ? '' : res.data.data.ageRange,
height:res.data.data.height == '-1' ? '' : res.data.data.height,
neckLength:res.data.data.neckLength == '-1' ? '' : res.data.data.neckLength,
neckShoulderWidth:res.data.data.neckShoulderWidth == '-1' ? '' : res.data.data.neckShoulderWidth,
pillowHardness:res.data.data.pillowHardness == '-1' ? '' : res.data.data.pillowHardness,
pillowMaterial:res.data.data.pillowMaterial == '-1' ? '' : res.data.data.pillowMaterial,
sleepingPosture:res.data.data.sleepingPosture == '-1' ? '' : res.data.data.sleepingPosture,
status:res.data.data.status == '-1' ? '' : res.data.data.status,
weight:res.data.data.weight == '-1' ? '' : res.data.data.weight,
address:res.data.data.detail == '-1' ? '' : res.data.data.detail,
sleepLength:res.data.data.sleepLength == '-1' ? '' : res.data.data.sleepLength,
cervicalVertebra:res.data.data.cervicalVertebra == '-1' ? '' : res.data.data.cervicalVertebra,
otherNeed:res.data.data.otherNeed == '-1' ? '' : res.data.data.otherNeed,
phone:res.data.data.phone == '-1' ? '' : res.data.data.phone
}
this.province = res.data.data.province == '-1' ? '' :res.data.data.province;
this.city = res.data.data.city == '-1' ? '' :res.data.data.city;
this.district = res.data.data.district == '-1' ? '' :res.data.data.district;
// this.getCurrentArea(this.province)
}
}
})
},
// getCurrentArea(value){
// this.allCityData.map((item,index) =>{
// if(item.province == value){
// this.multiIndex[0] = index
// item.citys.map((item1,index1) =>{
// this.locationArr[1].push(item.city);
// if(item1.city == this.city){
// }
// })
// }
// })
// },
toggle(type) { toggle(type) {
this.$refs.popup.open(type) this.$refs.popup.open(type)
}, },

@ -4,28 +4,28 @@
<view class="order_item"> <view class="order_item">
<view class="top_title"> <view class="top_title">
<p class="title">壹人壹枕</p> <p class="title">壹人壹枕</p>
<p class="status_txt" v-if="orderData.status == 2" style="color: #D73232;">待付款</p> <p class="status_txt" v-if="orderData.status == 1" style="color: #D73232;">待付款</p>
<p class="status_txt" v-if="orderData.status == 3" style="color: #3E97F1;">待发货</p> <p class="status_txt" v-if="orderData.status == 2" style="color: #3E97F1;">待发货</p>
<p class="status_txt" v-if="orderData.status == 4" style="color: #D73232;">待收货</p> <p class="status_txt" v-if="orderData.status == 3" style="color: #D73232;">待收货</p>
<p class="status_txt" v-if="orderData.status == 5" style="color: #A5A5A5;">已完成</p> <p class="status_txt" v-if="orderData.status == 4" style="color: #A5A5A5;">已完成</p>
<p class="status_txt" v-if="orderData.status == 6" style="color: #A5A5A5;">已取消</p> <p class="status_txt" v-if="orderData.status == 0" style="color: #A5A5A5;">已取消</p>
</view> </view>
<view class="top_content"> <view class="top_content">
<view class="left_cont"> <view class="left_cont">
<image class="img_box" :src="imgPrefix + 'zhentou_bag.png'" mode=""></image> <image class="img_box" :src="imgPrefix + 'zhentou_bag.png'" mode=""></image>
</view> </view>
<view class="right_cont"> <view class="right_cont">
<p class="right_title">易旅家居壹人壹枕枕头科学化定制</p> <p class="right_title">{{orderData.goodsName}}</p>
<p class="bot_right"> <p class="bot_right">
<span style="font-size: 22rpx;color: #666;">1</span> <span style="font-size: 22rpx;color: #666;">{{orderData.goodsNum}}</span>
<span> <span>
<span style="font-size: 22rpx;color: #333;"></span><span <span style="font-size: 22rpx;color: #333;"></span><span
style="font-size: 28rpx;color: #333;">699.0</span> style="font-size: 28rpx;color: #333;">{{orderData.goodsPrice}}</span>
</span> </span>
</p> </p>
</view> </view>
</view> </view>
<view class="sh_box" v-if="orderData.content != ''"> <!-- <view class="sh_box" v-if="orderData.content">
<view class="img_box"> <view class="img_box">
<image class="image" src="../../../static/image/address.png" mode=""></image> <image class="image" src="../../../static/image/address.png" mode=""></image>
</view> </view>
@ -35,11 +35,11 @@
<view class="turn_box"> <view class="turn_box">
<image class="image" src="../../../static/image/jiantou.png" mode=""></image> <image class="image" src="../../../static/image/jiantou.png" mode=""></image>
</view> </view>
</view> </view> -->
<view class="pay_box"> <view class="pay_box">
<p class="pay_txt">实付款</p> <p class="pay_txt">实付款</p>
<p class="mon_txt"><span style="font-size: 22rpx;"></span><span <p class="mon_txt"><span style="font-size: 22rpx;"></span><span
style="font-size: 34rpx;">699.0</span></p> style="font-size: 34rpx;">{{orderData.goodsPrice}}</span></p>
</view> </view>
</view> </view>
</view> </view>
@ -47,37 +47,38 @@
<p class="info_title">订单信息</p> <p class="info_title">订单信息</p>
<p class="info_mess"> <p class="info_mess">
<span class="left_info">下单人</span> <span class="left_info">下单人</span>
<span class="right_info">yuky</span> <span class="right_info">{{orderData.buyerName}}</span>
</p> </p>
<p class="info_mess"> <p class="info_mess">
<span class="left_info">订单编号</span> <span class="left_info">订单编号</span>
<span class="right_info">230415-48478941514632</span> <span class="right_info">{{orderData.orderNo}}</span>
</p> </p>
<p class="info_mess"> <p class="info_mess" v-if="orderData.paymentTime">
<span class="left_info">支付时间</span> <span class="left_info">支付时间</span>
<span class="right_info">2023/8/21 15:33</span> <span class="right_info">{{orderData.paymentTime}}</span>
</p> </p>
<p class="info_mess" v-if="orderData.status == 5"> <p class="info_mess" v-if="orderData.status == 4">
<span class="left_info">收货时间</span> <span class="left_info">收货时间</span>
<span class="right_info">2023/8/21 15:33</span> <span class="right_info">{{orderData.transactionTime}}</span>
</p> </p>
</view> </view>
<view class="sh_box"> <view class="sh_box">
<view class="sh_img"> <view class="sh_img">
<image class="img" src="../../../static/image/sh_img.png" mode=""></image> <image class="img" src="../../../static/image/sh_img.png" mode=""></image>
</view> </view>
<view class="sh_txt"> <view class="sh_txt" @click="returnToServe">
售后服务 售后服务
</view> </view>
</view> </view>
<view class="btn_box"> <view class="btn_box">
<p class="btn" @click="handleWuliu" v-if="orderData.status == 3 || orderData.status == 4 || orderData.status == 5">查看物流</p> <p class="btn" @click="handleWuliu" v-if="orderData.status == 2 || orderData.status == 3 || orderData.status == 4">查看物流</p>
<p class="btn confirm" v-if="orderData.status == 4">确认收货</p> <p class="btn confirm" v-if="orderData.status == 3" @click="handleConfirm">确认收货</p>
<p class="btn" v-if="orderData.status == 2">取消订单</p> <p class="btn" v-if="orderData.status == 1" @click="cancelOrder">取消订单</p>
<p class="btn confirm" v-if="orderData.status == 2">立即支付</p> <p class="btn confirm" v-if="orderData.status == 1">立即支付</p>
<p class="btn confirm info" v-if="orderData.status == 3">完善定制信息</p> <!-- <p class="btn confirm info" v-if="orderData.status == 3" @click="handleInfo(item)">完善定制信息</p> -->
<p class="btn" v-if="orderData.status == 6">删除订单</p> <p class="btn confirm info" v-if="orderData.status == 4" @click="handleInfo">完善定制信息</p>
<p class="btn confirm" v-if="orderData.status == 6">再次定制</p> <p class="btn" v-if="orderData.status == 0" @click="handleDelete">删除订单</p>
<p class="btn confirm" v-if="orderData.status == 0" @click="clickCustom">再次定制</p>
</view> </view>
</view> </view>
</template> </template>
@ -87,18 +88,172 @@
data() { data() {
return { return {
imgPrefix: getApp().globalData.imgPrefix, imgPrefix: getApp().globalData.imgPrefix,
orderData:{status:5,content:''}, orderData:{},
orderId:''
} }
}, },
onload(options) { onLoad(options) {
const item = JSON.parse(decodeURIComponent(option.item)); this.orderId = options.id;
console.log(item) this.getDetail()
console.log(options)
console.log('进入模块')
}, },
methods: { methods: {
//
getDetail(){
uni.request({
// + this.orderId
url: getApp().globalData.baseUrl + '/blade-desk/order/detail?id=' + this.orderId,
method:'GET',
header:{
'Blade-Auth': 'bearer ' + uni.getStorageSync('token')
},
success: (res) => {
console.log(res)
if(res.data.code == 200){
this.orderData = res.data.data;
}else{
uni.showToast({
title: res.data.msg,
icon: 'none'
})
}
}
})
},
//
cancelOrder(){
uni.showModal({
title: '提示',
content: '确认取消该订单?',
success: (res) => {
if (res.confirm) {
uni.request({
url:getApp().globalData.baseUrl + '/blade-desk/order/cancel?id=' + this.orderId,
method:'POST',
header:{
'Blade-Auth': 'bearer ' + uni.getStorageSync('token')
},
success: (res) => {
console.log(res)
if(res.data.code == 200){
uni.showToast({
title: '订单取消成功',
icon: 'none'
})
setTimeout(() =>{
uni.navigateBack()
},500)
}else{
uni.showToast({
title: res.data.msg,
icon: 'none'
})
}
}
})
} else if (res.cancel) {
}
}
});
},
//
handleConfirm(){
let params = {
id:this.orderId
}
uni.showModal({
title: '提示',
content: '确认收到该商品了吗?',
success: (res) => {
if (res.confirm) {
uni.request({
url:getApp().globalData.baseUrl + '/blade-desk/order/confirmReceive?id=' + this.orderId,
method:"POST",
header:{
'Blade-Auth': 'bearer ' + uni.getStorageSync('token')
},
success:(res) =>{
console.log(res)
if(res.data.code == 200){
uni.showToast({
title: '收货成功',
icon: 'none'
})
setTimeout(() =>{
uni.navigateBack()
},500)
}else{
uni.showToast({
title: res.data.msg,
icon: 'none'
})
}
}
})
} else if (res.cancel) {
}
}
});
},
// //
handleWuliu(){ handleWuliu(){
uni.navigateTo({ uni.navigateTo({
url:"/pages/pages_zhentou/order/express" url:"/pages/pages_zhentou/order/express?logisticsNo=" + this.orderData.logisticsNo + '&company=' + this.orderData.logisticsCompany + '&companyCode=' + this.orderData.logisticsCompanyCode
})
},
//
handleDelete(){
uni.showModal({
title: '提示',
content: '确认删除订单吗?',
success: (res) => {
if (res.confirm) {
uni.request({
url:getApp().globalData.baseUrl + '/blade-desk/order/remove?ids=' + this.orderId,
method:"POST",
header:{
'Blade-Auth': 'bearer ' + uni.getStorageSync('token')
},
success: (res) => {
console.log(res)
if(res.data.code == 200){
uni.showToast({
title: '订单删除成功',
icon: 'none'
})
setTimeout(() =>{
uni.navigateBack()
},500)
}else{
uni.showToast({
title: res.data.msg,
icon: 'none'
})
}
}
})
} else if (res.cancel) {
}
}
});
},
//
clickCustom(){},
// ,
handleInfo(){
uni.navigateTo({
url:"/pages/pages_zhentou/form/form?phone=" + this.orderData.buyerPhone
})
},
//
returnToServe(){
uni.navigateTo({
url:"/pages/pages_zhentou/contact/contact"
}) })
}, },
} }

@ -2,10 +2,10 @@
<view class="process_more"> <view class="process_more">
<view class="com_box"> <view class="com_box">
<view class="com_txt"> <view class="com_txt">
顺丰快递 {{company}}
</view> </view>
<view class="com_num"> <view class="com_num">
SH189165496411 {{logisticsNo}}
</view> </view>
</view> </view>
<!-- 步骤条 --> <!-- 步骤条 -->
@ -76,10 +76,20 @@
context: '【丽江市】 【丽江华坪县】(0888-8834031) 的 P1陈平(15108866686) 已揽收', context: '【丽江市】 【丽江华坪县】(0888-8834031) 的 P1陈平(15108866686) 已揽收',
time: '2023-08-14 19:01:18' time: '2023-08-14 19:01:18'
} }
] ],
logisticsNo:'',
company:'',
companyCode:'',
} }
}, },
onLoad() { onLoad(options) {
console.log(options)
this.logisticsNo = options.logisticsNo;
this.company = options.company;
this.companyCode = options.companyCode;
if(this.logisticsNo){
this.getInfo()
}
// this.getInfo() // this.getInfo()
}, },
methods: { methods: {

Loading…
Cancel
Save