You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
yanzong_qianduan/pages/news3/sendOutGoods.vue

274 lines
5.3 KiB

10 months ago
<template>
<view class="updatePrice">
<view class="dispatchContent">
<view class="orderNum">
10 months ago
订单号{{orderInfo.order_no}}
10 months ago
</view>
10 months ago
<view class="dispatchItem" v-for="item in orderInfo.goods">
<image :src="item.goods_image" mode="aspectFill"></image>
10 months ago
<view class="right">
<view class="title">
10 months ago
{{item.goods_name}}
10 months ago
</view>
10 months ago
<view class="subTitle" v-for="p in item.goods_props" :key="p.group">
{{p.group.name}}:{{p.value.name}}
10 months ago
</view>
<view class="num">
10 months ago
x{{item.total_num}}
10 months ago
</view>
<view class="price">
<text style="font-size: 26upx;">¥</text>
10 months ago
<text>{{item.total_price}}</text>
10 months ago
</view>
</view>
</view>
</view>
<view class="selectContent" style="border:none;background-color: #fff;">
<!-- <view class="left">
物流费用
</view>
<view class="right">
<view class="price">
<text style="font-size: 26upx;">¥</text>
<text>288</text>
</view>
<u-icon name="arrow-right" color="#C3C3C3" size="28"></u-icon>
</view> -->
10 months ago
<u-field @click="wuliuShow=true" v-model="expressName"
10 months ago
:disabled="true" label="物流公司" placeholder="请选择物流公司"
right-icon="arrow-down-fill"
>
</u-field>
10 months ago
<u-action-sheet @click="selectedExpress" :list="wlList" v-model="wuliuShow"></u-action-sheet>
10 months ago
<view class="scan">
<u-field
style="flex: 1;padding:30upx 0 30upx 30upx"
v-model="codeNum"
label="物流单号"
placeholder="请填写物流单号"
>
</u-field>
9 months ago
<image :src="$picUrl+'/static/news3/scan.png'" mode=""></image>
10 months ago
</view>
<view class="footerBtn">
<view class="wuliuBtn">
物流链接
</view>
</view>
</view>
10 months ago
<view class="btn" @click="sendGoodsHandle">
10 months ago
确认发货
</view>
</view>
</template>
<script>
10 months ago
import * as newFunApi from '@/api/newFun'
10 months ago
export default{
data(){
return{
modifyInfo:false,
newPrice:null,
wuliuShow:false,
wlList:[
10 months ago
10 months ago
],
10 months ago
codeNum:'',
orderInfo:{},
expressList:[],
10 months ago
expressId:null,
expressName:'',
10 months ago
}
},
methods:{
10 months ago
selectedExpress(val){
console.log(val,this.wlList)
this.expressId = this.wlList[val].id
this.expressName = this.wlList[val].text
},
async sendGoodsHandle(){
let goosList = this.orderInfo.goods.map(item=>{
return{
orderGoodsId:item.order_goods_id,
deliveryNum:item.delivery_num
}
})
let params={
"orderId": this.orderInfo.order_no,
"form": {
"deliveryMethod":this.wuliu?10:20,
"packGoodsData": goosList,
"expressId": this.expressId,
"expressNo": this.codeNum,
"syncMpWeixinShipping": 1
}
}
let {status, message, data} = await newFunApi.sendGoods(params);
if(status == 200){
uni.hideLoading();
uni.navigateBack({delta:1})
// this.goodsList = this.goodsList.concat(data.list.data)
// this.total = data.list.total
}
},
10 months ago
showAction(){
this.wuliuShow = true;
},
10 months ago
async getWuliuList(){
let {status, message, data} = await newFunApi.wuliuList();
if(status == 200){
uni.hideLoading();
10 months ago
let arr = data.list;
this.wlList = arr.map(item=>{
return {
text:item.express_name,
id:item.express_id
}
})
10 months ago
}
},
},
onLoad(option){
console.log(option)
this.orderInfo = JSON.parse(option.item)
console.log(this.orderInfo)
this.getWuliuList()
10 months ago
}
}
</script>
<style lang="scss" scoped>
page{
min-height: 100%;
background-color: #F7F8FA;
}
.orderNum{
font-size: 28upx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #707070;
margin:10upx 30upx;
}
.dispatchContent{
margin:20upx 0;
background: #FFFFFF;
// border-radius: 6px 6px 6px 6px;
opacity: 1;
padding:20upx 10upx;
}
.dispatchItem{
display: flex;
align-items: center;
image{
width: 194upx;
height:194upx;
}
.right{
flex:1;
margin-left:40upx;
position: relative;
display: flex;
flex-direction: column;
justify-content: space-around;
.title{
font-size: 28upx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #3B3B3B;
}
.subTitle{
font-size: 28upx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #7C7C7C;
margin:14upx 0;
}
.num{
font-size: 28upx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #1E1E1E;
}
.price{
display: flex;
align-items: center;
justify-content: flex-end;
font-size: 32upx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #F21A1C;
position: absolute;
right:20upx;
bottom:0upx;
z-index:9;
}
}
}
.scan{
display: flex;
align-items: center;
image{
width:40upx;
height:40upx;
margin-right:32upx;
}
}
::v-deep .u-field{
padding:30upx;
}
::v-deep .uni-input-wrapper{
text-align: right;
}
.footerBtn{
padding:30upx;
display: flex;
align-items: center;
justify-content: flex-end;
}
.wuliuBtn{
// padding:8upx 46upx;
text-align: center;
height:60upx;
line-height: 60upx;
border:1px solid #F63116;
font-size: 28upx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #F83F11;
border-radius:20px;
width:200upx;
}
.btn{
width: 80%;
height: 100upx;
background: #FFAAA4;
border-radius: 6px 6px 6px 6px;
opacity: 1;
line-height: 100upx;
text-align: center;
font-size: 28upx;
font-family: PingFang SC, PingFang SC;
font-weight: 500;
color: #FFFFFF;
margin:140upx auto;
}
10 months ago
10 months ago
</style>