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,122 +18,133 @@
</view>
</view>
</up-sticky>
<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>
@ -141,8 +152,6 @@
<up-button shape='circle' color='#20B128' @click="submit" text="提交"></up-button>
</view>
</view>
</view>
</template>

File diff suppressed because it is too large Load Diff

View File

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

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