gdpao #83
@ -121,6 +121,10 @@ const install = (Vue, vm) => {
|
||||
bindcarer({order_id,takeawayer_id}){
|
||||
return vm.$u.post("/order/orderRider",{order_id,takeawayer_id})
|
||||
},
|
||||
// 自提
|
||||
bindmention({shipping_express_id,deliver_explain,order_id,sendimg}) {
|
||||
return vm.$u.post("/order/send",{shipping_express_id,deliver_explain,order_id,sendimg})
|
||||
},
|
||||
// 发货物流公司
|
||||
pushcompany(){
|
||||
return vm.$u.post("/order/getExpress")
|
||||
|
@ -273,6 +273,12 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
,{
|
||||
"path" : "pages/index/mention",
|
||||
"style" : {
|
||||
"navigationBarTitleText": "上传凭证"
|
||||
}
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
"navigationBarTextStyle": "black",
|
||||
|
@ -49,6 +49,10 @@
|
||||
<view class="title">收货地址</view>
|
||||
<view class="value u-line-1">{{ info.extend_order_common.reciver_info.address }}</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="title">派送方式</view>
|
||||
<view class="value u-line-1">{{ cur == 0 ? "快递" : cur == 1 ? "骑手" : "自提" }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 待处理之后的 -->
|
||||
@ -74,6 +78,7 @@
|
||||
<view class="methods">
|
||||
<view :class="{ active: cur == 0 }" @click="pushstyleA">快递</view>
|
||||
<view :class="{ active: cur == 1 }" @click="pushstyleB">骑手</view>
|
||||
<view :class="{ active: cur == 2 }" @click="pushstyleC">自提</view>
|
||||
</view>
|
||||
<view v-if="cur != 2 && (pushid || selctcar)">
|
||||
<view class="title">{{cur == 0 ? '快递单号':'骑手信息'}}</view>
|
||||
@ -122,7 +127,7 @@
|
||||
title="请选择公司"
|
||||
confirm-text="下一步"
|
||||
></u-picker>
|
||||
<u-popup v-model="showExpress" mode="center" border-radius="10" class="delivery-popup">
|
||||
<u-popup v-model="showExpress" :mask-close-able="false" mode="center" border-radius="10" class="delivery-popup">
|
||||
<view class="title">填写快递单号</view>
|
||||
<view class="input-info"><input type="text" style="color: #333; line-height: 1;" placeholder="请输入快递单号" v-model="pushid" /></view>
|
||||
<view class="btn" @click="saveDelivery">确认</view>
|
||||
@ -151,7 +156,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
status: 1, // 订单状态
|
||||
cur: 2,
|
||||
cur: null,
|
||||
showDelivery: false, // 填写骑手信息
|
||||
showExpress: false, // 填写快递单号
|
||||
showRefunds: false, // 平台退货处理
|
||||
@ -252,6 +257,10 @@ export default {
|
||||
this.cur = 1;
|
||||
this.show = true;
|
||||
},
|
||||
// 选择骑手
|
||||
pushstyleC() {
|
||||
this.cur = 2;
|
||||
},
|
||||
// 获取物流公司列表
|
||||
getcompanyinfo() {
|
||||
let that = this;
|
||||
@ -357,8 +366,8 @@ export default {
|
||||
},
|
||||
// 绑定配送方式
|
||||
confirmpushstyle() {
|
||||
console.log(this.cur);
|
||||
if (this.cur != 0 && this.cur != 1) {
|
||||
// console.log(this.cur);
|
||||
if (this.cur < 0) {
|
||||
this.$refs.uToast.show({
|
||||
title: '请选择派送方式!',
|
||||
type: 'warning ',
|
||||
@ -373,7 +382,7 @@ export default {
|
||||
})
|
||||
return;
|
||||
}
|
||||
console.log(this.pushid);
|
||||
// console.log(this.pushid);
|
||||
this.$u.api.bindpushid({
|
||||
order_id: this.orderid,
|
||||
shipping_code: this.pushid,
|
||||
@ -394,7 +403,7 @@ export default {
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
} else if (this.cur == 1) {
|
||||
if (!this.selctcar) {
|
||||
this.$refs.uToast.show({
|
||||
title: '请选择派送方式!',
|
||||
@ -422,6 +431,10 @@ export default {
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: "mention?id=" + this.orderid
|
||||
})
|
||||
}
|
||||
},
|
||||
// 选择骑手
|
||||
@ -598,10 +611,11 @@ export default {
|
||||
.methods {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-around;
|
||||
> view {
|
||||
font-size: 30rpx;
|
||||
color: rgba(0, 0, 51, 1);
|
||||
width: 335rpx;
|
||||
width: 30%;
|
||||
height: 80rpx;
|
||||
border: 1rpx solid rgba(236, 236, 236, 1);
|
||||
background: rgba(236, 236, 236, 1);
|
||||
@ -609,9 +623,6 @@ export default {
|
||||
text-align: center;
|
||||
line-height: 80rpx;
|
||||
margin-bottom: 20rpx;
|
||||
&:nth-child(2n-1) {
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
}
|
||||
.active {
|
||||
border: 1rpx solid #ff780f;
|
||||
@ -647,6 +658,7 @@ export default {
|
||||
color: rgba(51, 51, 51, 1);
|
||||
}
|
||||
.timelineid {
|
||||
margin: 18rpx 0;
|
||||
min-height: 40rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 400;
|
||||
|
139
pages/index/mention.vue
Normal file
139
pages/index/mention.vue
Normal file
@ -0,0 +1,139 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="upload">
|
||||
<view class="title">
|
||||
<text>上传凭证</text>
|
||||
<text class="tips">(仅可上传1张凭证)</text>
|
||||
</view>
|
||||
<u-upload class="upload-box" :form-data="coverformdata" :action="action" :header="header" name="common" :max-count="1" @on-success="uploadSuc"></u-upload>
|
||||
</view>
|
||||
<view class="remarks">
|
||||
<view>备注:</view>
|
||||
<textarea class="textarea-box" v-model="textareaVal" placeholder="请输入内容..." placeholder-class="placeholder-style" />
|
||||
</view>
|
||||
<u-button class="btn-submit" @click="submitInfo">提交</u-button>
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
header: {
|
||||
Authorization: 'Bearer' + ' ' + uni.getStorageSync('token')
|
||||
},
|
||||
action: "https://mall.dmygkeji.com/api/Upload/uploadfile",
|
||||
coverformdata: {
|
||||
name: 'common'
|
||||
},
|
||||
img_url: "", // 图片路径
|
||||
textareaVal: "", // 备注
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
// console.log(option);
|
||||
this.order_id = option.id;
|
||||
},
|
||||
methods: {
|
||||
// 上传成功
|
||||
uploadSuc(e) {
|
||||
if (e.errCode == 0) {
|
||||
this.$refs.uToast.show({
|
||||
title: e.message,
|
||||
type: "success"
|
||||
})
|
||||
console.log(e.data);
|
||||
this.img_url = e.data.file_path;
|
||||
} else {
|
||||
this.$refs.uToast.show({
|
||||
title: e.message,
|
||||
})
|
||||
}
|
||||
},
|
||||
// 自提提交
|
||||
submitInfo() {
|
||||
if (!this.img_url) {
|
||||
this.$refs.uToast.show({
|
||||
title: "请上传凭证!",
|
||||
type: "warning"
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (!this.$u.trim(this.textareaVal)) {
|
||||
this.$refs.uToast.show({
|
||||
title: "请填写备注!",
|
||||
type: "warning"
|
||||
})
|
||||
return;
|
||||
}
|
||||
// 提交
|
||||
this.$u.api.bindmention({
|
||||
shipping_express_id: "e1000",
|
||||
deliver_explain: this.textareaVal,
|
||||
order_id: this.order_id,
|
||||
sendimg: this.img_url,
|
||||
}).then(res => {
|
||||
console.log(res);
|
||||
if (res.errCode == 0) {
|
||||
this.$refs.uToast.show({
|
||||
title: res.message,
|
||||
type: "success",
|
||||
url: "/pages/index/index"
|
||||
})
|
||||
} else {
|
||||
this.$refs.uToast.show({
|
||||
title: res.message,
|
||||
type: "warning"
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.container {
|
||||
padding: 30rpx;
|
||||
}
|
||||
.upload {
|
||||
.title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 30rpx;
|
||||
font-weight: 400;
|
||||
color: #333;
|
||||
.tips {
|
||||
font-size: 20rpx;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
.upload-box {
|
||||
margin: 20rpx 0;
|
||||
}
|
||||
}
|
||||
.remarks {
|
||||
.textarea-box {
|
||||
width: calc(100% - 42rpx);
|
||||
padding: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
border-radius: 10rpx;
|
||||
border: 1px solid #BABABA;
|
||||
}
|
||||
.placeholder-style {
|
||||
color: #999;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
}
|
||||
.btn-submit {
|
||||
width: 690rpx;
|
||||
height: 98rpx;
|
||||
margin-top: 70rpx;
|
||||
color: #fff;
|
||||
border-radius: 50rpx;
|
||||
background-color: #FF780F;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user