update api

This commit is contained in:
cmxdd 2020-08-05 20:03:53 +08:00
parent df1bad0a31
commit 31474f482f
4 changed files with 142 additions and 95 deletions

View File

@ -129,6 +129,10 @@ const install = (Vue, vm) => {
refund({refund_id,seller_state,seller_message}){ refund({refund_id,seller_state,seller_message}){
return vm.$u.post("/order/editRefund",{refund_id,seller_state,seller_message}) return vm.$u.post("/order/editRefund",{refund_id,seller_state,seller_message})
}, },
// 试穿
agreetest({goods_try_id,type,takeawayer_id}){
return vm.$u.post("/order/goodsTryAgree",{goods_try_id,type,takeawayer_id})
}
} }

View File

@ -55,9 +55,9 @@
<view class="pushtimeline" v-if="type == 2"> <view class="pushtimeline" v-if="type == 2">
<view class="timelinetitle">物流信息</view> <view class="timelinetitle">物流信息</view>
<view class="timelineid">订单单号:{{ info.order_sn }}</view> <view class="timelineid">订单单号:{{ info.order_sn }}</view>
<view class="timelinebox"> <view class="timelinebox" v-for="list in info.express_list">
<view class="timelinecontent">{{}}进度</view> <view class="timelinecontent">{{list.content}}</view>
<view class="timelinetime">{{}}时间</view> <view class="timelinetime">{{list.kd_time}}</view>
</view> </view>
</view> </view>
<view class="refunds-option" v-if="type == 4"> <view class="refunds-option" v-if="type == 4">

View File

