Browse Source

提交

master
chenkainan 5 months ago
parent
commit
38ee530ea8
  1. 16
      components/cartData.vue
  2. 22
      subPackages/order/detail.vue
  3. 25
      subPackages/order/gwcOrder.vue
  4. 1
      subPackages/order/trades.vue
  5. 4
      subPackages/techan/index.vue
  6. 14
      subPackages/user/gwc.vue

16
components/cartData.vue

@ -233,14 +233,14 @@
}) })
return return
} }
let merchant_ids = this.cartData.filter(v=>v.isSelected).map(v=>v.merchant_id) // let merchant_ids = this.cartData.filter(v=>v.isSelected).map(v=>v.merchant_id)
if (merchant_ids.some(v=>v!=merchant_ids[0])) { // if (merchant_ids.some(v=>v!=merchant_ids[0])) {
uni.showToast({ // uni.showToast({
title:'购物车只可下单同一供应商的产品', // title:'',
icon:'none', // icon:'none',
}) // })
return // return
} // }
let orderData = this.cartData.filter(v=>v.isSelected).map(v=>{ let orderData = this.cartData.filter(v=>v.isSelected).map(v=>{
return { return {

22
subPackages/order/detail.vue

@ -144,12 +144,15 @@
</view> </view>
<!-- 产品详情 --> <!-- 产品详情 -->
<view class="pgoods-detail"> <view class="pgoods-detail" v-for="(fItem,fIndex) in info.order_child" :key="fIndex">
{{info.order_child[0].data[0].list_merchant_name}} {{fItem.data[0].list_merchant_name}}
<view class="pgoods-product" v-for="(item,index) in info.order_child[0].data" :key="index" :style="{paddingBottom: item.status == 'WAIT_COMMENT' ? '107rpx' : ''}"> <view class="pgoods-product" v-for="(item,index) in fItem.data" :key="index" :style="{paddingBottom: item.status == 'WAIT_COMMENT' ? '107rpx' : ''}">
<image :src="showImg(item.specifications_image)" mode="aspectFill" class="product-img"></image> <image :src="showImg(item.specifications_image)" mode="aspectFill" class="product-img"></image>
<view class="product-content flex-column"> <view class="product-content flex-column">
<view class="product-title">{{item.goods_title}}</view> <view class="product-title flex-between">
{{item.goods_title}}
<span>{{item.money / 100}}</span>
</view>
<view class="product-subtitle flex-between"> <view class="product-subtitle flex-between">
{{item.specifications_name}} {{item.specifications_name}}
<span>x{{item.num}}</span> <span>x{{item.num}}</span>
@ -161,13 +164,16 @@
<!-- 商品价格 --> <!-- 商品价格 -->
<view class="public-price"> <view class="public-price">
<view class="flex-between"> <view class="flex-between">
商品总额<span>{{info.money / 100}}</span> 商品总额<span>{{fItem.total_price / 100}}</span>
</view> </view>
<view class="flex-between" v-if="info.discounts"> <view class="flex-between">
优惠券<span>-{{info.discounts / 100}}</span> 邮费<span>{{fItem.total_post_money / 100}}</span>
</view> </view>
<!-- <view class="flex-between" v-if="info.discounts">
优惠券<span>-{{info.discounts / 100}}</span>
</view> -->
<view class="flex-between"> <view class="flex-between">
实付金额<span style="font-size: 35rpx;color: #C3282E;">{{info.pay_money / 100}}</span> 实付金额<span style="font-size: 35rpx;color: #C3282E;">{{(fItem.total_price + fItem.total_post_money) / 100}}</span>
</view> </view>
</view> </view>
</view> </view>

25
subPackages/order/gwcOrder.vue

@ -34,8 +34,9 @@
<view class="title"> <view class="title">
<view class="text-overflowRows" style="font-size: 31rpx;font-weight: 500;color: #000;">{{ item.specifications_name }}</view> <view class="text-overflowRows" style="font-size: 31rpx;font-weight: 500;color: #000;">{{ item.specifications_name }}</view>
<view class="price-list"> <view class="price-list">
<view class="price-r">{{ item.Specifications_money / 100 }}</view> <view class="price-r">{{ item.Specifications_money / 100 }}</view>
<!-- <view class="price-g">¥{{ info.skuInfo.price / 100 }}</view> --> <!-- <view class="price-g">¥{{ info.skuInfo.price / 100 }}</view> -->
<view class="price-g" v-if="item.post_money">{{ item.post_money / 100 }}</view>
</view> </view>
</view> </view>
<view class="num-box"> <view class="num-box">
@ -215,6 +216,8 @@ export default {
this.post = 0 this.post = 0
res.data.forEach((item)=> { res.data.forEach((item)=> {
this.post += item.post_money this.post += item.post_money
const postItem = this.info.find(i => i.specifications_id == item.specifications_id)
if(postItem) postItem.post_money = item.post_money
}) })
this.flag = true; this.flag = true;
} }
@ -509,7 +512,9 @@ view {
color: #000000; color: #000000;
.price-list { .price-list {
width: 600rpx;
display: flex; display: flex;
justify-content: space-between;
margin-top: 18rpx; margin-top: 18rpx;
align-items: center; align-items: center;
.price-r { .price-r {
@ -518,19 +523,23 @@ view {
font-weight: 500; font-weight: 500;
color: #FC5109; color: #FC5109;
&:before { &:before {
content: '¥'; content: '小计:';
display: inline-block; display: inline-block;
color: #FC5109; color: #000;
font-size: 24rpx; font-size: 24rpx;
} }
} }
.price-g { .price-g {
font-size: 24rpx; font-size: 32rpx;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 500;
color: #b5bcc9; color: #FC5109;
text-decoration: line-through; &:before {
margin-left: 10rpx; content: '运费:';
display: inline-block;
color: #000;
font-size: 24rpx;
}
} }
} }
} }

1
subPackages/order/trades.vue

@ -317,6 +317,7 @@
this.Post(data, '/api/order/orderList').then(res => { this.Post(data, '/api/order/orderList').then(res => {
let arr = res.data; let arr = res.data;
arr.forEach(item => { arr.forEach(item => {
console.log(item)
item.order_child.forEach((itemX, index) => { item.order_child.forEach((itemX, index) => {
if (index > 0) { if (index > 0) {
item.order_child[0].data = [...item.order_child[0].data, ...itemX item.order_child[0].data = [...item.order_child[0].data, ...itemX

4
subPackages/techan/index.vue

@ -112,8 +112,8 @@
</view> </view>
<view class="bottom-detail-icon" @click.stop="showCartClick"> <view class="bottom-detail-icon" @click.stop="showCartClick">
明细 明细
<view v-if="!paramData.showCart" style="transform: rotate(-90deg);"><uni-icons color="#0B898E" type="left" size="15"></uni-icons></view> <view v-if="!paramData.showCart" style="transform: rotate(90deg);"><uni-icons color="#0B898E" type="left" size="15"></uni-icons></view>
<view v-else style="transform: rotate(90deg);"><uni-icons color="#0B898E" type="left" size="15"></uni-icons></view> <view v-else style="transform: rotate(-90deg);"><uni-icons color="#0B898E" type="left" size="15"></uni-icons></view>
</view> </view>
</view> </view>

14
subPackages/user/gwc.vue

@ -229,13 +229,13 @@
} }
}) })
}) })
if (Array.from(new Set(ids)).length > 1) { // if (Array.from(new Set(ids)).length > 1) {
uni.showToast({ // uni.showToast({
title: '请选择同一商户下的商品', // title: '',
icon: 'none' // icon: 'none'
}) // })
return; // return;
} // }
if (list.length == 0) { if (list.length == 0) {
uni.showToast({ uni.showToast({
title: '请选择商品', title: '请选择商品',

Loading…
Cancel
Save