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> </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="recoder">
<view class="card" v-for="(item,index) in 10" :key="index"> <view class="card" v-for="(item,index) in 10" :key="index">
<view class="right"> <view class="right">

View File

@ -18,122 +18,133 @@
</view> </view>
</view> </view>
</up-sticky> </up-sticky>
<view class="content"> <view class="content">
<swiper class="swiper" circular>
<swiper-item>
<view v-if="showGoods1">
<view class="" v-if="goodsList1.length>0">
<view class="card" v-for="(item,index) in goodsList1" :key='index'>
<view class="head">
</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>
<view class="status">
{{tabIndex==1?"未报价":"已报价" }}
</view>
</view>
<view class="card-content-r">
<view class="title ellipsis">
{{item.goods.name}}
</view>
<view class="need">
需求量 {{item.need_num}}{{item.unit_name}}
</view>
<view class="ipt">
<up-input :placeholderStyle="{fontSize:'20rpx'}" placeholder="输入报价数量"
:readonly="tabIndex==2" v-model="item.nums"
style="background-color:#F6F6F6;border: none;"></up-input>
<view style="width: 10rpx;">
</view>
<up-input :placeholderStyle="{fontSize:'20rpx'}"
style="background-color: #F6F6F6;border: none;" placeholder="输入产品报价"
@blur="priceBlur(index,goodsList1)" :readonly="tabIndex==2"
v-model="item.price"></up-input>
</view>
</view>
</view>
<view class="card-footer" v-if="item.nums && item.price">
{{item.nums}}{{item.unit_name}}&nbsp; &nbsp;合计:<text
style="font-size: 28rpx;color: #FC452F;font-weight: 700;">{{item.nums*item.price}}</text>
</view>
<up-line style="margin-top: 30rpx;" color="#F3F3F3"></up-line>
</view>
</view>
<up-empty @click='test2' v-else mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png">
</up-empty>
</view>
</swiper-item>
<swiper-item>
<view v-if="showGoods2">
<view v-if="goodsList2.length>0">
<view class="card" v-for="(item,index) in goodsList2" :key='index'>
<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>
<view class="status">
{{tabIndex==1?"未报价":"已报价" }}
</view>
</view>
<view class="card-content-r">
<view class="title ellipsis">
{{item.goods.name}}
</view>
<view class="need">
需求量 {{item.need_num}}{{item.unit_name}}
</view>
<view class="ipt">
<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'
style="background-color: #F6F6F6;border: none;" placeholder="点击数入产品报价"
@blur="priceBlur(index,goodsList2)" :readonly="tabIndex==2"
v-model="item.price"></up-input>
</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>
<image v-else-if="item.is_adopt==2" :src="successPng"
style="width: 108rpx; height: 84rpx;">
</image>
<image v-else :src="errPng" 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
style="font-size: 28rpx;color: #FC452F;font-weight: 700;">{{item.nums*item.price}}</text>
</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>
</view>
</swiper-item>
</swiper>
<!-- 报价列表 --> <!-- 报价列表 -->
<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>
<view class="status">
{{tabIndex==1?"未报价":"已报价" }}
</view>
</view>
<view class="card-content-r">
<view class="title ellipsis">
{{item.goods.name}}
</view>
<view class="need">
需求量 {{item.need_num}}{{item.unit_name}}
</view>
<view class="ipt">
<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>
<up-input :placeholderStyle="{fontSize:'20rpx'}"
style="background-color: #F6F6F6;border: none;" placeholder="输入产品报价"
@blur="priceBlur(index,goodsList1)" :readonly="tabIndex==2"
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
style="font-size: 28rpx;color: #FC452F;font-weight: 700;">{{item.nums*item.price}}</text>
</view>
<up-line style="margin-top: 30rpx;" color="#F3F3F3"></up-line>
</view>
</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>
<!-- 报价记录 --> <!-- 报价记录 -->
<view v-if="showGoods2">
<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>
<view class="status">
{{tabIndex==1?"未报价":"已报价" }}
</view>
</view>
<view class="card-content-r">
<view class="title ellipsis">
{{item.goods.name}}
</view>
<view class="need">
需求量 {{item.need_num}}{{item.unit_name}}
</view>
<view class="ipt">
<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"
v-model="item.price"></up-input>
</view>
</view>
<view class="status-png" v-if="tabIndex==2">
<!-- <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;">
</image>
<image v-else :src="errPng" 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
style="font-size: 28rpx;color: #FC452F;font-weight: 700;">{{item.nums*item.price}}</text>
</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>
<view class="detail" @click="navgo('/pageQuota/Balance/detail')"> <view class="detail" @click="navgo('/pageQuota/Balance/detail')">
明细 明细
</view> </view>
@ -141,8 +152,6 @@
<up-button shape='circle' color='#20B128' @click="submit" text="提交"></up-button> <up-button shape='circle' color='#20B128' @click="submit" text="提交"></up-button>
</view> </view>
</view> </view>
</view> </view>
</template> </template>

