更新功能

This commit is contained in:
weipengfei 2023-11-10 18:02:50 +08:00
parent 577c7c9d54
commit 871030f037
4 changed files with 99 additions and 55 deletions

View File

@ -25,3 +25,11 @@ export function behalfAdminNumber(data) {
return request.get("behalf_admin/number", data);
}
/**
* 生成二维码
*
*/
export function behalfAdminCode(data) {
return request.get("behalf_admin/code", data);
}

View File

@ -18,7 +18,7 @@
</view>
<block v-for="(item,index) in list" :key="index">
<view class="item_list flex">
<view class="item_list flex" @click="navToGoodsDetails(item)">
<view>
<image class="goods_image" :src="item.image" mode="aspectFit"></image>
</view>
@ -35,7 +35,7 @@
<text>订货价:</text>
<text>{{' '+item.price}}</text>
</view>
<view class="add_goods" @click="getGoodsDetails(item)">加入购物单</view>
<!-- <view class="add_goods" @click="getGoodsDetails(item)">加入购物单</view> -->
</view>
</view>
</block>
@ -242,6 +242,15 @@
}
},
/**
* 跳转到产品详情
*/
navToGoodsDetails(item){
console.log(item);
uni.navigateTo({
url: `pages/goods_details/index?id=${item.product_id}&referer=`
})
},
/*
* 加入购物车
*/

View File

@ -91,7 +91,6 @@
</view>
</view>
<priceComponent :product_id="product_id" :bar_code="code" @updateCode = "updateCode" v-if="showCommodity"></priceComponent>
<!-- <view class="popup_group">
<view class="radio">
@ -143,6 +142,8 @@
</view>
</view> -->
<priceComponent :product_id="product_id" :bar_code="code" @updateCode = "updateCode" v-if="showCommodity"></priceComponent>
<view class="popup_group">
<!-- <view v-if="setFormData.delivery_way.includes('2')" class="popup_group_item">
@ -606,7 +607,7 @@
this
.setFormData.slider_image
];
this.setFormData.cate_name = editGoodsDetils.storeCategory.cate_name; //
this.setFormData.cate_name = editGoodsDetils?.storeCategory?.cate_name; //
this.setFormData.mer_cate_name = editGoodsDetils.merCateId ? editGoodsDetils.merCateId.map(
item => item
.category && item.category.cate_name).join(',') : '';

View File

@ -264,7 +264,7 @@
<!-- <view v-if="!item.receipt && item.status != -1" class='bnt cancelBnt'
@click.stop='applyInvoice(item.order_id)'>申请开票</view> -->
<block v-if="item.order_status==2">
<view class='bnt b-color' @click='goOrderDetails(item.order_id)'>去发货</view>
<view class='bnt b-color' @click='consignment(item.order_id)'>去发货</view>
</block>
<block v-if="item.status == 0 || item.status == 9 || item.status == -1">
<view class='bnt b-color' @click='goOrderDetails(item.order_id)'>查看详情</view>
@ -362,6 +362,15 @@
<view class="cle" @click="close">取消</view>
</view>
</u-popup>
<u-popup :show="popUpShow" mode="center" :closeOnClickOverlay="true" round="12" @close="popUpShow = false">
<view style="text-align: center;margin-top: 30rpx;">
请把二维码展示给取货人员
</view>
<view style="padding: 28.07rpx;">
<image :src="payCodeUrl" style="width:400rpx;height: 400rpx;"></image>
</view>
</u-popup>
</view>
</template>
@ -389,7 +398,8 @@
} from '@/api/order.js';
import{
behalfAdminOrderList,
behalfAdminNumber
behalfAdminNumber,
behalfAdminCode
} from "@/api/behalfAdmin.js"
import {
getUserInfo
@ -411,6 +421,7 @@
import {
HTTP_REQUEST_URL
} from '@/config/app';
import { Toast } from '../../libs/uniApi';
export default {
components: {
payment,
@ -424,6 +435,8 @@
loading: false, //
loadend: false, //
loadTitle: '加载更多', //
popUpShow: false, //
payCodeUrl: '', //
orderList: [], //
presellProList: [], //
presellOrderCount: 0,
@ -693,6 +706,19 @@
}
// #endif
},
/**
* 去发货
*/
consignment: function(order_id) {
this.popUpShow = true;
behalfAdminCode({
order_id
}).then((res)=>{
this.payCodeUrl = res.data.qrcode;
}).catch((e)=>{
Toast(e)
})
},
/**
* 提示
*/