|
|
|
@ -1,35 +1,36 @@ |
|
|
|
|
<template> |
|
|
|
|
<view class="updatePrice"> |
|
|
|
|
<view class="orderNum"> |
|
|
|
|
订单号:7868867676878676876 |
|
|
|
|
订单号:{{orderInfo.order_no}} |
|
|
|
|
</view> |
|
|
|
|
<view class="dispatchContent" v-for="(item,index) in 2" :key="index"> |
|
|
|
|
<view class="dispatchContent" v-for="(item,index) in orderInfo.goods" :key="index"> |
|
|
|
|
<view class="dispatchItem"> |
|
|
|
|
<image src="/static/news3/filter.png" mode="aspectFill"></image> |
|
|
|
|
<image :src="item.goods_image" mode="aspectFill"></image> |
|
|
|
|
<view class="right"> |
|
|
|
|
<view class="title"> |
|
|
|
|
联想小新笔记本电脑2023年新款 |
|
|
|
|
{{item.goods_name}} |
|
|
|
|
</view> |
|
|
|
|
<view class="subTitle"> |
|
|
|
|
16GB,128GB |
|
|
|
|
<view class="subTitle" v-for="p in item.goods_props" :key="p.group"> |
|
|
|
|
{{p.group.name}}:{{p.value.name}} |
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
|
<view class="num"> |
|
|
|
|
x1 |
|
|
|
|
x{{item.total_num}} |
|
|
|
|
</view> |
|
|
|
|
<view class="price"> |
|
|
|
|
<text style="font-size: 26upx;">¥</text> |
|
|
|
|
<text>288</text> |
|
|
|
|
<text>{{item.total_price}}</text> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="selectContent" @click="modifyInfo=true"> |
|
|
|
|
<view class="selectContent" @click="setPrice(item)"> |
|
|
|
|
<view class="left"> |
|
|
|
|
修改单个商品价格 |
|
|
|
|
</view> |
|
|
|
|
<view class="right"> |
|
|
|
|
<view class="price"> |
|
|
|
|
<text style="font-size: 26upx;">¥</text> |
|
|
|
|
<text>288</text> |
|
|
|
|
<text>{{item.total_price}}</text> |
|
|
|
|
</view> |
|
|
|
|
<u-icon name="arrow-right" color="#C3C3C3" size="28"></u-icon> |
|
|
|
|
</view> |
|
|
|
@ -43,14 +44,17 @@ |
|
|
|
|
<view class="right"> |
|
|
|
|
<view class="price"> |
|
|
|
|
<text style="font-size: 26upx;">¥</text> |
|
|
|
|
<text>288</text> |
|
|
|
|
<!-- <text>{{orderInfo.express_price}}</text> --> |
|
|
|
|
<u-input :border-bottom="false" |
|
|
|
|
v-model="expressPrice" |
|
|
|
|
></u-input> |
|
|
|
|
</view> |
|
|
|
|
<u-icon name="arrow-right" color="#C3C3C3" size="28"></u-icon> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<view class="btn"> |
|
|
|
|
<view class="btn" @click="submitPrice"> |
|
|
|
|
保存修改 |
|
|
|
|
</view> |
|
|
|
|
<u-popup v-model="modifyInfo" width="80%" border-radius="10" :closeable="true" mode="bottom"> |
|
|
|
@ -65,7 +69,7 @@ |
|
|
|
|
</view> |
|
|
|
|
<view class="price"> |
|
|
|
|
<text style="font-size: 26upx;">¥</text> |
|
|
|
|
<text>288</text> |
|
|
|
|
<text>{{selectedGood.total_price}}</text> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="orginPrice"> |
|
|
|
@ -78,7 +82,7 @@ |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="submit"> |
|
|
|
|
<view class="submit" @click="submitPrice"> |
|
|
|
|
确定 |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -87,15 +91,41 @@ |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import * as newFunApi from '@/api/newFun' |
|
|
|
|
export default{ |
|
|
|
|
data(){ |
|
|
|
|
return{ |
|
|
|
|
modifyInfo:false, |
|
|
|
|
newPrice:null, |
|
|
|
|
orderInfo:{}, |
|
|
|
|
selectedGood:{}, |
|
|
|
|
expressPrice:0, |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods:{ |
|
|
|
|
|
|
|
|
|
setPrice(item){ |
|
|
|
|
console.log(item) |
|
|
|
|
this.selectedGood = item |
|
|
|
|
this.modifyInfo = true |
|
|
|
|
}, |
|
|
|
|
async submitPrice(){ |
|
|
|
|
let params={ |
|
|
|
|
"orderId": this.orderInfo.order_no, |
|
|
|
|
"form": { |
|
|
|
|
"order_price": this.newPrice, //订单价格 |
|
|
|
|
"express_price": this.expressPrice //运费价格 |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
let {status, message, data} = await newFunApi.updatePrice({ |
|
|
|
|
uni.navigateBack({delta:1}) |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
onLoad(option){ |
|
|
|
|
console.log(option) |
|
|
|
|
this.orderInfo = JSON.parse(option.item) |
|
|
|
|
console.log(this.orderInfo) |
|
|
|
|
this.expressPrice = this.orderInfo.express_price |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
@ -285,4 +315,8 @@ page{ |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
::v-deep .u-input{ |
|
|
|
|
width:100rpx; |
|
|
|
|
text-align: right; |
|
|
|
|
} |
|
|
|
|
</style> |