This commit is contained in:
zmj 2024-05-13 18:43:53 +08:00
parent 9eef80130c
commit babdd302f2
5 changed files with 806 additions and 770 deletions

View File

@ -15,6 +15,9 @@
</view>
</view>
<view style="margin-top: 20rpx;" @click="showPop=true">
<text>2024-4-7</text>-<text>2024-4-7</text>
</view>
<view class="recoder">
<view class="card" v-for="(item,index) in 10" :key="index">
<view class="right">

View File

@ -18,20 +18,19 @@
</view>
</view>
</up-sticky>
<view class="content">
<swiper class="swiper" circular>
<swiper-item>
<!-- 报价列表 -->
<view v-if="showGoods1">
<up-transition :show="showGoods1" mode="slide-left">
<view class="" v-if="goodsList1.length>0">
<view class="card" v-for="(item,index) in goodsList1" :key='index'>
<view class="head">
<!-- <text> {{orer_sn}}</text> -->
<!-- <text style="color: #989898;">{{time}}</text> -->
</view>
<view class="card-content">
<view class="card-content-l" style="width: 152rpx;height: 152rpx;">
<image style="width: 152rpx;height: 152rpx;" :src="item.goods.imgs" mode="">
</image>
<image style="width: 152rpx;height: 152rpx;" :src="item.goods.imgs" mode=""></image>
<view class="status">
{{tabIndex==1?"未报价":"已报价" }}
</view>
@ -47,6 +46,9 @@
<up-input :placeholderStyle="{fontSize:'20rpx'}" placeholder="输入报价数量"
:readonly="tabIndex==2" v-model="item.nums"
style="background-color:#F6F6F6;border: none;"></up-input>
<!-- <up-input placeholderStyle='fontSize:24rpx' placeholder="点击数入报价数量" :readonly="tabIndex==2"
v-model="item.num"
style="margin-right: 10rpx;background-color:#F6F6F6;border: none;"></up-input> -->
<view style="width: 10rpx;">
</view>
@ -56,6 +58,17 @@
v-model="item.price"></up-input>
</view>
</view>
<!-- <view class="status-png" v-if="tabIndex==2">
<image v-if="is_storage==1 && is_adopt == 1" :src="waitPng"
style="width: 108rpx; height: 84rpx;">
</image>
<image v-else-if="is_storage==0 && is_adopt == 1" :src="waitPng"
style="width: 108rpx; height: 84rpx;">
</image>
<image v-else :src="waitPng" style="width: 108rpx; height: 84rpx;">
</image>
</view> -->
</view>
<view class="card-footer" v-if="item.nums && item.price">
{{item.nums}}{{item.unit_name}}&nbsp; &nbsp;合计:<text
@ -66,17 +79,23 @@
</view>
<up-empty @click='test2' v-else mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png">
</up-empty>
<!-- <button @click="test2">叫我按钮</button> -->
</up-transition>
</view>
</swiper-item>
<swiper-item>
<!-- 报价记录 -->
<view v-if="showGoods2">
<view v-if="goodsList2.length>0">
<up-transition :show="showGoods2" mode="slide-right">
<view class="" v-if="goodsList2.length>0">
<view class="card" v-for="(item,index) in goodsList2" :key='index'>
<view class="head">
<!-- <text> {{orer_sn}}</text> -->
<!-- <text style="color: #989898;">{{time}}</text> -->
</view>
<view class="card-content">
<view class="card-content-l" style="width: 152rpx;height: 152rpx;">
<image style="width: 152rpx;height: 152rpx;" :src="item.goods.imgs" mode="">
</image>
<image style="width: 152rpx;height: 152rpx;" :src="item.goods.imgs" mode=""></image>
<view class="status">
{{tabIndex==1?"未报价":"已报价" }}
</view>
@ -92,6 +111,9 @@
<up-input placeholderStyle='fontSize:24rpx' placeholder="点击数入报价数量"
:readonly="tabIndex==2" v-model="item.nums"
style="margin-right: 10rpx;background-color:#F6F6F6;border: none;"></up-input>
<!-- <up-input placeholderStyle='fontSize:24rpx' placeholder="点击数入报价数量" :readonly="tabIndex==2"
v-model="item.num"
style="margin-right: 10rpx;background-color:#F6F6F6;border: none;"></up-input> -->
<up-input placeholderStyle='fontSize:24rpx'
style="background-color: #F6F6F6;border: none;" placeholder="点击数入产品报价"
@blur="priceBlur(index,goodsList2)" :readonly="tabIndex==2"
@ -99,8 +121,9 @@
</view>
</view>
<view class="status-png" v-if="tabIndex==2">
<image v-if="item.is_adopt==1" :src="waitPng"
style="width: 108rpx; height: 84rpx;">
<!-- <image :src="item.is_adopt?successPng:errPng" style="width: 108rpx; height: 84rpx;">
</image> -->
<image v-if="item.is_adopt==1" :src="waitPng" style="width: 108rpx; height: 84rpx;">
</image>
<image v-else-if="item.is_adopt==2" :src="successPng"
style="width: 108rpx; height: 84rpx;">
@ -115,25 +138,13 @@
</view>
<up-line style="margin-top: 30rpx;" color="#F3F3F3"></up-line>
</view>
</view>
<up-empty v-else mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png">
</up-empty>
</up-transition>
</view>
</swiper-item>
</swiper>
<!-- 报价列表 -->
<!-- 报价记录 -->
<view class="detail" @click="navgo('/pageQuota/Balance/detail')">
明细
</view>
@ -141,8 +152,6 @@
<up-button shape='circle' color='#20B128' @click="submit" text="提交"></up-button>
</view>
</view>
</view>
</template>

