mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-17 08:25:52 +08:00
bug修改
This commit is contained in:
@@ -11,7 +11,7 @@ import App from './App'
|
||||
import { router } from './router/index'
|
||||
import store from './store'
|
||||
import i18n from '@/locale'
|
||||
|
||||
import vueQr from 'vue-qr'
|
||||
import { getRequest, postRequest, putRequest, deleteRequest, importRequest, uploadFileRequest } from '@/libs/axios'
|
||||
import { setStore, getStore, removeStore } from '@/libs/storage'
|
||||
import util from '@/libs/util'
|
||||
@@ -22,6 +22,12 @@ import liliDialog from '@/views/lili-dialog'
|
||||
import {md5} from '@/utils/md5.js';
|
||||
Vue.config.devtools = true;
|
||||
Vue.config.productionTip = false
|
||||
Vue.prototype.linkTo = function (goodsId, skuId, link='https://pc-b2b2c.pickmall.cn') { // 跳转买家端商品
|
||||
window.open(`${link}/goodsDetail?skuId=${skuId}&goodsId=${goodsId}`, '_blank')
|
||||
};
|
||||
Vue.prototype.wapLinkTo = function (goodsId, skuId) { // app端二维码
|
||||
return `https://m-b2b2c.pickmall.cn/pages/product/goods?id=${skuId}&goodsId=${goodsId}`
|
||||
};
|
||||
Vue.use(VueLazyload, {
|
||||
error: require('./assets/img-error.png'),
|
||||
loading: require('./assets/loading2.gif')
|
||||
@@ -31,6 +37,7 @@ Vue.use(ViewUI, {
|
||||
});
|
||||
|
||||
Vue.component('liliDialog',liliDialog)
|
||||
Vue.component(vueQr)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -21,7 +21,21 @@
|
||||
<Button @click="delAll">批量删除</Button>
|
||||
</Row>
|
||||
<Row>
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect"></Table>
|
||||
<Table :loading="loading" border :columns="columns" :data="data" ref="table" sortable="custom" @on-sort-change="changeSort" @on-selection-change="changeSelect">
|
||||
<template slot="goodsName" slot-scope="{row}">
|
||||
<div>
|
||||
<div class="div-zoom">
|
||||
<a @click="linkTo(row.goodsId,row.skuId)">{{row.goodsName}}</a>
|
||||
</div>
|
||||
<Poptip trigger="hover" title="扫码在手机中查看" transfer>
|
||||
<div slot="content">
|
||||
<vue-qr :text="wapLinkTo(row.goodsId,row.skuId)" :margin="0" colorDark="#000" colorLight="#fff" :size="150"></vue-qr>
|
||||
</div>
|
||||
<img src="../../assets/qrcode.svg" class="hover-pointer" width="20" height="20" alt="">
|
||||
</Poptip>
|
||||
</div>
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10,20,50]" size="small" show-total show-elevator show-sizer></Page>
|
||||
@@ -84,7 +98,7 @@ export default {
|
||||
},
|
||||
{
|
||||
title: "商品名称",
|
||||
key: "goodsName",
|
||||
slot: "goodsName",
|
||||
minWidth: 200,
|
||||
tooltip: true
|
||||
},
|
||||
@@ -99,7 +113,6 @@ export default {
|
||||
{
|
||||
title: "库存",
|
||||
key: "quantity",
|
||||
minWidth: 80
|
||||
},
|
||||
{
|
||||
title: "添加时间",
|
||||
@@ -109,13 +122,11 @@ export default {
|
||||
{
|
||||
title: "店铺名称",
|
||||
key: "storeName",
|
||||
minWidth: 120,
|
||||
tooltip: true
|
||||
},
|
||||
{
|
||||
title: "佣金金额",
|
||||
key: "commission",
|
||||
minWidth: 120,
|
||||
sortable: false,
|
||||
render: (h, params) => {
|
||||
return h("div", this.$options.filters.unitPrice(params.row.commission,'¥'));
|
||||
|
||||
@@ -262,24 +262,24 @@
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
init() { // 初始化数据
|
||||
this.getDataList();
|
||||
},
|
||||
changePage(v) {
|
||||
changePage(v) { // 改变页码
|
||||
this.searchForm.pageNumber = v;
|
||||
this.getDataList();
|
||||
this.clearSelectAll();
|
||||
},
|
||||
changePageSize(v) {
|
||||
changePageSize(v) { // 改变每页数量
|
||||
this.searchForm.pageSize = v;
|
||||
this.getDataList();
|
||||
},
|
||||
handleSearch() {
|
||||
handleSearch() { // 搜索
|
||||
this.searchForm.pageNumber = 1;
|
||||
this.searchForm.pageSize = 10;
|
||||
this.getDataList();
|
||||
},
|
||||
changeSort(e) {
|
||||
changeSort(e) { // 排序
|
||||
this.searchForm.sort = e.key;
|
||||
this.searchForm.order = e.order;
|
||||
if (e.order === "normal") {
|
||||
@@ -287,14 +287,14 @@
|
||||
}
|
||||
this.getDataList();
|
||||
},
|
||||
clearSelectAll() {
|
||||
clearSelectAll() { // 取消全部选中
|
||||
this.$refs.table.selectAll(false);
|
||||
},
|
||||
changeSelect(e) {
|
||||
changeSelect(e) { // 选中一项
|
||||
this.selectList = e;
|
||||
this.selectCount = e.length;
|
||||
},
|
||||
getDataList() {
|
||||
getDataList() { // 获取列表数据
|
||||
this.loading = true;
|
||||
// 带多条件搜索参数获取表单数据
|
||||
this.searchForm.isAuth = 0;
|
||||
@@ -306,7 +306,7 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
examine(v, isAuth) {
|
||||
examine(v, isAuth) { // 审核商品
|
||||
let examine = "通过";
|
||||
this.goodsAuditForm.isAuth = "PASS";
|
||||
if (isAuth != 1) {
|
||||
|
||||
@@ -87,16 +87,22 @@
|
||||
@on-selection-change="changeSelect"
|
||||
>
|
||||
<!-- 商品栏目格式化 -->
|
||||
<template slot="goodsSlot" slot-scope="scope">
|
||||
<template slot="goodsSlot" slot-scope="{row}">
|
||||
<div style="margin-top: 5px;height: 80px; display: flex;">
|
||||
<div style="">
|
||||
<img :src="scope.row.goodsImage" style="height: 60px;margin-top: 3px">
|
||||
<img :src="row.goodsImage" style="height: 60px;margin-top: 3px">
|
||||
</div>
|
||||
|
||||
<div style="margin-left: 13px;margin-top: 3px;">
|
||||
<div class="div-zoom" >
|
||||
<a>{{scope.row.goodsName}}</a>
|
||||
<div style="margin-left: 13px;">
|
||||
<div class="div-zoom">
|
||||
<a @click="linkTo(row.goodsId,row.skuId)">{{row.goodsName}}</a>
|
||||
</div>
|
||||
<Poptip trigger="hover" title="扫码在手机中查看" transfer>
|
||||
<div slot="content">
|
||||
<vue-qr :text="wapLinkTo(row.goodsId,row.skuId)" :margin="0" colorDark="#000" colorLight="#fff" :size="150"></vue-qr>
|
||||
</div>
|
||||
<img src="../../../assets/qrcode.svg" class="hover-pointer" width="20" height="20" alt="">
|
||||
</Poptip>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -47,7 +47,17 @@
|
||||
sortable="custom"
|
||||
@on-sort-change="changeSort"
|
||||
@on-selection-change="changeSelect"
|
||||
></Table>
|
||||
>
|
||||
<template slot-scope="{row}" slot="goodsName">
|
||||
<a class="mr_10" @click="linkTo(row.goodsId,row.skuId)">{{row.goodsName}}</a>
|
||||
<Poptip trigger="hover" title="扫码在手机中查看" transfer>
|
||||
<div slot="content">
|
||||
<vue-qr :text="wapLinkTo(row.goodsId,row.skuId)" :margin="0" colorDark="#000" colorLight="#fff" :size="150"></vue-qr>
|
||||
</div>
|
||||
<img src="../../../assets/qrcode.svg" style="vertical-align:bottom;" class="hover-pointer" width="20" height="20" alt="">
|
||||
</Poptip>
|
||||
</template>
|
||||
</Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page">
|
||||
<Page
|
||||
@@ -167,7 +177,7 @@
|
||||
},
|
||||
{
|
||||
title: "商品名称",
|
||||
key: "goodsName",
|
||||
slot: "goodsName",
|
||||
minWidth: 170,
|
||||
tooltip: true
|
||||
|
||||
@@ -175,7 +185,6 @@
|
||||
{
|
||||
title: "投诉主题",
|
||||
key: "complainTopic",
|
||||
minWidth: 120,
|
||||
tooltip: true
|
||||
},
|
||||
{
|
||||
|
||||
@@ -158,26 +158,30 @@
|
||||
sortable="custom"
|
||||
>
|
||||
<!-- 商品栏目格式化 -->
|
||||
<template slot="goodsSlot" slot-scope="scope">
|
||||
<template slot="goodsSlot" slot-scope="{row}">
|
||||
<div style="margin-top: 5px; height: 80px; display: flex">
|
||||
<div style="">
|
||||
<img
|
||||
:src="scope.row.image"
|
||||
:src="row.image"
|
||||
style="height: 60px; margin-top: 1px; width: 60px"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div style="margin-left: 13px">
|
||||
<div class="div-zoom">
|
||||
<a>{{ scope.row.goodsName }}</a>
|
||||
<a @click="linkTo(row.goodsId,row.skuId)">{{row.goodsName}}</a>
|
||||
</div>
|
||||
<div>
|
||||
<span v-for="(item, key) in JSON.parse(scope.row.specs)">
|
||||
<span v-show="key!='images'" style="font-size: 12px;color: #999999;">
|
||||
{{key}} : {{item}}
|
||||
</span>
|
||||
<span v-for="(item, key) in JSON.parse(row.specs)">
|
||||
<span v-show="key!='images'" style="font-size: 12px;color: #999999;">
|
||||
{{key}} : {{item}}
|
||||
</span>
|
||||
</div>
|
||||
</span>
|
||||
<Poptip trigger="hover" style="display: block;" title="扫码在手机中查看" transfer>
|
||||
<div slot="content">
|
||||
<vue-qr :text="wapLinkTo(row.goodsId,row.skuId)" :margin="0" colorDark="#000" colorLight="#fff" :size="150"></vue-qr>
|
||||
</div>
|
||||
<img src="../../../assets/qrcode.svg" class="hover-pointer" width="20" height="20" alt="">
|
||||
</Poptip>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -225,7 +225,6 @@ export default {
|
||||
{
|
||||
title: "状态",
|
||||
key: "promotionStatus",
|
||||
minWidth: 100,
|
||||
fixed: "right",
|
||||
render: (h, params) => {
|
||||
let text = "未知",
|
||||
|
||||
@@ -156,13 +156,16 @@
|
||||
:data="form.promotionGoodsList"
|
||||
@on-selection-change="changeSelect"
|
||||
>
|
||||
<template slot-scope="{ row }" slot="QRCode">
|
||||
<img
|
||||
:src="row.QRCode || '../../../assets/lili.png'"
|
||||
width="50px"
|
||||
height="50px"
|
||||
alt=""
|
||||
/>
|
||||
<template slot-scope="{ row }" slot="goodsName">
|
||||
<div>
|
||||
<a class="mr_10" @click="linkTo(row.goodsId,row.skuId)">{{row.goodsName}}</a>
|
||||
<Poptip trigger="hover" title="扫码在手机中查看" transfer>
|
||||
<div slot="content">
|
||||
<vue-qr :text="wapLinkTo(row.goodsId,row.skuId)" :margin="0" colorDark="#000" colorLight="#fff" :size="150"></vue-qr>
|
||||
</div>
|
||||
<img src="../../../assets/qrcode.svg" style="vertical-align:middle;" class="hover-pointer" width="20" height="20" alt="">
|
||||
</Poptip>
|
||||
</div>
|
||||
</template>
|
||||
</Table>
|
||||
</FormItem>
|
||||
@@ -201,7 +204,7 @@ export default {
|
||||
},
|
||||
{
|
||||
title: "商品名称",
|
||||
key: "goodsName",
|
||||
slot: "goodsName",
|
||||
minWidth: 120,
|
||||
},
|
||||
{
|
||||
@@ -215,20 +218,11 @@ export default {
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "图片",
|
||||
key: "quantity",
|
||||
minWidth: 40,
|
||||
},
|
||||
{
|
||||
title: "库存",
|
||||
key: "quantity",
|
||||
minWidth: 40,
|
||||
},
|
||||
// {
|
||||
// title: "商品二维码",
|
||||
// slot: "QRCode",
|
||||
// },
|
||||
}
|
||||
],
|
||||
options: {
|
||||
disabledDate(date) {
|
||||
|
||||
@@ -22,17 +22,17 @@
|
||||
@on-selection-change="changeSelect"
|
||||
>
|
||||
<template slot-scope="{ row }" slot="goodsName">
|
||||
<span>{{ row.goodsName }}</span>
|
||||
</template>
|
||||
<template slot-scope="{ row }" slot="QRCode">
|
||||
<Button @click="toBuyerGoods(row)" type="info">商品链接地址</Button>
|
||||
<Button
|
||||
v-if="row.QRCode != null"
|
||||
type="success"
|
||||
@click="viewImg(row.QRCode)"
|
||||
>查看二维码</Button
|
||||
>
|
||||
<div>
|
||||
<a class="mr_10" @click="linkTo(row.goodsId,row.skuId)">{{row.goodsName}}</a>
|
||||
<Poptip trigger="hover" title="扫码在手机中查看" transfer>
|
||||
<div slot="content">
|
||||
<vue-qr :text="wapLinkTo(row.goodsId,row.skuId)" :margin="0" colorDark="#000" colorLight="#fff" :size="150"></vue-qr>
|
||||
</div>
|
||||
<img src="../../../assets/qrcode.svg" style="vertical-align:middle;" class="hover-pointer" width="20" height="20" alt="">
|
||||
</Poptip>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</Table>
|
||||
</Row>
|
||||
<Row type="flex" justify="end" class="page operation">
|
||||
|
||||
@@ -70,8 +70,14 @@
|
||||
ref="table"
|
||||
>
|
||||
<template slot-scope="{ row }" slot="goodsName">
|
||||
<div class="div-zoom" >
|
||||
<a>{{ row.goodsSku.goodsName }}</a>
|
||||
<div>
|
||||
<a class="mr_10" @click="linkTo(row.goodsSku.goodsId,row.goodsSku.skuId)">{{row.goodsSku.goodsName}}</a>
|
||||
<Poptip trigger="hover" title="扫码在手机中查看" transfer>
|
||||
<div slot="content">
|
||||
<vue-qr :text="wapLinkTo(row.goodsSku.goodsId,row.goodsSku.skuId)" :margin="0" colorDark="#000" colorLight="#fff" :size="150"></vue-qr>
|
||||
</div>
|
||||
<img src="../../../assets/qrcode.svg" style="vertical-align:middle;" class="hover-pointer" width="20" height="20" alt="">
|
||||
</Poptip>
|
||||
</div>
|
||||
</template>
|
||||
<template slot-scope="{ row }" slot="price">
|
||||
@@ -83,6 +89,11 @@
|
||||
<template slot-scope="{ row }" slot="quantity">
|
||||
<div>{{ row.goodsSku.quantity }}</div>
|
||||
</template>
|
||||
<template slot-scope="{ row }" slot="startTime">
|
||||
<div>{{ row.startTime }}</div>
|
||||
<div>{{ row.endTime }}</div>
|
||||
</template>
|
||||
|
||||
<template slot-scope="{ row }" slot="action">
|
||||
<Button
|
||||
v-if="row.promotionStatus == 'NEW'"
|
||||
@@ -166,52 +177,39 @@ export default {
|
||||
{
|
||||
title: "市场价",
|
||||
slot: "price",
|
||||
minWidth: 60,
|
||||
},
|
||||
{
|
||||
title: "结算价",
|
||||
slot: "settlementPrice",
|
||||
minWidth: 60,
|
||||
},
|
||||
{
|
||||
title: "分类",
|
||||
key: "pointsGoodsCategoryName",
|
||||
minWidth: 60,
|
||||
},
|
||||
{
|
||||
title: "库存数量",
|
||||
slot: "quantity",
|
||||
minWidth: 60,
|
||||
},
|
||||
{
|
||||
title: "活动剩余库存",
|
||||
key: "activeStock",
|
||||
minWidth:90,
|
||||
},
|
||||
{
|
||||
title: "兑换积分",
|
||||
key: "points",
|
||||
minWidth: 60,
|
||||
},
|
||||
{
|
||||
title: "所属店铺",
|
||||
key: "storeName",
|
||||
minWidth: 60,
|
||||
},
|
||||
{
|
||||
title: "活动开始时间",
|
||||
key: "startTime",
|
||||
minWidth: 140,
|
||||
},
|
||||
{
|
||||
title: "活动结束时间",
|
||||
key: "endTime",
|
||||
minWidth: 140,
|
||||
slot: "startTime",
|
||||
minWidth:100
|
||||
},
|
||||
{
|
||||
title: "状态",
|
||||
key: "promotionStatus",
|
||||
minWidth: 60,
|
||||
render: (h, params) => {
|
||||
let text = "未知",
|
||||
color = "";
|
||||
|
||||
Reference in New Issue
Block a user