File diff suppressed because it is too large Load Diff

View File

@ -1,171 +1,173 @@
<template> <template>
<view class="shop-item"> <view class="shop-item">
<view class="item-title" @click="navTo"> <view class="item-title" @click="navTo">
<view>{{datas.number}}</view> <view>{{datas.number}}</view>
<view v-if="datas.paid==0"> <view v-if="datas.paid==0">
<text>待付款</text> <text>待付款</text>
</view> </view>
<view v-else> <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==1">待收货</text>
<text v-if="datas.status==2||datas.status==3">已完成</text> <text v-if="datas.status==2||datas.status==3">已完成</text>
</view> </view>
</view> </view>
<view class="item-body" @click="navTo"> <view class="item-body" @click="navTo">
<view class="body-content"> <view class="body-content">
<view style="display: flex;flex: 1;flex-shrink: 0;"> <view style="display: flex;flex: 1;flex-shrink: 0;">
<view v-for="(item,index) in datas.goods_list" :key="index"> <view v-for="(item,index) in datas.goods_list" :key="index">
<image class="image" :src="item.imgs"></image> <image class="image" :src="item.imgs"></image>
</view> </view>
</view> </view>
<view <view
style="display: flex;flex-direction: column;align-items: center;justify-content: center;width: 100rpx;"> style="display: flex;flex-direction: column;align-items: center;justify-content: center;width: 100rpx;">
<up-icon name="arrow-right-double" color="#20B128"></up-icon> <up-icon name="arrow-right-double" color="#20B128"></up-icon>
</view> </view>
</view> </view>
<view class="all"> {{datas.goods_count}} 件商品, 总金额 <text>¥{{datas.total}}</text> </view> <view class="all"> {{datas.goods_count}} 件商品, 总金额 <text>¥{{datas.total}}</text> </view>
</view> </view>
<view v-if="datas.paid==0" class="item-btn"> <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" plain color="#989898" shape="circle"
<view style="width: 80px;"><up-button size="small" color="#20B128" shape="circle" @click="rePay">立即支付</up-button></view> @click="cancleOrder">取消订单</up-button></view>
</view> <view style="width: 80px;"><up-button size="small" color="#20B128" shape="circle"
<view v-else class="item-btn"> @click="rePay">立即支付</up-button></view>
<!-- <view style="width: 80px;"><up-button size="small" plain color="#989898" shape="circle">申请售后</up-button></view> --> </view>
<view @click="takeOrder" v-if="datas.status==1" style="width: 80px;"><up-button size="small" color="#20B128" <view v-else class="item-btn">
shape="circle">确认收货</up-button></view> <!-- <view style="width: 80px;"><up-button size="small" plain color="#989898" 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" <view @click="takeOrder" v-if="datas.status==1" style="width: 80px;"><up-button size="small" color="#20B128"
shape="circle">再次购买</up-button></view> shape="circle">确认收货</up-button></view>
<view @click="navTo" style="width: 80px;"><up-button size="small" plain color="#20B128" <view @click="purchaseAgain" v-if="datas.status==2||datas.status==3" style="width: 80px;"><up-button
shape="circle">查看详情</up-button></view> size="small" plain color="#20B128" shape="circle">再次购买</up-button></view>
</view> <view @click="navTo" style="width: 80px;"><up-button size="small" plain color="#20B128"
<!-- <view v-if="type==3" class="item-close"> shape="circle">查看详情</up-button></view>
</view>
<!-- <view v-if="type==3" class="item-close">
<view class="title"> <view class="title">
<view class="type">退款申请中</view> <view class="type">退款申请中</view>
<view>等待商家处理</view> <view>等待商家处理</view>
</view> </view>
<up-icon name="arrow-right"></up-icon> <up-icon name="arrow-right"></up-icon>
</view> --> </view> -->
</view> </view>
</template> </template>
<script setup> <script setup>
// 0123) // 0123)
const props = defineProps({ const props = defineProps({
type: { type: {
type: Number, type: Number,
default: 0 default: 0
}, },
datas: { datas: {
type: Object, type: Object,
default: () => {} default: () => {}
} }
}) })
const navTo = () => { const navTo = () => {
uni.navigateTo({ uni.navigateTo({
url: `/pagesOrder/detail/detail?type=${props.datas.paid}&id=${props.datas.id}` url: `/pagesOrder/detail/detail?type=${props.datas.paid}&id=${props.datas.id}`
}) })
} }
const emit = defineEmits(['cancleOrder', 'rePay', 'takeOrder', 'purchaseAgain']); const emit = defineEmits(['cancleOrder', 'rePay', 'takeOrder', 'purchaseAgain']);
const cancleOrder = ()=>{ const cancleOrder = () => {
emit('cancleOrder', props.datas) emit('cancleOrder', props.datas)
} }
const takeOrder = ()=>{ const takeOrder = () => {
emit('takeOrder', props.datas) emit('takeOrder', props.datas)
} }
const purchaseAgain = ()=>{ const purchaseAgain = () => {
emit('purchaseAgain', props.datas) emit('purchaseAgain', props.datas)
} }
const rePay = ()=>{ const rePay = () => {
emit('rePay', props.datas) emit('rePay', props.datas)
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.shop-item { .shop-item {
width: 710rpx; width: 710rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
background-color: #fff; background-color: #fff;
border-radius: 14rpx; border-radius: 14rpx;
padding: 20rpx; padding: 20rpx;
box-sizing: border-box; box-sizing: border-box;
.item-title { .item-title {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.item-body { .item-body {
margin: 20rpx 0; margin: 20rpx 0;
.body-content { .body-content {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
color: #989898; color: #989898;
.image { .image {
width: 160rpx; width: 120rpx;
height: 160rpx; height: 120rpx;
margin-right: 20rpx; margin-right: 20rpx;
border-radius: 14rpx; border-radius: 14rpx;
} }
.title { .title {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
font-size: 28rpx; font-size: 28rpx;
color: #444; color: #444;
} }
.tips { .tips {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
font-size: 24rpx; font-size: 24rpx;
margin-top: 10rpx; margin-top: 10rpx;
} }
} }
.all { .all {
text-align: right; text-align: right;
font-size: 26rpx; font-size: 26rpx;
text { text {
color: #F55726; color: #F55726;
} }
} }
} }
.item-btn { .item-btn {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
view { view {
width: 80rpx; width: 80rpx;
margin-left: 20rpx; margin-left: 20rpx;
} }
} }
.item-close { .item-close {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
background-color: #F6F6F6; background-color: #F6F6F6;
padding: 15rpx; padding: 15rpx;
border-radius: 14rpx; border-radius: 14rpx;
.title { .title {
display: flex; display: flex;
.type { .type {
font-weight: 600; font-weight: 600;
margin-right: 20rpx; margin-right: 20rpx;
} }
} }
} }
} }
</style> </style>

View File

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