add
This commit is contained in:
commit
08fbd02dca
|
@ -21,15 +21,15 @@
|
|||
<view style="color: #F55726;">¥ {{subtotal}}</view>
|
||||
</view>
|
||||
<view v-if="datas.is_bulk" class="row">
|
||||
<view>商品重量<text style="color: #F55726;">*</text></view>
|
||||
<view>购买重量<text style="color: #F55726;">*</text></view>
|
||||
<view style="flex: 1;">
|
||||
<up-input v-model="datas.cart_num" type="number" border="none" placeholder="请输入数量" inputAlign="right"></up-input>
|
||||
<up-input v-model="datas.cart_num" type="number" border="none" placeholder="请输入购买重量" inputAlign="right"></up-input>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="row">
|
||||
<view>商品数量<text style="color: #F55726;">*</text></view>
|
||||
<view>购买数量<text style="color: #F55726;">*</text></view>
|
||||
<view style="flex: 1;">
|
||||
<up-input v-model="datas.cart_num" type="number" border="none" placeholder="请输入数量" inputAlign="right"></up-input>
|
||||
<up-input v-model="datas.cart_num" type="number" border="none" placeholder="请输入购买数量" inputAlign="right"></up-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="row" style="padding-top: 30px;padding-bottom: 30rpx;">
|
||||
|
@ -46,6 +46,7 @@
|
|||
|
||||
<script setup>
|
||||
import { computed, ref } from "vue"
|
||||
import { toast } from "../uni_modules/uview-plus";
|
||||
|
||||
const props = defineProps({
|
||||
show: {
|
||||
|
@ -67,6 +68,11 @@
|
|||
}
|
||||
|
||||
const change = () => {
|
||||
if(subtotal.value<=0) {
|
||||
uni.$u.toast('金额不可小于等于0');
|
||||
datas.value.cart_num = '';
|
||||
return ;
|
||||
}
|
||||
emit('change', datas.value);
|
||||
}
|
||||
|
||||
|
|
113
pages.json
113
pages.json
|
@ -47,62 +47,63 @@
|
|||
}
|
||||
}
|
||||
|
||||
],
|
||||
"subPackages": [{
|
||||
"root": "pagesOrder",
|
||||
"pages": [{
|
||||
"path": "order/order",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的订单",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "detail/detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "addressList/addressList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "地址管理",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "addressEdit/addressEdit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "settle/settle",
|
||||
"style": {
|
||||
"navigationBarTitleText": "确认订单",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pageQuota",
|
||||
"pages": [{
|
||||
"path": "quotation/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "报价单",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "quotation/detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "报价明细",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}
|
||||
],
|
||||
"subPackages": [{
|
||||
"root": "pagesOrder",
|
||||
"pages": [{
|
||||
"path": "order/order",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的订单",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "detail/detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "addressList/addressList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "地址管理",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "addressEdit/addressEdit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "settle/settle",
|
||||
"style": {
|
||||
"navigationBarTitleText": "确认订单",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pageQuota",
|
||||
"pages": [{
|
||||
"path": "quotation/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "报价单",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "quotation/detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "报价明细",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
}
|
||||
|
||||
]
|
||||
}
|
||||
|
|
|
@ -54,8 +54,8 @@
|
|||
<swiper-item class="swiper-item">
|
||||
<scroll-view scroll-y style="height: 100%;width: 100%;">
|
||||
<view class="page-box1">
|
||||
<view v-if="true" class="list">
|
||||
<view class="shop-item" v-for="(item, index) in frequentlyList" :key="index" @click="openGoodPopup(item)">
|
||||
<view v-if="frequentlyList.length>0" class="list">
|
||||
<view class="shop-item" v-for="(item, index) in c" :key="index" @click="openGoodPopup(item)">
|
||||
<image class="shop-img" :src="item.imgs"></image>
|
||||
<view class="shop-content" style="width: 490rpx;">
|
||||
<view class="title">
|
||||
|
|
|
@ -100,7 +100,7 @@
|
|||
<view class="shop-item" v-for="(item, index) in goodList" :key="item.id"
|
||||
@click="openGoodPopup(item)">
|
||||
<view class="shop-img">
|
||||
<up-image width="160rpx" height="160rpx" :src="item.imgs"></up-image>
|
||||
<up-image width="120rpx" height="120rpx" :src="item.imgs"></up-image>
|
||||
</view>
|
||||
<view class="shop-content">
|
||||
<view class="title">
|
||||
|
@ -180,7 +180,7 @@
|
|||
let lastScollTop = 0
|
||||
const hideHeadView = (e) => {
|
||||
if (e.detail.scrollTop <= 0 || e.detail.scrollTop >= targetHeight.value) return
|
||||
num.value = e.detail.scrollTop
|
||||
// num.value = e.detail.scrollTop
|
||||
isScroll.value = e.detail.scrollTop > lastScollTop
|
||||
lastScollTop = e.detail.scrollTop
|
||||
|
||||
|
@ -698,8 +698,8 @@
|
|||
display: flex;
|
||||
|
||||
.shop-img {
|
||||
height: 160rpx;
|
||||
width: 160rpx;
|
||||
height: 120rpx;
|
||||
width: 120rpx;
|
||||
margin-right: 20rpx;
|
||||
border-radius: 14rpx;
|
||||
overflow: hidden;
|
||||
|
@ -719,7 +719,7 @@
|
|||
.tip {
|
||||
color: #999;
|
||||
font-size: 24rpx;
|
||||
margin: 12rpx 0;
|
||||
margin: 2rpx 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<text>待付款</text>
|
||||
</view>
|
||||
<view v-else>
|
||||
<text v-if="datas.status==0">待发货</text>
|
||||
<text v-if="datas.status==0">待收货</text>
|
||||
<text v-if="datas.status==1">待收货</text>
|
||||
<text v-if="datas.status==2||datas.status==3">已完成</text>
|
||||
</view>
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
<template>
|
||||
<view>
|
||||
<up-navbar placeholder style="z-index: 10080;" @leftClick="navBack">
|
||||
<template #center>
|
||||
<view>订单</view>
|
||||
</template>
|
||||
</up-navbar>
|
||||
<up-sticky bgColor="#fff">
|
||||
<view style="padding: 10rpx 20rpx 0 20rpx;">
|
||||
<up-search shape="round" v-model="keyword" @custom="searchOn" @search="searchOn" @clear="searchOn"
|
||||
|
@ -149,7 +154,7 @@
|
|||
orderListApi({
|
||||
page_no: where.value[type].page_no,
|
||||
page_size: where.value[type].page_size,
|
||||
keyword: keyword.value,
|
||||
number: keyword.value,
|
||||
status: status,
|
||||
paid: paid
|
||||
}).then(res => {
|
||||
|
@ -173,17 +178,26 @@
|
|||
const searchOn = () => {
|
||||
orderList.value[+swiperCurrent.value] = [];
|
||||
where.value[+swiperCurrent.value].page_no = 1;
|
||||
where.value[+swiperCurrent.value].loadend = false;
|
||||
if (swiperCurrent.value == 0) getOrderList(0);
|
||||
if (swiperCurrent.value == 1) getOrderList(1, '', 0);
|
||||
if (swiperCurrent.value == 2) getOrderList(2, 0);
|
||||
}
|
||||
|
||||
let back = 0;
|
||||
const navBack = ()=>{
|
||||
uni.navigateBack({
|
||||
delta: back ? +back : 0
|
||||
})
|
||||
}
|
||||
|
||||
onLoad((options) => {
|
||||
if (options.type) {
|
||||
tabsActive.value = +options.type;
|
||||
swiperCurrent.value = +options.type;
|
||||
searchOn();
|
||||
}
|
||||
if(options.back) back = options.back;
|
||||
// getOrderList(0);
|
||||
// getOrderList(1, '', 0);
|
||||
// getOrderList(2, 0);
|
||||
|
@ -195,6 +209,7 @@
|
|||
getOrderList(2, 0);
|
||||
});
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
|
|
@ -213,7 +213,7 @@
|
|||
}
|
||||
})
|
||||
}
|
||||
getMerchantList('');
|
||||
getMerchantList();
|
||||
// 定位
|
||||
const LoadAddress = () => {
|
||||
uni.getLocation({
|
||||
|
@ -253,6 +253,10 @@
|
|||
|
||||
// 提交订单
|
||||
const submitOrder = () => {
|
||||
if (!shopInfo.value.mer_id) {
|
||||
uni.$u.toast('请先选择提货点');
|
||||
return shopListShow.value = true;
|
||||
}
|
||||
if (!isAddress.value) return toastAddressShow.value = true;
|
||||
createOrder();
|
||||
}
|
||||
|
@ -289,8 +293,8 @@
|
|||
confirmText: '查看订单',
|
||||
cancelText: '继续购买',
|
||||
success: (e) => {
|
||||
if (e.confirm) uni.navigateTo({
|
||||
url: '/pagesOrder/order/order'
|
||||
if (e.confirm) uni.redirectTo({
|
||||
url: '/pagesOrder/order/order?back=-1&type=2'
|
||||
})
|
||||
else uni.navigateBack();
|
||||
}
|
||||
|
|
|
@ -24,7 +24,8 @@ const useUserStore = defineStore("user", () => {
|
|||
}
|
||||
|
||||
// #ifdef H5
|
||||
token.value = "95b24dd6d2dda836fe07854b08ba0944"
|
||||
token.value = "0f680a9bc1cdccd7ce588a2a58029411"
|
||||
// token.value = "95b24dd6d2dda836fe07854b08ba0944"
|
||||
userInfo.value = {
|
||||
avatar: "https://lihaiim.oss-cn-chengdu.aliyuncs.com/image/admin/default_avatar.png",
|
||||
id: 9,
|
||||
|
|
Loading…
Reference in New Issue