liudan 10 months ago
parent e88d097b82
commit de283ee0fd
  1. 6
      api/newFun.js
  2. 53
      pages/news3/sendOutGoods.vue
  3. 30
      pages/news3/shopOrder.vue
  4. 64
      pages/news3/updatePrice.vue

@ -148,4 +148,8 @@ export const sendGoods = (param) => {
//店长==物流列表 //店长==物流列表
export const wuliuList = (param) => { export const wuliuList = (param) => {
return request.post('storeKeeper/expressAll', param) return request.post('storeKeeper/expressAll', param)
} }
//店长 修改价格
export const updatePrice = (param) => {
return request.post('storeKeeper/updatePrice', param)
}

@ -37,12 +37,12 @@
</view> </view>
<u-icon name="arrow-right" color="#C3C3C3" size="28"></u-icon> <u-icon name="arrow-right" color="#C3C3C3" size="28"></u-icon>
</view> --> </view> -->
<u-field @click="wuliuShow=true" v-model="wuliu" <u-field @click="wuliuShow=true" v-model="expressName"
:disabled="true" label="物流公司" placeholder="请选择物流公司" :disabled="true" label="物流公司" placeholder="请选择物流公司"
right-icon="arrow-down-fill" right-icon="arrow-down-fill"
> >
</u-field> </u-field>
<u-action-sheet :list="wlList" v-model="wuliuShow"></u-action-sheet> <u-action-sheet @click="selectedExpress" :list="wlList" v-model="wuliuShow"></u-action-sheet>
<view class="scan"> <view class="scan">
<u-field <u-field
style="flex: 1;padding:30upx 0 30upx 30upx" style="flex: 1;padding:30upx 0 30upx 30upx"
@ -60,7 +60,7 @@
</view> </view>
</view> </view>
<view class="btn"> <view class="btn" @click="sendGoodsHandle">
确认发货 确认发货
</view> </view>
@ -68,6 +68,7 @@
</template> </template>
<script> <script>
import * as newFunApi from '@/api/newFun'
export default{ export default{
data(){ data(){
return{ return{
@ -75,17 +76,46 @@ export default{
newPrice:null, newPrice:null,
wuliuShow:false, wuliuShow:false,
wlList:[ wlList:[
{
text: '物流',
}
], ],
wuliu:'',
codeNum:'', codeNum:'',
orderInfo:{}, orderInfo:{},
expressList:[], expressList:[],
expressId:null,
expressName:'',
} }
}, },
methods:{ methods:{
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
}
},
showAction(){ showAction(){
this.wuliuShow = true; this.wuliuShow = true;
}, },
@ -93,7 +123,13 @@ export default{
let {status, message, data} = await newFunApi.wuliuList(); let {status, message, data} = await newFunApi.wuliuList();
if(status == 200){ if(status == 200){
uni.hideLoading(); uni.hideLoading();
this.expressList = data.list let arr = data.list;
this.wlList = arr.map(item=>{
return {
text:item.express_name,
id:item.express_id
}
})
} }
}, },
@ -234,4 +270,5 @@ page{
} }
</style> </style>

@ -55,7 +55,7 @@
</view> </view>
<view class="btnGroup"> <view class="btnGroup">
<view class="btn info" v-show="item.state_text=='待发货'||item.state_text=='待付款'">修改地址</view> <view class="btn info" v-show="item.state_text=='待发货'||item.state_text=='待付款'">修改地址</view>
<view class="btn primary" v-show="item.state_text=='待发货'||item.state_text=='待付款'">修改价格</view> <view class="btn primary" v-show="item.state_text=='待发货'||item.state_text=='待付款'" @click="goJump('/pages/news3/updatePrice',item)">修改价格</view>
<view class="btn primary" v-show="item.state_text=='待发货'" @click="goJump('/pages/news3/sendOutGoods',item)">发货</view> <view class="btn primary" v-show="item.state_text=='待发货'" @click="goJump('/pages/news3/sendOutGoods',item)">发货</view>
<view class="btn info" v-show="item.state_text=='refund'">拒绝</view> <view class="btn info" v-show="item.state_text=='refund'">拒绝</view>
<view class="btn primary" v-show="item.state_text=='refund'">同意</view> <view class="btn primary" v-show="item.state_text=='refund'">同意</view>
@ -271,33 +271,7 @@ export default {
this.total = data.list.total this.total = data.list.total
} }
}, },
sendGoodsHandle(){
// let params={
// "orderId": 10004,
// "form": {
// "deliveryMethod": 10,
// "packGoodsData": [
// {
// "orderGoodsId": 10004,
// "deliveryNum": 1
// }
// ],
// "expressId": 10005,
// "expressNo": "222",
// "syncMpWeixinShipping": 1
// }
// }
// let {status, message, data} = await newFunApi.sendGoods({
// dataType: this.classifyShow,
// page: this.pageNum,
// searchValue: this.keyword
// });
// if(status == 200){
// uni.hideLoading();
// this.goodsList = this.goodsList.concat(data.list.data)
// this.total = data.list.total
// }
},
goJump(path,value){ goJump(path,value){
uni.navigateTo({ uni.navigateTo({
url: path+'?item='+JSON.stringify(value), url: path+'?item='+JSON.stringify(value),

@ -1,35 +1,36 @@
<template> <template>
<view class="updatePrice"> <view class="updatePrice">
<view class="orderNum"> <view class="orderNum">
订单号7868867676878676876 订单号{{orderInfo.order_no}}
</view> </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"> <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="right">
<view class="title"> <view class="title">
联想小新笔记本电脑2023年新款 {{item.goods_name}}
</view> </view>
<view class="subTitle"> <view class="subTitle" v-for="p in item.goods_props" :key="p.group">
16GB128GB {{p.group.name}}:{{p.value.name}}
</view> </view>
<view class="num"> <view class="num">
x1 x{{item.total_num}}
</view> </view>
<view class="price"> <view class="price">
<text style="font-size: 26upx;">¥</text> <text style="font-size: 26upx;">¥</text>
<text>288</text> <text>{{item.total_price}}</text>
</view> </view>
</view> </view>
</view> </view>
<view class="selectContent" @click="modifyInfo=true"> <view class="selectContent" @click="setPrice(item)">
<view class="left"> <view class="left">
修改单个商品价格 修改单个商品价格
</view> </view>
<view class="right"> <view class="right">
<view class="price"> <view class="price">
<text style="font-size: 26upx;">¥</text> <text style="font-size: 26upx;">¥</text>
<text>288</text> <text>{{item.total_price}}</text>
</view> </view>
<u-icon name="arrow-right" color="#C3C3C3" size="28"></u-icon> <u-icon name="arrow-right" color="#C3C3C3" size="28"></u-icon>
</view> </view>
@ -43,14 +44,17 @@
<view class="right"> <view class="right">
<view class="price"> <view class="price">
<text style="font-size: 26upx;">¥</text> <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> </view>
<u-icon name="arrow-right" color="#C3C3C3" size="28"></u-icon> <u-icon name="arrow-right" color="#C3C3C3" size="28"></u-icon>
</view> </view>
</view> </view>
<view class="btn"> <view class="btn" @click="submitPrice">
保存修改 保存修改
</view> </view>
<u-popup v-model="modifyInfo" width="80%" border-radius="10" :closeable="true" mode="bottom"> <u-popup v-model="modifyInfo" width="80%" border-radius="10" :closeable="true" mode="bottom">
@ -65,7 +69,7 @@
</view> </view>
<view class="price"> <view class="price">
<text style="font-size: 26upx;">¥</text> <text style="font-size: 26upx;">¥</text>
<text>288</text> <text>{{selectedGood.total_price}}</text>
</view> </view>
</view> </view>
<view class="orginPrice"> <view class="orginPrice">
@ -78,7 +82,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="submit"> <view class="submit" @click="submitPrice">
确定 确定
</view> </view>
</view> </view>
@ -87,15 +91,41 @@
</template> </template>
<script> <script>
import * as newFunApi from '@/api/newFun'
export default{ export default{
data(){ data(){
return{ return{
modifyInfo:false, modifyInfo:false,
newPrice:null, newPrice:null,
orderInfo:{},
selectedGood:{},
expressPrice:0,
} }
}, },
methods:{ 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> </script>
@ -285,4 +315,8 @@ page{
} }
} }
::v-deep .u-input{
width:100rpx;
text-align: right;
}
</style> </style>
Loading…
Cancel
Save