View File

@ -37,8 +37,8 @@
</view>
</view>
<view class="address-btn" v-if="datas.paid==0">
<view style="width: 80px;"><up-button @click="showAddress = true" size="small" shape="circle" color="#f6f6f6"
:customStyle="{color:'#666666'}">修改</up-button></view>
<view style="width: 80px;"><up-button @click="showAddress = true" size="small" shape="circle"
color="#f6f6f6" :customStyle="{color:'#666666'}">修改</up-button></view>
</view>
</view>
<view class="m-card m-address" style="margin-top: 20rpx;" v-else>
@ -49,13 +49,13 @@
</view>
</view>
<view class="address-btn" v-if="datas.paid==0">
<view style="width: 80px;"><up-button @click="showAddress = true" size="small" shape="circle" color="#f6f6f6"
:customStyle="{color:'#666666'}">修改</up-button></view>
<view style="width: 80px;"><up-button @click="showAddress = true" size="small" shape="circle"
color="#f6f6f6" :customStyle="{color:'#666666'}">修改</up-button></view>
</view>
</view>
<view class="m-card m-good" v-for="(item,index) in datas.goods_list" :key="index">
<view class="image">
<up-image :src="item.imgs" width="160rpx" height="160rpx"></up-image>
<up-image :src="item.imgs" width="120rpx" height="120rpx"></up-image>
</view>
<view class="body-content">
<view>
@ -67,11 +67,12 @@
<view>{{item.goods_unit}}</view>
<view>x{{item.nums}}</view>
</view>
</view>
<view class="time">
{{item.msg}}
</view>
</view>
</view>
</view>
<view class="m-card good-info" v-if="datas.paid==0">
<view v-if="datas.goods_list" class="row">
@ -84,7 +85,9 @@
</view>
<view class="row-need">
<view style="margin-right: 10rpx;">需付款</view>
<view v-if="datas.total"><text>¥</text>{{c_price(datas.total, 0)}}<text>.{{c_price(datas.total, 1)}}</text></view>
<view v-if="datas.total">
<text>¥</text>{{c_price(datas.total, 0)}}<text>.{{c_price(datas.total, 1)}}</text>
</view>
</view>
</view>
<view class="m-card good-info">
@ -138,35 +141,54 @@
<block v-if="!datas.paid">
<view style="color: #777777;" @click="showCancel=true">取消订单</view>
<view style="width: 450rpx;">
<up-button color="#20B128" shape="circle" @click="rePay" :throttleTime="1000">立即支付 ¥{{datas.total}}</up-button>
<up-button color="#20B128" shape="circle" @click="rePay" :throttleTime="1000">立即支付
¥{{datas.total}}</up-button>
</view>
</block>
<block v-else>
<view></view>
<view style="width: 450rpx;">
<up-button v-if="datas.status==0||datas.status==1" color="#20B128" shape="circle" @click="showTake=true">确认收货</up-button>
<up-button v-if="datas.status==0||datas.status==1" color="#20B128" shape="circle"
@click="showTake=true">确认收货</up-button>
<up-button v-else color="#20B128" plain shape="circle" @click="purchaseAgain">再次购买</up-button>
</view>
</block>
</view>
<orderCanclePopup :show="showCancel" @close="showCancel=false" @change="submitCancel" />
<addressPopup ref="addressRef" :show="showAddress" :list="addressList" @close="showAddress=false" @change="changeAddress" />
<shopListPopupVue ref="shopRef" :show="shopListShow" :list="merchantList"
@close="shopListShow=false" @change="changeShop" @search="searchShop" />
<modal :show="showTake" title="确认收货" content="请确认您已收到货" @close="showTake=false" @change="confirmReceipt"></modal>
<addressPopup ref="addressRef" :show="showAddress" :list="addressList" @close="showAddress=false"
@change="changeAddress" />
<shopListPopupVue ref="shopRef" :show="shopListShow" :list="merchantList" @close="shopListShow=false"
@change="changeShop" @search="searchShop" />
<modal :show="showTake" title="确认收货" content="请确认您已收到货" @close="showTake=false" @change="confirmReceipt">
</modal>
</view>
</template>
<script setup>
import { onLoad, onBackPress } from "@dcloudio/uni-app";
import { nextTick, ref } from "vue";
import {
onLoad,
onBackPress
} from "@dcloudio/uni-app";
import {
nextTick,
ref
} from "vue";
import addressPopup from "@/components/addressPopup.vue";
import orderCanclePopup from "@/components/orderCanclePopup.vue";
import shopListPopupVue from "@/components/shopListPopup.vue";
import modal from "@/components/modal.vue";
import { orderDetailApi, cancelOrderApi, rePaymentApi, confirmReceiptApi, purchaseAgainApi } from "@/api/order.js"
import { addressListsApi, merchantListApi } from "@/api/user.js";
import {
orderDetailApi,
cancelOrderApi,
rePaymentApi,
confirmReceiptApi,
purchaseAgainApi
} from "@/api/order.js"
import {
addressListsApi,
merchantListApi
} from "@/api/user.js";
const showCancel = ref(false);
const showTake = ref(false);
@ -375,7 +397,8 @@
const minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
const seconds = Math.floor((distance % (1000 * 60)) / 1000);
countDown.value = `${hours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`;
countDown.value =
`${hours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`;
//
if (distance < 0) {
@ -475,8 +498,8 @@
margin-bottom: 20rpx;
.image {
width: 160rpx;
height: 160rpx;
width: 120rpx;
height: 120rpx;
margin-right: 20rpx;
border-radius: 14rpx;
overflow: hidden;
@ -488,6 +511,7 @@
flex-direction: column;
justify-content: space-between;
color: #989898;
// background-color: red;
.title {
display: flex;
@ -542,6 +566,4 @@
font-size: 22rpx;
}
}
</style>

View File

@ -26,15 +26,17 @@
<view class="all"> {{datas.goods_count}} 件商品, 总金额 <text>¥{{datas.total}}</text> </view>
</view>
<view v-if="datas.paid==0" class="item-btn">
<view style="width: 80px;"><up-button size="small" plain color="#989898" shape="circle" @click="cancleOrder">取消订单</up-button></view>
<view style="width: 80px;"><up-button size="small" color="#20B128" shape="circle" @click="rePay">立即支付</up-button></view>
<view style="width: 80px;"><up-button size="small" plain color="#989898" shape="circle"
@click="cancleOrder">取消订单</up-button></view>
<view style="width: 80px;"><up-button size="small" color="#20B128" shape="circle"
@click="rePay">立即支付</up-button></view>
</view>
<view v-else class="item-btn">
<!-- <view style="width: 80px;"><up-button size="small" plain color="#989898" shape="circle">申请售后</up-button></view> -->
<view @click="takeOrder" v-if="datas.status==1" style="width: 80px;"><up-button size="small" color="#20B128"
shape="circle">确认收货</up-button></view>
<view @click="purchaseAgain" v-if="datas.status==2||datas.status==3" style="width: 80px;"><up-button size="small" plain color="#20B128"
shape="circle">再次购买</up-button></view>
<view @click="purchaseAgain" v-if="datas.status==2||datas.status==3" style="width: 80px;"><up-button
size="small" plain color="#20B128" shape="circle">再次购买</up-button></view>
<view @click="navTo" style="width: 80px;"><up-button size="small" plain color="#20B128"
shape="circle">查看详情</up-button></view>
</view>
@ -108,8 +110,8 @@
color: #989898;
.image {
width: 160rpx;
height: 160rpx;
width: 120rpx;
height: 120rpx;
margin-right: 20rpx;
border-radius: 14rpx;
}

View File

@ -25,7 +25,7 @@ const useUserStore = defineStore("user", () => {
// #ifdef H5
token.value = "4f8bef69a4b5a195e9d69a3a72955827"
token.value = "9cc93459ebdb4a2367a53a08b3d96e89"
// token.value = "95b24dd6d2dda836fe07854b08ba0944"
userInfo.value = {
avatar: "https://lihaiim.oss-cn-chengdu.aliyuncs.com/image/admin/default_avatar.png",
@ -35,7 +35,7 @@ const useUserStore = defineStore("user", () => {
mobile: "19330904744",
nickname: "用户1714964250",
supplier: null,
token: "4f8bef69a4b5a195e9d69a3a72955827"
token: "9cc93459ebdb4a2367a53a08b3d96e89"
}
// #endif