@ -154,6 +154,8 @@ export default {
}, },
onShow() { onShow() {
this.current=0 this.current=0
//
this.resetarr()
// //
this.getallorder(0); this.getallorder(0);
this.publishstate = false; this.publishstate = false;

View File

@ -3,25 +3,28 @@
<view class="goods-info"> <view class="goods-info">
<image :src="info.goods_image"></image> <image :src="info.goods_image"></image>
<view class="info-right"> <view class="info-right">
<view class="name u-line-1">{{info.goods_name}}</view> <view class="name u-line-1">{{ info.goods_name }}</view>
<view class="info"> <view class="info">
<view class="num">{{info.goods_try_num}}件商品</view> <view class="num">{{ info.goods_try_num }}件商品</view>
<view class="price">实付<span>{{info.goods_price}}</span></view> <view class="price">
实付
<span>{{ info.goods_price }}</span>
</view> </view>
</view> </view>
</view> </view>
<view class="refunds-user" v-if="type==2 || type==3||type==4"> </view>
<view class="refunds-user" v-if="type == 2 || type == 3 || type == 4">
<view> <view>
<image src="/static/image/home/2.png"></image> <image src="/static/image/home/2.png"></image>
<view>{{info.goods_try_member_name}}</view> <view>{{ info.goods_try_member_name }}</view>
</view> </view>
<view> <view>
<image src="/static/image/home/3.png"></image> <image src="/static/image/home/3.png"></image>
<view>{{info.goods_try_member_mobile}}</view> <view>{{ info.goods_try_member_mobile }}</view>
</view> </view>
<view> <view>
<image src="/static/image/home/4.png"></image> <image src="/static/image/home/4.png"></image>
<view class="address u-line-1">{{info.goods_try_area_info}}</view> <view class="address u-line-1">{{ info.goods_try_area_info }}</view>
</view> </view>
</view> </view>
<view class="user-info" v-if="type == 1"> <view class="user-info" v-if="type == 1">
@ -29,32 +32,32 @@
<view class="info-container"> <view class="info-container">
<view> <view>
<view class="title">姓名</view> <view class="title">姓名</view>
<view class="value">{{info.goods_try_member_name}}</view> <view class="value">{{ info.goods_try_member_name }}</view>
</view> </view>
<view> <view>
<view class="title">手机号</view> <view class="title">手机号</view>
<view class="value">{{info.goods_try_member_mobile}}</view> <view class="value">{{ info.goods_try_member_mobile }}</view>
</view> </view>
<view> <view>
<view class="title">收货地址</view> <view class="title">收货地址</view>
<view class="value u-line-1">{{info.goods_try_area_info}}</view> <view class="value u-line-1">{{ info.goods_try_area_info }}</view>
</view> </view>
</view> </view>
</view> </view>
<view class="delivery" v-if="type == 1"> <view class="delivery" v-if="type == 1">
<view class="title">派送方式</view> <view class="title">派送方式</view>
<view class="methods"> <view class="methods">
<view :class="{active: cur==0}" @click="people">人工送达</view> <view :class="{ active: cur == 0 }" @click="people">人工送达</view>
<view :class="{active: cur==1}" @click="carer">指派外部骑手</view> <view :class="{ active: cur == 1 }" @click="carer">指派外部骑手</view>
</view> </view>
<view class="btn" @click="confirmpushstyle">确认</view> <view class="btn" @click="confirmpushstyle">确认</view>
</view> </view>
<!-- <view class="refunds-option" v-if="type==4"> <!-- <view class="refunds-option" v-if="type==4">
<view :class="{active: cur==0}" @click="cur=0;showRefunds=true">不处理</view> <view :class="{active: cur==0}" @click="cur=0;showRefunds=true">不处理</view>
<view :class="{active: cur==1}" @click="cur=1;showRefunds=true">确定处理</view> <view :class="{active: cur==1}" @click="cur=1;showRefunds=true">确定处理</view>
</view> --> </view> -->
<!-- <u-popup v-model="showDelivery" mode="center" border-radius="10" class="delivery-popup"> <!-- <u-popup v-model="showDelivery" mode="center" border-radius="10" class="delivery-popup">
<view class="title">骑手信息</view> <view class="title">骑手信息</view>
<view class="input-info"> <view class="input-info">
<input type="text" placeholder="请输入您的姓名" v-model="name" /> <input type="text" placeholder="请输入您的姓名" v-model="name" />
@ -64,14 +67,14 @@
<view class="btn">确认</view> <view class="btn">确认</view>
</u-popup> --> </u-popup> -->
<u-picker mode="selector" v-model="show" :default-selector="[0]" :range="list" range-key="content" @confirm="getselect"></u-picker> <u-picker mode="selector" v-model="show" :default-selector="[0]" :range="list" range-key="content" @confirm="getselect"></u-picker>
<!-- <u-popup v-model="showExpress" mode="center" border-radius="10" class="delivery-popup"> <!-- <u-popup v-model="showExpress" mode="center" border-radius="10" class="delivery-popup">
<view class="title" @click="bindpushid">填写快递单号</view> <view class="title" @click="bindpushid">填写快递单号</view>
<view class="input-info"> <view class="input-info">
<input type="text" placeholder="请输入快递单号" v-model="express" /> <input type="text" placeholder="请输入快递单号" v-model="express" />
</view> </view>
<view class="btn">确认</view> <view class="btn">确认</view>
</u-popup> --> </u-popup> -->
<!-- <u-popup v-model="showRefunds" mode="center" border-radius="10" class="refunds-popup"> <!-- <u-popup v-model="showRefunds" mode="center" border-radius="10" class="refunds-popup">
<view v-if="cur==1" class="popup-tips">确定处理<br />平台将进行退款</view> <view v-if="cur==1" class="popup-tips">确定处理<br />平台将进行退款</view>
<view v-if="cur==0" class="popup-tips">确定不处理<br />平台将进行联系</view> <view v-if="cur==0" class="popup-tips">确定不处理<br />平台将进行联系</view>
<view class="popup-btn"> <view class="popup-btn">
@ -96,66 +99,104 @@ export default {
phone: '', phone: '',
company: '', company: '',
express: '', express: '',
type:"", type: '',
orderid:0, orderid: 0,
info:{}, info: {},
list:[], list: [],
selctcar:null//ID selctcar: null //ID
} };
}, },
onLoad(option) { onLoad(option) {
this.type = option.type; this.type = option.type;
this.orderid = option.id; this.orderid = option.id;
this.resetinfo() this.resetinfo();
}, },
methods: { methods: {
// //
people(){ people() {
this.cur=0; this.cur = 0;
}, },
carer(){ carer() {
this.cur=1; this.cur = 1;
this.show=true this.show = true;
}, },
// //
confirmpushstyle() { confirmpushstyle() {
if(this.cur==0){ if (this.cur == 0) {
this.$u.api
}else{ .agreetest({
goods_try_id: this.orderid,
type: 1,
takeawayer_id: 0
})
.then(res => {
console.log(res);
if (res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
type: 'error'
});
} else {
}
});
} else {
this.$u.api
.agreetest({
goods_try_id: this.orderid,
type: 1,
takeawayer_id: this.selctcar.takeawayer_id
})
.then(res => {
console.log(res);
if (res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
type: 'error'
});
} else {
}
});
} }
}, },
// //
getselect(e){ getselect(e) {
this.selctcar = this.list[e[0]]; this.selctcar = this.list[e[0]];
}, },
// //
resetinfo(){ resetinfo() {
this.$u.api.testorderdetail({ this.$u.api
goods_try_id:this.orderid .testorderdetail({
}).then(res => { goods_try_id: this.orderid
})
.then(res => {
console.log(res); console.log(res);
if (res.errCode != 0) { if (res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
type: 'error'
});
} else { } else {
this.info = res.data this.info = res.data.info;
} }
}); });
// //
this.$u.api.takeawayerlist({}).then(res => { this.$u.api.takeawayerlist({}).then(res => {
console.log(res); console.log(res);
if (res.errCode != 0) { if (res.errCode != 0) {
this.$refs.uToast.show({
title: res.message,
type: 'error'
});
} else { } else {
let arr = res.data let arr = res.data;
for(let index in arr){ for (let index in arr) {
arr[index].content = arr[index].company_name+"——"+arr[index].contacts+"——"+arr[index].contact_number arr[index].content = arr[index].company_name + '——' + arr[index].contacts + '——' + arr[index].contact_number;
} }
this.list = arr this.list = arr;
} }
}); });
} }
}, }
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -163,9 +204,9 @@ export default {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
min-height: calc(100vh - var(--window-top)); min-height: calc(100vh - var(--window-top));
background-color: #ECECEC; background-color: #ececec;
.goods-info { .goods-info {
background-color: #FFFFFF; background-color: #ffffff;
padding: 30rpx; padding: 30rpx;
display: flex; display: flex;
align-items: center; align-items: center;
@ -181,7 +222,7 @@ export default {
.name { .name {
width: 439rpx; width: 439rpx;
font-size: 28rpx; font-size: 28rpx;
color: rgba(51,51,51,1); color: rgba(51, 51, 51, 1);
margin-bottom: 30rpx; margin-bottom: 30rpx;
} }
.info { .info {
@ -189,11 +230,11 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 26rpx; font-size: 26rpx;
color: rgba(102,102,102,1); color: rgba(102, 102, 102, 1);
.price { .price {
margin-left: 10rpx; margin-left: 10rpx;
> span { > span {
color: #FF780F; color: #ff780f;
} }
} }
} }
@ -201,7 +242,7 @@ export default {
} }
.refunds-user { .refunds-user {
padding: 25rpx 30rpx; padding: 25rpx 30rpx;
background-color: #FFFFFF; background-color: #ffffff;
margin-bottom: 20rpx; margin-bottom: 20rpx;
> view { > view {
display: flex; display: flex;
@ -228,7 +269,7 @@ export default {
} }
> view { > view {
font-size: 26rpx; font-size: 26rpx;
color: rgba(51,51,51,1); color: rgba(51, 51, 51, 1);
} }
} }
} }
@ -236,23 +277,23 @@ export default {
.info-title { .info-title {
font-size: 30rpx; font-size: 30rpx;
font-weight: 500; font-weight: 500;
color: rgba(51,51,51,1); color: rgba(51, 51, 51, 1);
height: 88rpx; height: 88rpx;
background-color: #FFFFFF; background-color: #ffffff;
margin-bottom: 2rpx; margin-bottom: 2rpx;
padding: 30rpx; padding: 30rpx;
} }
.info-container { .info-container {
padding: 0 30rpx; padding: 0 30rpx;
background-color: #FFFFFF; background-color: #ffffff;
margin-bottom: 20rpx; margin-bottom: 20rpx;
> view { > view {
height: 88rpx; height: 88rpx;
display: flex; display: flex;
align-items: center; align-items: center;
color: rgba(51,51,51,1); color: rgba(51, 51, 51, 1);
&:not(:last-child) { &:not(:last-child) {
border-bottom: 2rpx solid #ECECEC; border-bottom: 2rpx solid #ececec;
} }
.title { .title {
width: 150rpx; width: 150rpx;
@ -267,13 +308,13 @@ export default {
} }
.delivery { .delivery {
flex: 1; flex: 1;
background-color: #FFFFFF; background-color: #ffffff;
padding: 30rpx; padding: 30rpx;
position: relative; position: relative;
.title { .title {
font-size: 30rpx; font-size: 30rpx;
font-weight: 500; font-weight: 500;
color: rgba(51,51,51,1); color: rgba(51, 51, 51, 1);
margin-bottom: 30rpx; margin-bottom: 30rpx;
} }
.methods { .methods {
@ -281,11 +322,11 @@ export default {
flex-wrap: wrap; flex-wrap: wrap;
> view { > view {
font-size: 30rpx; font-size: 30rpx;
color: rgba(0,0,51,1); color: rgba(0, 0, 51, 1);
width: 335rpx; width: 335rpx;
height: 80rpx; height: 80rpx;
border: 1rpx solid rgba(236,236,236,1); border: 1rpx solid rgba(236, 236, 236, 1);
background: rgba(236,236,236,1); background: rgba(236, 236, 236, 1);
border-radius: 6rpx; border-radius: 6rpx;
text-align: center; text-align: center;
line-height: 80rpx; line-height: 80rpx;
@ -295,9 +336,9 @@ export default {
} }
} }
.active { .active {
border: 1rpx solid #FF780F; border: 1rpx solid #ff780f;
color: #FF780F; color: #ff780f;
background: #FFF1E6; background: #fff1e6;
} }
} }
.btn { .btn {
@ -307,10 +348,10 @@ export default {
transform: translate(-50%, 0); transform: translate(-50%, 0);
width: 690rpx; width: 690rpx;
height: 98rpx; height: 98rpx;
background: rgba(255,120,15,1); background: rgba(255, 120, 15, 1);
border-radius: 49rpx; border-radius: 49rpx;
font-size: 36rpx; font-size: 36rpx;
color: rgba(255,255,255,1); color: rgba(255, 255, 255, 1);
text-align: center; text-align: center;
line-height: 98rpx; line-height: 98rpx;
} }
@ -318,24 +359,24 @@ export default {
.refunds-option { .refunds-option {
flex: 1; flex: 1;
padding: 88rpx 30rpx; padding: 88rpx 30rpx;
background-color: #FFFFFF; background-color: #ffffff;
display: flex; display: flex;
> view { > view {
width: 335rpx; width: 335rpx;
height: 80rpx; height: 80rpx;
border: 1rpx solid rgba(236,236,236,1); border: 1rpx solid rgba(236, 236, 236, 1);
background: rgba(236,236,236,1); background: rgba(236, 236, 236, 1);
border-radius: 6rpx; border-radius: 6rpx;
font-size: 30rpx; font-size: 30rpx;
color: rgba(0,0,51,1); color: rgba(0, 0, 51, 1);
line-height: 80rpx; line-height: 80rpx;
text-align: center; text-align: center;
margin-right: 20rpx; margin-right: 20rpx;
} }
.active { .active {
border: 1rpx solid #FF780F; border: 1rpx solid #ff780f;
color: #FF780F; color: #ff780f;
background: #FFF1E6; background: #fff1e6;
} }
} }
.delivery-popup { .delivery-popup {
@ -343,27 +384,27 @@ export default {
width: 420rpx; width: 420rpx;
font-size: 30rpx; font-size: 30rpx;
font-weight: 500; font-weight: 500;
color: rgba(51,51,51,1); color: rgba(51, 51, 51, 1);
text-align: center; text-align: center;
line-height: 88rpx; line-height: 88rpx;
border-bottom: 2rpx solid #ECECEC; border-bottom: 2rpx solid #ececec;
} }
.input-info { .input-info {
> input { > input {
font-size: 26rpx; font-size: 26rpx;
line-height: 88rpx; line-height: 88rpx;
padding: 30rpx; padding: 30rpx;
border-bottom: 2rpx solid #ECECEC; border-bottom: 2rpx solid #ececec;
} }
} }
.btn { .btn {
margin: 20rpx auto; margin: 20rpx auto;
width: 200rpx; width: 200rpx;
height: 60rpx; height: 60rpx;
background: rgba(255,120,15,1); background: rgba(255, 120, 15, 1);
border-radius: 30rpx; border-radius: 30rpx;
font-size: 28rpx; font-size: 28rpx;
color: rgba(255,255,255,1); color: rgba(255, 255, 255, 1);
line-height: 60rpx; line-height: 60rpx;
text-align: center; text-align: center;
} }
@ -373,25 +414,25 @@ export default {
width: 420rpx; width: 420rpx;
text-align: center; text-align: center;
font-size: 28rpx; font-size: 28rpx;
color: rgba(102,102,102,1); color: rgba(102, 102, 102, 1);
line-height: 42rpx; line-height: 42rpx;
padding: 30rpx 0; padding: 30rpx 0;
} }
.popup-btn { .popup-btn {
width: 420rpx; width: 420rpx;
display: flex; display: flex;
border-top: 2rpx solid #ECECEC; border-top: 2rpx solid #ececec;
> view { > view {
flex: 1; flex: 1;
height: 98rpx; height: 98rpx;
text-align: center; text-align: center;
line-height: 98rpx; line-height: 98rpx;
&:first-child { &:first-child {
border-right: 2rpx solid #ECECEC; border-right: 2rpx solid #ececec;
} }
} }
.determine { .determine {
color: #FF780F; color: #ff780f;
} }
} }
} }