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

@ -149,3 +149,7 @@ export const sendGoods = (param) => {
export const wuliuList = (param) => {
return request.post('storeKeeper/expressAll', param)
}
//店长 修改价格
export const updatePrice = (param) => {
return request.post('storeKeeper/updatePrice', param)
}

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

@ -55,7 +55,7 @@
</view>
<view class="btnGroup">
<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 info" 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
}
},
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){
uni.navigateTo({
url: path+'?item='+JSON.stringify(value),

@ -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">
16GB128GB
<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>
Loading…
Cancel
Save