|
|
@@ -18,10 +18,10 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column :label="$t('shop.productName')" min-width="140" align="center" prop="GOODS_NAME">
|
|
|
<template slot-scope="{row}">
|
|
|
- <span style="word-break: keep-all;">{{ row.GOODS_NAME }}</span>
|
|
|
+ <span style="word-break: keep-all; cursor: pointer;" @click="handleProduct(row)">{{ row.GOODS_NAME }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column :label="$t('shop.productPicture')" align="center" min-width="80px" prop="GOODS_NAME">
|
|
|
+ <el-table-column :label="$t('shop.productPicture')" align="center" min-width="80px">
|
|
|
<template slot-scope="{row}">
|
|
|
<el-image
|
|
|
style="width: 80px; height: 80px"
|
|
|
@@ -75,17 +75,22 @@
|
|
|
<el-dialog :title="$t('shop.productsSettlement')" :visible.sync="visibleShoppingCart" :width="screenWidth" v-loading="shoppingCartLoading" style="margin-top: -95px;">
|
|
|
<div v-loading="loading">
|
|
|
<div class="white-box">
|
|
|
- <el-table :data="goods" style="width: 100%" show-summary :summary-method="getSummaries">
|
|
|
+ <el-table :data="goods" v-if="media === 'medium'">
|
|
|
<el-table-column :label="$t('shop.productPicture')" align="center" min-width="90px">
|
|
|
<template slot-scope="{row}">
|
|
|
<el-image
|
|
|
style="width: 80px; height: 80px"
|
|
|
:src="tool.getArImage(row.COVER, '/files/')"
|
|
|
- :preview-src-list="[tool.getArImage(row.COVER, '/files/')]">
|
|
|
+ :preview-src-list="[tool.getArImage(row.COVER, '/files/')]"
|
|
|
+ >
|
|
|
</el-image>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column :label="$t('shop.productName')" prop="GOODS_NAME" align="center" min-width="130px"></el-table-column>
|
|
|
+ <el-table-column :label="$t('shop.productName')" prop="GOODS_NAME" align="center" min-width="130px">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <span style="cursor: pointer;" @click="handleProduct(row)">{{ row.GOODS_NAME }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column :label="$t('shop.qty')" prop="chose_num" align="center" min-width="90px"></el-table-column >
|
|
|
<el-table-column :label="$t('shop.productPrice')" prop="member_price" align="center" min-width="130px">
|
|
|
<template slot-scope="{row}">
|
|
|
@@ -97,14 +102,39 @@
|
|
|
<span>{{ $t('currency.sign') }} {{ row.member_price_plus }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column :label="$t('shop.taxRate')" prop="TAX_RATE" align="center" min-width="70px">
|
|
|
- <template slot-scope="{row}">
|
|
|
- <span>{{ row.TAX_RATE / 100 }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column :label="$t('shop.totalTaxAmount')" prop="tax_amount_plus" align="center" min-width="120px">
|
|
|
+<!-- <el-table-column :label="$t('shop.taxRate')" prop="TAX_RATE" align="center" min-width="70px">-->
|
|
|
+<!-- <template slot-scope="{row}">-->
|
|
|
+<!-- <span>{{ row.TAX_RATE / 100 }}</span>-->
|
|
|
+<!-- </template>-->
|
|
|
+<!-- </el-table-column>-->
|
|
|
+<!-- <el-table-column :label="$t('shop.totalTaxAmount')" prop="tax_amount_plus" align="center" min-width="120px">-->
|
|
|
+<!-- <template slot-scope="{row}">-->
|
|
|
+<!-- <span>{{ $t('currency.sign') }} {{ row.tax_amount_plus }}</span>-->
|
|
|
+<!-- </template>-->
|
|
|
+<!-- </el-table-column>-->
|
|
|
+ </el-table>
|
|
|
+
|
|
|
+ <el-table :data="goods" v-else :show-header="false">
|
|
|
+ <el-table-column align="center">
|
|
|
<template slot-scope="{row}">
|
|
|
- <span>{{ $t('currency.sign') }} {{ row.tax_amount_plus }}</span>
|
|
|
+ <el-container>
|
|
|
+ <el-aside width="100px" style="background-color: #ffffff; padding: 10px 0;">
|
|
|
+ <el-image style="width: 100px; height: 100px" :src="tool.getArImage(row.COVER, '/files/')" @click="handleProduct(row)"></el-image>
|
|
|
+ </el-aside>
|
|
|
+ <el-main>
|
|
|
+ <div style="text-align: left;">
|
|
|
+ <span style="font-weight: bold;" @click="handleProduct(row)">{{ row.GOODS_NAME }}</span><br />
|
|
|
+ <span>{{ row.GOODS_NO }}</span><br />
|
|
|
+ <span style="display: inline-block;">
|
|
|
+ <span style="float: left; color: tomato;">{{ $t('currency.sign') }} {{ row.member_price }}</span>
|
|
|
+ </span>
|
|
|
+ <span style="float: right;">
|
|
|
+ x {{ row.chose_num }}
|
|
|
+ </span><br />
|
|
|
+ <span>{{ $t('shop.totalPrice') }}:{{ $t('currency.sign') }} {{ row.member_price_plus }}</span>
|
|
|
+ </div>
|
|
|
+ </el-main>
|
|
|
+ </el-container>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -126,7 +156,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <!-- 支付方式/账户余额 -->
|
|
|
+ <!-- 支付方式/账户余额 {{ cashCurrency }}: -->
|
|
|
<div class="box address_box">
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :xs="24" :sm="24" :lg="6">
|
|
|
@@ -136,7 +166,7 @@
|
|
|
<el-radio-group v-model="payType" @change='chosePayType'>
|
|
|
<div v-for="(item, index) in payList" :key='index' class="address">
|
|
|
<el-radio :label="item.label" border>
|
|
|
- {{ item.name }}<span v-if="item.label === 'cash'" style="color: tomato;">({{ cashCurrency }}: {{ $t('currency.sign') }} {{ userBalance.cash }})</span>
|
|
|
+ {{ item.name }}<span v-if="item.label === 'cash'" style="color: tomato;">({{ $t('currency.sign') }} {{ userBalance.cash }})</span>
|
|
|
</el-radio>
|
|
|
</div>
|
|
|
</el-radio-group>
|
|
|
@@ -223,13 +253,33 @@
|
|
|
</el-result>
|
|
|
</el-card>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <!-- 商品详情 -->
|
|
|
+ <el-dialog :title="product.GOODS_NO" :visible.sync="visibleProduct" :width="screenWidth" style="margin-top: -95px;">
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col :xs="24" :sm="12" :lg="12">
|
|
|
+ <el-image style="width: 100%; height: 100%" :style="imageStyle" :src="tool.getArImage(product.COVER, '/files/')"></el-image>
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="24" :sm="12" :lg="12">
|
|
|
+ <div style="text-align: left; line-height: 50px; font-size: 16px;">
|
|
|
+ <span style="font-weight: bold; font-size: 20px;">{{ product.GOODS_NAME }}</span><br />
|
|
|
+ <span style="font-weight: bold; font-size: 15px;">{{ $t('shop.productCode') }}:{{ product.GOODS_NO }}</span><br />
|
|
|
+ <span style="color: tomato;">{{ $t('shop.productPrice') }}:{{ $t('currency.sign') }} {{ product.SELL_PRICE }}</span><br />
|
|
|
+ <span>{{ $t('shop.productBV') }}:{{ product.PRICE_PV }}</span><br />
|
|
|
+ <span>{{ $t('shop.taxRate') }}:{{ product.TAX_RATE / 100 }}</span><br />
|
|
|
+ <span>{{ $t('shop.taxAmount') }}:{{ $t('currency.sign') }} {{ product.taxAmount }}</span><br />
|
|
|
+ <span>{{ $t('shop.inventory') }}:{{ product.STORE_NUMS }}</span>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import {fetchProductList, createApproachOrder, deleteApproachOrder, fetchShoppingCart, createOrder} from '@/api/shop'
|
|
|
import waves from '@/directive/waves'
|
|
|
- import {formatAmount, getScreenWidth} from '@/utils'
|
|
|
+ import {formatAmount, getMedia, getScreenWidth} from '@/utils'
|
|
|
import tool from '@/utils/tool'
|
|
|
import Pagination from '@/components/Pagination'
|
|
|
import usersInfo from "@/utils/usersInfo"
|
|
|
@@ -339,9 +389,22 @@
|
|
|
shippingAddressList: [],
|
|
|
|
|
|
screenWidth: getScreenWidth() > 600 ? '80%' : getScreenWidth() + 'px',
|
|
|
+ media: getMedia(),
|
|
|
labelPosition: getScreenWidth() > 600 ? 'right' : 'top',
|
|
|
dialog: false,
|
|
|
dialogLoading: false,
|
|
|
+
|
|
|
+ visibleProduct: false,
|
|
|
+ product: {
|
|
|
+ GOODS_NAME: '',
|
|
|
+ GOODS_NO: '',
|
|
|
+ COVER: '',
|
|
|
+ SELL_PRICE: '',
|
|
|
+ PRICE_PV: '',
|
|
|
+ TAX_RATE: '',
|
|
|
+ taxAmount: '',
|
|
|
+ },
|
|
|
+ imageStyle: 'margin-top: -50px;',
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
@@ -713,6 +776,12 @@
|
|
|
}
|
|
|
}, 1000)
|
|
|
},
|
|
|
+ // 商品详情
|
|
|
+ handleProduct(row) {
|
|
|
+ this.product = row
|
|
|
+ this.product.taxAmount = tool.calculateTax(row.SELL_PRICE, row.TAX_RATE)
|
|
|
+ this.visibleProduct = true
|
|
|
+ },
|
|
|
},
|
|
|
}
|
|
|
</script>
|