夜良king 2023-02-03 10:06:50 +08:00
commit 36794613cd
47 changed files with 1816 additions and 718 deletions

View File

@ -7,10 +7,6 @@ var BASE = {
buyer: "https://buyer-api.pickmall.cn",
seller: "https://store-api.pickmall.cn",
manager: "https://admin-api.pickmall.cn"
// common: "http://192.168.0.105:8890",
// buyer: "http://192.168.0.105:8888",
// seller: "http://192.168.0.105:8889",
// manager: "http://192.168.0.105:8887"
},
API_PROD: {
common: "https://common-api.pickmall.cn",

View File

@ -5,10 +5,16 @@
<div>
<div class="coupon-title">
<router-link to="/">
<img src="../assets/images/logo.png" width="120" alt="">
<img src="../assets/images/logo.png" width="120" alt="" />
</router-link>
<p>领券中心</p>
<Input search style="width:400px" @on-search='search' enter-button="" placeholder="搜索优惠券" />
<Input
search
style="width: 400px"
@on-search="search"
enter-button="搜索"
placeholder="搜索优惠券"
/>
</div>
<div class="fontsize_18 recommend">推荐好券</div>
@ -18,9 +24,22 @@
<li v-for="(item, index) in list" class="coupon-item" :key="index">
<div class="c-left">
<div>
<span v-if="item.couponType === 'PRICE'" class="fontsize_12 global_color">¥<span class="price">{{item.price | unitPrice}}</span></span>
<span v-if="item.couponType === 'DISCOUNT'" class="fontsize_12 global_color"><span class="price">{{item.couponDiscount}}</span></span>
<span class="describe">{{item.consumeThreshold}}元可用</span>
<span
v-if="item.couponType === 'PRICE'"
class="fontsize_12 global_color"
><span class="price">{{
item.price | unitPrice
}}</span></span
>
<span
v-if="item.couponType === 'DISCOUNT'"
class="fontsize_12 global_color"
><span class="price">{{ item.couponDiscount }}</span
></span
>
<span class="describe"
>{{ item.consumeThreshold }}元可用</span
>
</div>
<p>使用范围{{ useScope(item.scopeType, item.storeName) }}</p>
<p>有效期{{ item.endTime }}</p>
@ -31,12 +50,15 @@
<i class="circle-bottom"></i>
</li>
</ul>
<Page :total="total" @on-change="changePageNum"
<Page
:total="total"
@on-change="changePageNum"
class="pageration"
@on-page-size-change="changePageSize"
:page-size="params.pageSize"
show-total
show-sizer>
show-sizer
>
</Page>
</div>
</div>
@ -44,103 +66,104 @@
</div>
</template>
<script>
import {couponList, receiveCoupon} from '@/api/member.js'
import { couponList, receiveCoupon } from "@/api/member.js";
export default {
data() {
return {
list: [], //
total: 0, //
params: { //
getType: 'FREE',
params: {
//
getType: "FREE",
pageNumber: 1,
pageSize: 20
}
}
pageSize: 20,
},
};
},
methods: {
//
search(item) {
this.params.couponName = item
this.params.pageNumber = 1
this.getList()
this.params.couponName = item;
this.params.pageNumber = 1;
this.getList();
},
//
getList() {
this.$Spin.show()
couponList(this.params).then(res => {
this.$Spin.hide()
this.loading = false
this.$Spin.show();
couponList(this.params)
.then((res) => {
this.$Spin.hide();
this.loading = false;
if (res.success) {
this.list = res.result.records
this.total = res.result.total
this.list = res.result.records;
this.total = res.result.total;
}
}).catch(() => { this.$Spin.hide() })
})
.catch(() => {
this.$Spin.hide();
});
},
//
changePageNum(val) {
this.params.pageNumber = val;
this.getList()
this.getList();
},
//
changePageSize(val) {
this.params.pageNumber = 1;
this.params.pageSize = val;
this.getList()
this.getList();
},
//
receive(item) {
receiveCoupon(item.id).then(res => {
receiveCoupon(item.id).then((res) => {
if (res.success) {
console.log(item);
this.$Modal.confirm({
title: '领取优惠券',
content: '<p>优惠券领取成功,可到我的优惠券页面查看</p>',
okText: '我的优惠券',
cancelText: '立即使用',
title: "领取优惠券",
content: "<p>优惠券领取成功,可到我的优惠券页面查看</p>",
okText: "我的优惠券",
cancelText: "立即使用",
closable: true,
onOk: () => {
this.$router.push('/home/Coupons')
this.$router.push("/home/Coupons");
},
onCancel: () => {
if (item.storeId !== '0') {
this.$router.push({path: '/merchant', query: {id: item.storeId}})
} else {
if (item.scopeType === 'PORTION_GOODS_CATEGORY') {
this.$router.push({path: '/goodsList', query: {categoryId: item.scopeId}})
} else {
this.$router.push({path: '/goodsList'})
}
}
}
this.$router.push({
path: "/goodsList",
query: { promotionsId: item.id, promotionType: "COUPON" },
});
},
});
}
})
});
},
//
useScope(type, storeName) {
let shop = '平台';
let goods = '全部商品'
if (storeName !== 'platform') shop = storeName
let shop = "平台";
let goods = "全部商品";
if (storeName !== "platform") shop = storeName;
switch (type) {
case 'ALL':
goods = '全部商品'
case "ALL":
goods = "全部商品";
break;
case 'PORTION_GOODS':
goods = '部分商品'
case "PORTION_GOODS":
goods = "部分商品";
break;
case 'PORTION_GOODS_CATEGORY':
goods = '部分分类商品'
case "PORTION_GOODS_CATEGORY":
goods = "部分分类商品";
break;
}
return `${shop}${goods}可用`
}
return `${shop}${goods}可用`;
},
},
mounted() {
this.getList()
}
}
this.getList();
},
};
</script>
<style lang="scss" scoped>
@import '../assets/styles/coupon.scss';
@import "../assets/styles/coupon.scss";
.content {
width: 100%;
background-color: #fff;
@ -168,7 +191,7 @@ export default {
}
.coupon-item {
b {
background: url('../assets/images/small-circle.png') top left repeat-y;
background: url("../assets/images/small-circle.png") top left repeat-y;
}
}
.pageration {

View File

@ -92,6 +92,17 @@ export default {
"&skuId=" +
this.goodsMsg.data.id
);
// window.open(
// 'http://192.168.0.139:8000/' +
// "?token=" +
// accessToken +
// "&id=" +
// this.goodsMsg.data.storeId +
// "&goodsId=" +
// this.goodsMsg.data.goodsId +
// "&skuId=" +
// this.goodsMsg.data.id
// );
},
// im
async getIMDetailMethods () {

View File

@ -82,20 +82,24 @@
</div>
<div class="goods-show-right">
<Tag class="goods-show-tag" color="red" v-if="item.content.selfOperated">
<Tag
class="goods-show-tag"
color="red"
v-if="item.content.selfOperated"
>
自营
</Tag>
<Tag
class="goods-show-tag" color="blue"
class="goods-show-tag"
color="blue"
v-if="item.content.goodsType == 'VIRTUAL_GOODS'"
>
虚拟
</Tag>
<Tag
class="goods-show-tag" color="blue"
v-else-if="
item.content.goodsType == 'PHYSICAL_GOODS'
"
class="goods-show-tag"
color="blue"
v-else-if="item.content.goodsType == 'PHYSICAL_GOODS'"
>
实物
</Tag>
@ -155,13 +159,21 @@ export default {
watch: {
$route() {
const keyword = this.$route.query.keyword;
if (keyword) {
this.handleSearch(keyword);
}
if (this.$route.query.categoryId) {
let cateId = this.$route.query.categoryId.split(",");
Object.assign(this.params, this.$route.query);
this.params.categoryId = cateId[cateId.length - 1];
this.getGoodsList();
}
if (this.$route.query.promotionType) {
this.params.promotionType = this.$route.query.promotionType;
}
if (this.$route.query.promotionsId) {
this.params.promotionsId = this.$route.query.promotionsId;
}
this.getGoodsList();
},
},
methods: {
@ -301,7 +313,6 @@ export default {
margin-top: 5px;
}
.goods-show-self {
float: left;
height: 16px;

View File

@ -6,120 +6,139 @@
<li v-for="(item, index) in list" class="coupon-item" :key="index">
<div class="c-left">
<div>
<span v-if="item.couponType === 'PRICE'" class="fontsize_12 global_color">¥<span class="price">{{item.price | unitPrice}}</span></span>
<span v-if="item.couponType === 'DISCOUNT'" class="fontsize_12 global_color"><span class="price">{{item.discount}}</span></span>
<span
v-if="item.couponType === 'PRICE'"
class="fontsize_12 global_color"
><span class="price">{{ item.price | unitPrice }}</span></span
>
<span
v-if="item.couponType === 'DISCOUNT'"
class="fontsize_12 global_color"
><span class="price">{{ item.discount }}</span
></span
>
<span class="describe">{{ item.consumeThreshold }}元可用</span>
</div>
<p>使用范围{{ useScope(item.scopeType, item.storeName) }}</p>
<p>有效期{{ item.endTime }}</p>
</div>
<b></b>
<a class="c-right" :class="{'canot-use':params.memberCouponStatus !== 'NEW'}" @click="go(item)">使</a>
<a
class="c-right"
:class="{ 'canot-use': params.memberCouponStatus !== 'NEW' }"
@click="go(item)"
>立即使用</a
>
<i class="circle-top"></i>
<i class="circle-bottom"></i>
</li>
</ul>
<Page :total="total" @on-change="changePageNum"
<Page
:total="total"
@on-change="changePageNum"
class="pageration"
@on-page-size-change="changePageSize"
:page-size="params.pageSize"
show-total
show-sizer>
show-sizer
>
</Page>
<Spin v-if="loading" fix></Spin>
</div>
</template>
<script>
import { memberCouponList } from '@/api/member.js';
import { memberCouponList } from "@/api/member.js";
export default {
name: 'Coupons',
name: "Coupons",
data() {
return {
statusNameList: [ //
'未使用',
'已使用',
'已过期'
statusNameList: [
//
"未使用",
"已使用",
"已过期",
],
statusList: ['NEW', 'USED', 'EXPIRE'], //
statusList: ["NEW", "USED", "EXPIRE"], //
loading: false, //
params: { //
params: {
//
pageNumber: 1,
pageSize: 10,
memberCouponStatus: 'NEW'
memberCouponStatus: "NEW",
},
total: 0, //
list: [] //
list: [], //
};
},
methods: {
getList () { //
this.loading = true
memberCouponList(this.params).then(res => {
this.loading = false
getList() {
//
this.loading = true;
memberCouponList(this.params).then((res) => {
this.loading = false;
if (res.success) {
this.list = res.result.records
this.total = res.result.total
this.list = res.result.records;
this.total = res.result.total;
}
})
});
},
//
change(index) {
this.params.memberCouponStatus = this.statusList[index]
this.params.memberCouponStatus = this.statusList[index];
this.params.pageNumber = 1;
this.getList()
this.getList();
},
go (item) { // 使
if (this.params.memberCouponStatus !== 'NEW') return;
go(item) {
// 使
if (this.params.memberCouponStatus !== "NEW") return;
if (item.storeId !== '0') {
this.$router.push({path: '/merchant', query: {id: item.storeId}})
} else {
if (item.scopeType === 'PORTION_GOODS_CATEGORY') {
this.$router.push({path: '/goodsList', query: {categoryId: item.scopeId}})
} else {
this.$router.push({path: '/goodsList'})
}
}
this.$router.push({
path: "/goodsList",
query: { promotionsId: item.couponId, promotionType: "COUPON" },
});
},
changePageNum (val) { //
changePageNum(val) {
//
this.params.pageNumber = val;
this.getList()
this.getList();
},
changePageSize (val) { //
changePageSize(val) {
//
this.params.pageNumber = 1;
this.params.pageSize = val;
this.getList()
this.getList();
},
useScope (type, storeName) { //
let shop = '平台';
let goods = '全部商品'
if (storeName !== 'platform') shop = storeName
useScope(type, storeName) {
//
let shop = "平台";
let goods = "全部商品";
if (storeName !== "platform") shop = storeName;
switch (type) {
case 'ALL':
goods = '全部商品'
case "ALL":
goods = "全部商品";
break;
case 'PORTION_GOODS':
goods = '部分商品'
case "PORTION_GOODS":
goods = "部分商品";
break;
case 'PORTION_GOODS_CATEGORY':
goods = '部分分类商品'
case "PORTION_GOODS_CATEGORY":
goods = "部分分类商品";
break;
}
return `${shop}${goods}可用`
}
return `${shop}${goods}可用`;
},
},
mounted() {
this.getList()
}
}
this.getList();
},
};
</script>
<style scoped lang="scss">
@import '../../../assets/styles/coupon.scss';
@import "../../../assets/styles/coupon.scss";
.coupon-item {
height: 125px;
.c-left {

View File

@ -112,7 +112,9 @@ export default {
tracksList(this.params).then((res) => {
this.spinShow = false;
if (res.success && res.result.records.length) {
this.list = res.result.records;
this.list = res.result.records.filter(item =>{
return item != null
});
this.total = res.result.total
} else {
this.list = [];

View File

@ -3,5 +3,8 @@ VUE_APP_PREVIEW=false
VUE_APP_API_BASE_URL=https://im-api.pickmall.cn
VUE_APP_WEB_SOCKET_URL=wss://im-api.pickmall.cn/lili/webSocket
VUE_APP_COMMON=https://common-api.pickmall.cn
VUE_APP_BUYER=https://buyer-api.pickmall.cn
VUE_APP_SELLER=https://seller-api.pickmall.cn
VUE_APP_WEBSITE_NAME="LiLi IM"
VUE_APP_PC_ORDER_URL=https://store-b2b2c.pickmall.cn
VUE_APP_PC_URL=https://pc-b2b2c.pickmall.cn/
VUE_APP_PC_STORE=https://store-b2b2c.pickmall.cn/

View File

@ -1,7 +1,10 @@
NODE_ENV=development
VUE_APP_PREVIEW=true
VUE_APP_API_BASE_URL=http://192.168.0.113:8885
VUE_APP_WEB_SOCKET_URL=ws://192.168.0.113:8885/lili/webSocket
VUE_APP_COMMON=http://192.168.0.113:8890
VUE_APP_PC_URL="http://192.168.0.113:10001"
VUE_APP_PREVIEW=false
VUE_APP_API_BASE_URL=https://im-api.pickmall.cn
VUE_APP_WEB_SOCKET_URL=wss://im-api.pickmall.cn/lili/webSocket
VUE_APP_COMMON=https://common-api.pickmall.cn
VUE_APP_BUYER=https://buyer-api.pickmall.cn
VUE_APP_SELLER=https://seller-api.pickmall.cn
VUE_APP_WEBSITE_NAME="LiLi IM"
VUE_APP_PC_URL=https://pc-b2b2c.pickmall.cn/
VUE_APP_PC_STORE=https://store-b2b2c.pickmall.cn/

View File

@ -1,30 +1,47 @@
import { get } from "@/utils/request";
import config from "@/config/config";
// 获取用户相关设置信息
export const ServeGetUserSetting = () => {
return get("/im/user");
return get(`${config.BASE_BUYER}/buyer/passport/member`);
};
// 获取店铺相关设置信息
export const ServeGetStoreSetting = () => {
return get("/im/user/store");
return get(`${config.BASE_SELLER}/store/member/user`);
};
// 获取用户相关设置信息
export const ServeGetUserDetail = (memberId) => {
return get(`/im/user/${memberId}`);
return get(`${config.BASE_SELLER}/store/passport/member/${memberId}`);
};
// 获取店铺相关设置信息
export const ServeGetStoreDetail = (storeId) => {
return get(`/im/user/store/${storeId}`);
return get(`${config.BASE_BUYER}/buyer/store/store/store/${storeId}`);
};
// 获取店铺相关设置信息
// 获取用户历史足迹
export const ServeGetFootPrint = (params) => {
return get(`/im/user/history`,params);
return get(`${config.BASE_BUYER}/buyer/member/footprint`,params);
};
// 获取订单列表信息
// 商家获取用户历史足迹
export const ServeStoreGetFootPrint = (params) => {
return get(`${config.BASE_SELLER}/store/member/footprint`,params);
};
// 获取用户订单列表信息
export const ServeGetOrderPrint = (params) => {
return get(`/im/orders/orders`,params);
return get(`${config.BASE_BUYER}/buyer/order/order`,params);
};
// 商家获取用户订单列表信息
export const ServeStoreGetOrderPrint = (params) => {
return get(`${config.BASE_SELLER}/store/order/order`,params);
};
// 获取商品信息
export const ServeGetGoodsDetail = (data) => {
return get(`${config.BASE_BUYER}/buyer/goods/goods/sku/${data.goodsId}/${data.skuId}`);
};

View File

@ -1,12 +1,9 @@
<template>
<div
class="text-message"
:class="{
<div class="text-message" :class="{
left: float == 'left',
right: float == 'right',
'max-width': !fullWidth,
}"
>
}">
<div v-if="arrow" class="arrow"></div>
<pre v-html="html" />
</div>

View File

@ -1,7 +1,7 @@
<template>
<el-tabs v-model="activeName" @tab-click="handleClick" type="card" :stretch=true>
<el-tab-pane :label="toUser.storeFlag ? '正在咨询' : '他的足迹'" name="history">
<div style="margin-left: 12px;" v-if="toUser.storeFlag">
<div style="margin-left: 12px;">
<GoodsLink :goodsDetail="goodsDetail" v-if="toUser.userId === goodsDetail.storeId"
@sendMessage="submitSendMessage" />
<FootPrint :list="footPrintList" @loadMore="loadMoreFootPrint()" :orderList="orderPrintList"
@ -18,8 +18,7 @@
<script>
import { Tabs, TabPane } from 'element-ui'
import { ServeGetStoreDetail, ServeGetUserDetail, ServeGetFootPrint, ServeGetOrderPrint } from '@/api/user'
import { ServeGetGoodsDetail } from '@/api/goods'
import { ServeGetStoreDetail, ServeGetUserDetail, ServeGetFootPrint, ServeGetOrderPrint, ServeGetGoodsDetail, ServeStoreGetFootPrint,ServeStoreGetOrderPrint } from '@/api/user'
import StoreDetail from "@/components/chat/panel/template/storeDetail.vue";
import FootPrint from "@/components/chat/panel/template/footPrint.vue";
import GoodsLink from "@/components/chat/panel/template/goodsLink.vue";
@ -53,6 +52,23 @@ export default {
index_name: (state) => state.dialogue.index_name,
}),
},
watch:{
toUser(){
localStorage.setItem('storeFlag', this.toUser.storeFlag)
this.footPrintList = []
this.orderPrintList = []
if (this.toUser.storeFlag) {
this.getStoreDetail()
}
// else {
// this.getMemberDetail()
// }
this.getFootPrint()
if (this.goodsParams && this.toUser.storeFlag == true) {
this.getGoodsDetail()
}
}
},
data () {
return {
activeName: 'history',
@ -70,13 +86,15 @@ export default {
}
},
mounted () {
localStorage.setItem('storeFlag', this.toUser.storeFlag)
if (this.toUser.storeFlag) {
this.getStoreDetail()
} else {
this.getMemberDetail()
}
// else {
// this.getMemberDetail()
// }
this.getFootPrint()
if (this.goodsParams) {
if (this.goodsParams && this.toUser.storeFlag == true) {
this.getGoodsDetail()
}
},
@ -94,28 +112,26 @@ export default {
this.getFootPrint()
},
handleClick () { },
getMemberDetail () {
ServeGetUserDetail(this.toUser.userId).then(res => {
if (res.success) {
this.memberInfo = res.result
}
})
},
// getMemberDetail () {
// ServeGetUserDetail(this.toUser.userId).then(res => {
// if (res.success) {
// this.memberInfo = res.result
// }
// })
// },
getGoodsDetail () {
if(this.toUser.storeFlag){
ServeGetGoodsDetail(this.goodsParams).then(res => {
if (res.success) {
this.goodsDetail = res.result.data
}
})
}
},
getFootPrint() {
if (this.toUser.storeFlag) {
this.footPrintParams.memberId = this.id
this.footPrintParams.storeId = this.toUser.userId
} else {
this.footPrintParams.memberId = this.toUser.userId
this.footPrintParams.storeId = this.id
}
ServeGetFootPrint(this.footPrintParams).then(res => {
res.result.records.forEach((item, index) => {
if (localStorage.getItem(item.goodsId)) {
@ -129,6 +145,7 @@ export default {
});
this.footPrintList.push(...res.result.records)
})
//
ServeGetOrderPrint(this.footPrintParams).then((res) => {
if (res.code == 200) {
@ -138,9 +155,35 @@ export default {
btnHide: 1
})
})
// this.orderPrintList.push(...res.result.records)
}
})
} else {
this.footPrintParams.memberId = this.toUser.userId
this.footPrintParams.storeId = this.id
ServeStoreGetFootPrint(this.footPrintParams).then(res => {
res.result.records.forEach((item, index) => {
if (localStorage.getItem(item.goodsId)) {
item.btnHide = 0
} else {
item.btnHide = 1
}
if (item.goodsId === this.goodsParams.goodsId) {
res.result.records.splice(index, 1)
}
});
this.footPrintList.push(...res.result.records)
})
ServeStoreGetOrderPrint(this.footPrintParams).then((res) => {
if (res.code == 200) {
res.result.records.forEach((item) => {
this.orderPrintList.push({
...item,
btnHide: 1
})
})
}
})
}
},
//

View File

@ -59,16 +59,17 @@
{{ unixToDate(item.createTime, "MM月dd日 hh:mm") }}
</span>
<!-- 文本消息 -->
<div v-if="item.messageType == 'MESSAGE'" class="text-message" :class="{
<div v-if="item.messageType == 'MESSAGE'" style="background-color: #d0e9ff;color: black;"
class="text-message" :class="{
left: item.float == 'left',
right: item.float == 'right',
}">
<div class="arrow"></div>
<pre v-html="item.text" />
<pre v-if="!emojistwo.includes(item.text)" v-html="item.text" />
<pre v-if="emojistwo.includes(item.text)" v-html="textReplaceEmoji(item.text)" />
</div>
<div v-if="item.messageType == 'GOODS' && item.text != null" class="text-message" :class="{
<div v-if="item.messageType == 'GOODS' && item.text != null" class="goodsStyle " :class="{
left: item.float == 'left',
right: item.float == 'right',
}">
@ -76,31 +77,45 @@
<div>
<img :src="item.text.thumbnail" class="image" />
</div>
<div style="margin-left: 13px">
<a> {{ item.text.goodsName }} </a>
<div>
<span style="color: red;">{{ item.text.price }}</span>
<div class="goods_name">
<el-tooltip class="item" effect="dark" :content="item.text.goodsName" placement="top-start">
<a> {{ item.text.goodsName }} </a>
</el-tooltip>
</div>
<div class="price">
<span>{{ item.text.price }}</span>
</div>
</div>
</div>
</div>
<div v-if="item.messageType == 'ORDER' && item.text != null" class="text-message" :class="{
<div v-if="item.messageType == 'ORDER' && item.text != null" class="oderStyle" :class="{
left: item.float == 'left',
right: item.float == 'right',
}">
<div class="oedersn">
<el-tooltip class="item" effect="dark" :content="item.text.sn" placement="top-start">
<a> 订单号:{{ item.text.sn }} </a>
</el-tooltip>
</div>
<div class="baseTwo">
<img :src="item.text.groupImages" style="height: 100px;width: 100px;margin-top: 10px;" />
<span class="orderGoodsName" @click="linkToOrders(item.text.sn)">{{ item.text.groupName }}</span>
<span class="orderGoodsTime">{{ item.text.paymentTime }}</span>
<span class="orderFlowPrice">
订单金额{{ item.text.flowPrice }}
</span>
<span class="order_status"
:style="{ 'color': item.text.orderStatus == 'CANCELLED' || item.text.orderStatus == 'UNPAID' || item.text.orderStatus == ' TAKE' ? '#5a606b' : '#f23030' }">{{
item.text.orderStatus == 'CANCELLED' ? '已取消' : item.text.orderStatus == 'UNPAID' ? '未付款' :
item.text.orderStatus ==
'PAID' ? '已付款' : item.text.orderStatus == 'UNDELIVERED' ? '待发货' : item.text.orderStatus ==
'DELIVERED'
? '已发货' : item.text.orderStatus == ' COMPLETED' ? '已完成' : item.text.orderStatus == ' TAKE' ?
'待校验' : ''
}}</span>
</div>
</div>
<!-- 图片消息 -->
<!-- <image-message
v-else-if="item.messageType == 2 && item.file.file_type == 1"
:src="item.file.file_url"
@contextmenu.native="onCopy(idx, item, $event)"
/> -->
</div>
</main>
</div>
@ -161,7 +176,7 @@
</template>
<script>
import { textReplaceLink } from "@/utils/functions";
import { textReplaceEmoji } from "@/utils/emojis";
import { textReplaceEmoji, emojistwo } from "@/utils/emojis";
import OtherLink from "@/components/chat/panel/OtherLink.vue";
import { mapState, mapGetters } from "vuex";
import TalkSearchRecord from "@/components/chat/TalkSearchRecord";
@ -218,6 +233,7 @@ export default {
return {
//
textReplaceEmoji,
emojistwo,
textReplaceLink,
loadRecord: {
status: 0,
@ -277,6 +293,7 @@ export default {
mode: 0,
};
this.loadChatRecords();
},
},
mounted () {
@ -372,7 +389,6 @@ export default {
//
submitSendMessage (content) {
console.log("发送", content);
const record = {
operation_type: "MESSAGE",
to: this.params.receiver_id,
@ -381,6 +397,9 @@ export default {
context: content,
talk_id: this.params.talkId,
};
// if (record.messageType == 'MESSAGE"') {
// record.text = this.textReplaceEmoji(record.content)
// }
SocketInstance.emit("event_talk", record);
this.$store.commit("UPDATE_TALK_ITEM", {
@ -400,8 +419,6 @@ export default {
text: content,
float: "right",
};
console.log("insterChat", insterChat);
// console.log("",'')
//
this.$store.commit("PUSH_DIALOGUE", insterChat);
@ -457,7 +474,6 @@ export default {
//
loadChatRecords () {
console.log(this.records.length, 'this.records.length ')
if (this.loadRecord.pageNumber === 0 || this.params.clickFlag) {
this.loadRecord.pageNumber = 1
this.params.clickFlag = false
@ -486,6 +502,9 @@ export default {
if (item.messageType == 'GOODS') {
item.text = JSON.parse(item.text)
}
// if (item.messageType == 'MESSAGE"') {
// item.text = this.textReplaceEmoji(item.text)
// }
if (item.messageType == 'ORDER') {
item.text = JSON.parse(item.text)
}
@ -496,7 +515,8 @@ export default {
? (this.loadRecord.status = 1)
: (this.loadRecord.status = 2);
this.$nextTick(() => {
if (data.record_id == 0 || !data.record_id) {
// if (data.record_id == 0 || !data.record_id) {
if (data.record_id == 0 || data.pageNumber == 1) {
el.scrollTop = el.scrollHeight
} else {
el.scrollTop = el.scrollHeight - scrollHeight
@ -820,6 +840,67 @@ export default {
};
</script>
<style lang="less" scoped>
.order_status {
height: 30px;
width: 60px;
background: #ffeded;
margin-right: 20px;
text-align: center;
line-height: 25px;
margin-left: 15px;
border-radius: 10px;
}
.oderStyle {
border: 1px solid #f2f2f2;
width: 330px;
border-radius: 4px;
.oedersn {
margin: 10px 0 10px 5px;
width: 300px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
.goodsStyle {
border: 1px solid #f2f2f2;
width: 300px;
height: 120px;
display: flex;
border-radius: 4px;
.goods_name {
color: black;
width: 150px;
font-size: 15px;
color: #333333;
margin-top: 30px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.image {
height: 70px;
margin-top: 3px;
width: 70px;
background-size: cover;
margin: 20px;
}
.price {
color: #999;
margin-top: 20px;
}
.base {
display: flex;
}
}
.orderSn {
overflow: hidden;
text-overflow: ellipsis;
@ -830,7 +911,7 @@ export default {
width: 200px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
// white-space: nowrap;
position: absolute;
margin-top: 10px;
margin-left: 10px;
@ -838,9 +919,14 @@ export default {
.orderGoodsTime {
margin-left: 10px;
color: red;
color: #999;
position: absolute;
margin-top: 35px;
margin-top: 70px;
}
.orderFlowPrice {
color: #999;
margin-bottom: 20px;
}
.main-box {
@ -904,26 +990,26 @@ export default {
}
.base {
margin-top: 5px;
height: 120px;
display: flex;
// .base {
// margin-top: 5px;
// height: 120px;
// display: flex;
div {
width: 100px;
overflow: hidden;
text-overflow: ellipsis;
margin-top: 8px;
white-space: nowrap;
}
// div {
// width: 100px;
// // overflow: hidden;
// // text-overflow: ellipsis;
// margin-top: 8px;
// // white-space: nowrap;
// }
.image {
height: 100px;
margin-top: 3px;
width: 100px
}
// .image {
// height: 100px;
// margin-top: 3px;
// width: 100px
// }
}
// }
.talk-bubble {
position: absolute;
@ -1101,7 +1187,7 @@ export default {
}
@bg-left-color: #f5f5f5;
@bg-right-color: #1ebafc;
@bg-right-color: #ffffff;
.text-message {
position: relative;

View File

@ -7,37 +7,60 @@
<dd v-for="item in list" v-infinite-scroll="loadMore">
<div class="base">
<div>
<img :src="item.thumbnail" class="image" />
<img style="width: 60px; height: 60px;margin-left: 40px;box-sizing: border-box;" :src="item.thumbnail"
class="image" />
</div>
<div style="margin-left: 13px">
<div class="recent_views">
<el-tooltip class="item" effect="dark" :content="item.goodsName" placement="top-start">
<a class="goods_name" @click="linkToGoods(item.goodsId, item.id)">{{ item.goodsName }}</a>
<div style="margin-top: 8px;">
</el-tooltip>
<div style="display: flex;">
<div style="margin-top: 20px;">
<span style="color: red;">{{ item.price }}</span>
</div>
<div>
<el-button class="store-button" type="danger" v-if="item.btnHide == 1" size="mini"
<div class="goods_store_button">
<el-button type="danger" v-if="item.btnHide == 1 && toUser.storeFlag" size="mini"
@click="submitSendGoodsMessage(item)" plain>发送</el-button>
</div>
</div>
</div>
</div>
</div>
<div class="Underline"></div>
</dd>
</dl>
</el-tab-pane>
<el-tab-pane label="订单列表" name="orders">
<dl>
<dd v-for="(item, index) in orderList" v-infinite-scroll="loadMore" :key="index">
<div style="margin-bottom: 20px;">
<span class="orderSn">订单号{{ item.sn }}</span>
<img :src="item.groupImages" alt=""
style="height: 100px; width: 100px;margin-top: 10px; vertical-align: middle; ">
<span class="orderGoodsName" @click="linkToOrders(item.sn)"> {{ item.groupName }}</span>
<span style="margin-left: 10px; color: red;">{{ item.paymentTime }}</span>
<div class="orderBtn">
<el-button type="danger" class="store-button" v-if="item.btnHide == 1" size="mini"
@click="submitSendOrderMessage(item, index)" plain>发送</el-button>
<div class="orderlist">
<div class="order_top">
<span class="order_sn">订单号:{{ item.sn }}</span>
</div>
<div class="order_section">
<img :src="item.groupImages" alt="">
<el-tooltip class="item" effect="dark" :content="item.groupName" placement="top-start">
<span class="orderGoodsName" @click="linkToOrders(item.sn)"> {{ item.groupName }}</span>
</el-tooltip>
<div class="orderBtn">
<el-button type="danger" class="store-button" v-if="item.btnHide == 1 && toUser.storeFlag"
size="mini" @click="submitSendOrderMessage(item, index)" plain>发送</el-button>
</div>
</div>
<div class="order_footer">
<span> 订单金额 <span style="color: red;">{{ item.orderItems[0].goodsPrice }}</span></span>
<span class="order_status" v-if="item.orderStatus"
:style="{ 'color': item.orderStatus == 'CANCELLED' || item.orderStatus == 'UNPAID' || item.orderStatus == 'TAKE' ? '#5a606b' : '#f23030' }">{{
item.orderStatus == 'CANCELLED' ? '已取消' : item.orderStatus == 'UNPAID' ? '未付款' : item.orderStatus ==
'PAID' ? '已付款' : item.orderStatus == 'UNDELIVERED' ? '待发货' : item.orderStatus == 'DELIVERED'
? '已发货' : item.orderStatus == 'COMPLETED' ? '已完成' : item.orderStatus == 'TAKE' ? '待校验' : ''
}}</span>
</div>
</div>
<div class="Underline"></div>
</dd>
</dl>
</el-tab-pane>
@ -64,7 +87,6 @@ export default {
...mapGetters(["talkItems"]),
...mapState({
id: (state) => state.user.id,
toUser: (state) => state.user.toUser,
}),
},
@ -109,11 +131,14 @@ export default {
},
//
submitSendOrderMessage(item, index) {
console.log(item, 'item');
const context = {
sn: item.sn,
groupImages: item.groupImages,
paymentTime: item.paymentTime,
groupName: item.groupName,
flowPrice: item.flowPrice,
orderStatus: item.orderStatus
}
const record = {
operation_type: "MESSAGE",
@ -139,10 +164,11 @@ export default {
orderList: {
type: Array,
default: []
}
},
},
mounted() {
console.log(this.orderList, 'orderList');
// state.user.toUser
console.log(this.orderList, ' this.$store.state.user.toUser this.$store.state.user.toUser this.$store.state.user.toUser');
this.btnHide = localStorage.getItem('btnHide')
}
}
@ -150,6 +176,94 @@ export default {
</script>
<style scoped lang="less">
.order_status {
height: 25px;
width: 60px;
background: #ffeded;
margin-right: 20px;
text-align: center;
line-height: 25px;
}
.Underline {
border: 1px solid silver;
width: 90%;
margin: 0 auto;
}
.recent_views {
margin-left: 13px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 260px;
}
.box {
width: 400px;
.top {
text-align: center;
}
.left {
float: left;
width: 60px;
}
.right {
float: right;
width: 60px;
}
.bottom {
clear: both;
text-align: center;
}
.item {
margin: 4px;
}
.left .el-tooltip__popper,
.right .el-tooltip__popper {
padding: 8px 10px;
}
}
.Underline {
// border: 5px solid red;
}
.orderlist {
margin-bottom: 10px;
background: #fff;
color: #5a606b;
}
.order_top {
border-bottom: 1px solid #f2f2f2;
.order_sn {}
}
.order_section {
border-bottom: 1px solid #f2f2f2;
height: 100px;
img {
width: 80px;
height: 80px;
margin-top: 20px;
}
}
.order_footer {
border-bottom: 1px solid #f2f2f2;
display: flex;
justify-content: space-between;
}
.orderGoodsName {
width: 200px;
overflow: hidden;
@ -158,6 +272,7 @@ export default {
position: absolute;
margin-left: 10px;
margin-top: 10px;
font-weight: 500;
}
.orderSn {
@ -171,18 +286,13 @@ export default {
justify-content: flex-end;
margin-right: 15px;
position: relative;
bottom: 30px;
bottom: 55px;
}
.goods_name {
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
white-space: nowrap
}
/deep/ .el-tabs__item.is-top:last-child {
@ -215,9 +325,17 @@ export default {
margin-top: 10px;
}
.goods_store_button {
display: inline;
background-color: white;
border-color: #F56C6C;
position: absolute;
left: 70%;
}
.base {
margin-top: 5px;
height: 120px;
height: 80px;
display: flex;
.price {

View File

@ -11,7 +11,7 @@
<span style="color: red;">{{ goodsDetail.price }}</span>
</div>
<div v-if="hide">
<el-button class="store-button" type="danger" v-if="!sendFlag && btnHide == 1" size="mini"
<el-button class="store-button" type="danger" v-if="btnHide == 1 && toUser.storeFlag" size="mini"
@click="submitSendMessage()" plain>发送</el-button>
</div>
</div>
@ -27,7 +27,6 @@ import SocketInstance from "@/im-server/socket-instance";
export default {
data () {
return {
sendFlag: false,
btnHide: undefined,
hide: true
}
@ -169,7 +168,7 @@ export default {
.image {
height: 100px;
margin-top: 3px;
width: 100px
width: 100px;
}
}

View File

@ -6,11 +6,11 @@
</div>
<div style="margin-left: 13px">
<div class="div-zoom">
{{ storeInfo.storeName }}
<el-tag type="danger" v-if="storeInfo.selfOperated" size="mini"></el-tag>
<span class="title_left_name"> 店铺名称</span> <span class="title_right_name">{{ storeInfo.storeName }}</span>
<el-tag style="margin-left: 10px;" type="danger" v-if="storeInfo.selfOperated" size="mini"></el-tag>
</div>
<div>
联系方式: {{ storeInfo.memberName }}
<span class="title_left_name"> 联系方式:</span> <span class="title_right_name">{{ storeInfo.memberName }}</span>
</div>
<div>
<el-button class="store-button" type="danger" @click="linkToStore(storeInfo.id)" size="mini"
@ -19,22 +19,32 @@
</div>
</div>
<hr class="separate" />
<div class="separate">店铺评分: <span>{{ storeInfo.serviceScore }}</span></div>
<div class="separate">服务评分: <span>{{ storeInfo.descriptionScore }}</span></div>
<div class="separate">物流评分: <span>{{ storeInfo.deliveryScore }}</span></div>
<div class="separate">店铺评分: <el-rate v-model="storeInfo.serviceScore" disabled show-score text-color="#ff9900"
score-template="{value}">
</el-rate></div>
<div class="separate">服务评分: <el-rate v-model="storeInfo.descriptionScore" disabled show-score text-color="#ff9900"
score-template="{value}">
</el-rate></div>
<div class="separate">物流评分: <el-rate v-model="storeInfo.deliveryScore" disabled show-score text-color="#ff9900"
score-template="{value}">
</el-rate></div>
</div>
</template>
<script>
import { Tag, button } from 'element-ui'
import { Tag, button, rate } from 'element-ui'
export default {
data () {
return {
value: null,
colors: ['#99A9BF', '#F7BA2A', '#FF9900']
}
},
components: {
"el-tag": Tag,
"el-button": button,
"el-rate": rate
},
methods: {
},
@ -49,6 +59,16 @@ export default {
</script>
<style scoped lang="less">
.title_left_name {
font-size: 12px;
color: #a1a6af;
}
.title_right_name {
font-size: 12px;
color: #343036;
}
.store-button {
background-color: white;
border-color: #F56C6C;
@ -73,5 +93,9 @@ export default {
.separate {
margin-top: 8px;
// display: inline;
display: flex;
font-size: 12px;
color: #a1a6af;
}
</style>

View File

@ -59,73 +59,40 @@
<!-- </p>-->
</ul>
<el-popover
ref="popoverEmoticon"
placement="top-start"
trigger="click"
width="300"
popper-class="no-padding el-popover-em"
>
<el-popover ref="popoverEmoticon" placement="top-start" trigger="click" width="300"
popper-class="no-padding el-popover-em">
<MeEditorEmoticon ref="editorEmoticon" @selected="selecteEmoticon" />
</el-popover>
<form
enctype="multipart/form-data"
style="display: none"
ref="fileFrom"
>
<input
type="file"
ref="restFile"
accept="image/*"
@change="uploadImageChange"
/>
<form enctype="multipart/form-data" style="display: none" ref="fileFrom">
<input type="file" ref="restFile" accept="image/*" @change="uploadImageChange" />
<input type="file" ref="restFile2" @change="uploadFileChange" />
</form>
</el-header>
<el-main class="no-padding textarea">
<textarea
ref="textarea"
v-paste="pasteImage"
v-drag="dragPasteImage"
v-model.trim="editorText"
rows="6"
placeholder="你想要的聊点什么呢 ..."
@keydown="keydownEvent($event)"
@input="inputEvent($event)"
/>
<textarea ref="textarea" v-paste="pasteImage" v-drag="dragPasteImage" v-model.trim="editorText" rows="6"
placeholder="你想要的聊点什么呢 ..." @keydown="keydownEvent($event)" @input="inputEvent($event)" />
</el-main>
</el-container>
<!-- 图片查看器 -->
<MeEditorImageView
ref="imageViewer"
v-model="imageViewer.isShow"
:file="imageViewer.file"
@confirm="confirmUploadImage"
/>
<MeEditorImageView ref="imageViewer" v-model="imageViewer.isShow" :file="imageViewer.file"
@confirm="confirmUploadImage" />
<MeEditorRecorder v-if="recorder" @close="recorder = false" />
<!-- 代码块编辑器 -->
<TalkCodeBlock
v-if="codeBlock.isShow"
:edit-mode="codeBlock.editMode"
@close="codeBlock.isShow = false"
@confirm="confirmCodeBlock"
/>
<TalkCodeBlock v-if="codeBlock.isShow" :edit-mode="codeBlock.editMode" @close="codeBlock.isShow = false"
@confirm="confirmCodeBlock" />
<!-- 文件上传管理器 -->
<MeEditorFileManage ref="filesManager" v-model="filesManager.isShow" />
<MeEditorVote
v-if="vote.isShow"
@close="
<MeEditorVote v-if="vote.isShow" @close="
() => {
this.vote.isShow = false;
}
"
/>
" />
</div>
</template>

View File

@ -2,7 +2,6 @@
<div class="welcome-box">
<div class="famous-box">
<img src="~@/assets/image/chat.png" width="300" />
</div>
</div>
</template>

View File

@ -3,6 +3,8 @@ export default {
BASE_API_URL: process.env.VUE_APP_API_BASE_URL || "",
BASE_WS_URL: process.env.VUE_APP_WEB_SOCKET_URL || "",
BASE_COMMON: process.env.VUE_APP_COMMON || "",
PC_URL: process.env.VUE_APP_PC_URL || "",
STORE_URL:process.env.VUE_APP_PC_ORDER_URL || "http://192.168.0.139:10002",
BASE_BUYER: process.env.VUE_APP_BUYER || "",
BASE_SELLER: process.env.VUE_APP_SELLER || "",
PC_URL: process.env.VUE_APP_PC_URL || "https://pc-b2b2c.pickmall.cn",
PC_STORE: process.env.VUE_APP_PC_STORE || 'https://store-b2b2c.pickmall.cn',
};

View File

@ -100,6 +100,9 @@ class Talk extends Base {
case 'GOODS':
text = "[商品链接]";
break;
case 'ORDERS':
text = "[订单链接]";
break;
}
return text;

View File

@ -25,17 +25,27 @@ Vue.component('face', face)
Vue.component('face-null', faceNull)
Vue.prototype.linkToGoods = function (goodsId, skuId) { // 跳转买家端商品
console.log(`${config.PC_URL}/goodsDetail?skuId=${skuId}&goodsId=${goodsId}`)
if (localStorage.getItem('storeFlag') == 'false') {
window.open(`${config.PC_STORE}goods-operation-edit?id=${goodsId}`, '_blank')
} else {
window.open(`${config.PC_URL}/goodsDetail?skuId=${skuId}&goodsId=${goodsId}`, '_blank')
}
};
Vue.prototype.linkToStore = function (storeId) { // 跳转家端商品
Vue.prototype.linkToStore = function (storeId) { // 跳转家端商品
console.log(`${config.PC_URL}/Merchant?id=${storeId}`)
window.open(`${config.PC_URL}/Merchant?id=${storeId}`, '_blank')
};
// 订单跳转商家订单页面
Vue.prototype.linkToOrders = function (sn) { // 跳转买家端订单
window.open(`${config.STORE_URL}/order-detail?sn=${sn}`, '_blank')
Vue.prototype.linkToOrders = function (sn) {
if (localStorage.getItem('storeFlag') == 'false') {
// 商家
window.open(`${config.PC_STORE}order-detail?sn=${sn}`, '_blank')
} else {
// 用户
window.open(`${config.PC_URL}/OrderDetail?sn=${sn}`, '_blank')
}
};
const Instance = new Vue({
router,
store,

View File

@ -65,7 +65,6 @@ class WsSocket {
*/
on (event, callBack) {
// 对应 socket-instance.js
console.log("事件绑定", event, callBack);
this.onCallBacks[event] = callBack;
return this;
}

View File

@ -21,7 +21,6 @@ const Talk = {
getters: {
// 过滤所有置顶对话列表
topItems: (state) => {
console.log(state.items, 'state.items');
return state.items.filter((item) => item.is_top == 1);
},
talkItems: (state) => {
@ -40,7 +39,6 @@ const Talk = {
mutations: {
// 设置对话列表
SET_TALK_ITEMS (state, resource) {
console.log("设置对话列表", resource.items);
Vue.set(state, 'items', resource.items)
},

View File

@ -121,14 +121,12 @@ const symbol = [
];
const emojisKeys = Object.keys(emojis);
export const emojiList = {
symbol,
emojis
}
const regEmoji = emojisKeys.map((value) => '|\\' + value).join('').replace('|', '')
/**
* 替换表情文字
*
@ -142,3 +140,4 @@ export function textReplaceEmoji(content) {
return emojis[$1];
});
}
export const emojistwo = Object.keys(emojis)

View File

@ -31,7 +31,6 @@ export function findTalk(index_name) {
* @param {Object} params
*/
export function formatTalkItem (params) {
console.log(params);
let options = {
id: "",
disable: false,

View File

@ -108,7 +108,7 @@ export default {
<style lang="less" >
.main-layout {
position: fixed;
width: 75%;
width: 80%;
height: 80%;
top: 0;
right: 0;
@ -120,7 +120,7 @@ export default {
border-radius: 5px;
&.full-mode {
width: 70%;
width: 1200px;
height: 85%;
border-radius: 0;
}

View File

@ -424,7 +424,6 @@ export default {
this.$nextTick(() => {
if (id == this.index_name.split("_")[1]) {
console.log("已读");
this.$store.commit("UPDATE_TALK_ITEM", {
userId: id,
index_name: "MESSAGE_" + this.index_name.split("_")[1],

View File

@ -3,10 +3,10 @@ var BASE = {
* @description api请求基础路径
*/
API_DEV: {
common: "http://192.168.0.113:8890",
buyer: "http://192.168.0.113:8888",
seller: "http://192.168.0.113:8889",
manager: "http://192.168.0.113:8887"
common: "https://common-api.pickmall.cn",
buyer: "https://buyer-api.pickmall.cn",
seller: "https://store-api.pickmall.cn",
manager: "https://admin-api.pickmall.cn"
},
API_PROD: {
common: "https://common-api.pickmall.cn",

View File

@ -400,7 +400,7 @@ export const getChildRegion = (id) => {
// 重置用户密码
export const resetPassword = (params) => {
return postRequest(`/passport/user/resetPassword/${params}"`);
return postRequest(`/passport/user/resetPassword/${params}`);
};
// 初始化商品索引

View File

@ -209,28 +209,34 @@ export const auditApplySeckill = params => {
export const getFullDiscountList = params => {
return getRequest(`/promotion/fullDiscount`, params);
};
// 满优惠列表
export const getFullDiscountById = id => {
return getRequest(`/promotion/fullDiscount/${id}`);
};
// 开启、关闭满额活动
export const updateFullDiscount = (id, promotionStatus) => {
return putRequest(`/promotion/fullDiscount/status/${id}`)
}
// 积分商品列表
export const getPointsGoodsList = params => {
return getRequest(`/promotion/pointsGoods`, params);
};
// 积分商品详情
export const getPointsGoodsById = id => {
return getRequest(`/promotion/pointsGoods/${id}`);
};
// 添加积分商品
export const addPointsGoods = params => {
return postRequest(`/promotion/pointsGoods`, params, {
"Content-type": "application/json"
});
};
// 修改积分商品
export const updatePointsGoods = params => {
return putRequest(`/promotion/pointsGoods`, params, {
@ -250,19 +256,28 @@ export const deletePointsGoodsStatus = id => {
export const getPointsGoodsCategoryList = params => {
return getRequest(`/promotion/pointsGoodsCategory`, params);
};
// 积分商品分类详情
export const getPointsGoodsCategoryById = id => {
return getRequest(`/promotion/pointsGoodsCategory/${id}`);
};
// 添加积分商品分类
export const addPointsGoodsCategory = params => {
return postRequest(`/promotion/pointsGoodsCategory`, params);
};
// 更新积分商品分类
export const updatePointsGoodsCategory = params => {
return putRequest(`/promotion/pointsGoodsCategory`, params);
};
// 删除积分商品分类
export const deletePointsGoodsCategoryById = id => {
return deleteRequest(`/promotion/pointsGoodsCategory/${id}`);
};
// 获取优惠券领取记录
export const getCouponReceiveList = (params) => {
return getRequest("/promotion/coupon/received", params);
};

View File

@ -193,6 +193,12 @@ export const otherRouter = {
name: "manager-coupon",
component: () => import("@/views/promotions/coupon/coupon.vue")
},
{
path: "promotions/coupon-receive",
title: "优惠券领取记录",
name: "coupon-receive",
component: () => import("@/views/promotions/coupon/coupon-receive.vue"),
},
{
path: "promotions/add-platform-coupon",
title: "添加平台优惠券",

View File

@ -57,4 +57,31 @@ export function promotionsScopeTypeRender(h, params) {
]);
}
export function memberPromotionsStatusRender(h, status) {
let text = "未知",
color = "red";
if (status == "NEW") {
text = "已领取";
color = "geekblue";
} else if (status == "USED") {
text = "已使用";
color = "green";
} else if (status == "EXPIRE") {
text = "已过期";
color = "red";
} else if (status == "CLOSED") {
text = "已作废";
color = "red";
}
return h("div", [
h(
"Tag",
{
props: {
color: color,
},
},
text
),
]);
}

View File

@ -0,0 +1,321 @@
<template>
<div class="search">
<Card>
<Button style="margin-bottom: 10px" @click="back()"></Button>
<Form
ref="searchForm"
:model="searchForm"
inline
:label-width="75"
class="search-form mb_10"
>
<Form-item label="优惠券名称" prop="couponName">
<Input
type="text"
v-model="searchForm.couponName"
placeholder="请输入优惠券名称"
clearable
style="width: 200px"
/>
</Form-item>
<Form-item label="会员名称" prop="memberName">
<Input
type="text"
v-model="searchForm.memberName"
placeholder="请输入会员名称"
clearable
style="width: 200px"
/>
</Form-item>
<Form-item label="获取方式" prop="getType">
<Select
v-model="searchForm.getType"
placeholder="请选择"
clearable
style="width: 200px"
>
<Option value="FREE">免费获取</Option>
<Option value="ACTIVITY">活动获取</Option>
</Select>
</Form-item>
<Form-item label="优惠券状态" prop="memberCouponStatus">
<Select
v-model="searchForm.memberCouponStatus"
placeholder="请选择"
clearable
style="width: 200px"
>
<Option value="NEW">已领取</Option>
<Option value="USED">已使用</Option>
<Option value="EXPIRE">已过期</Option>
<Option value="CLOSED">已作废</Option>
</Select>
</Form-item>
<Form-item label="活动时间">
<DatePicker
v-model="selectDate"
type="daterange"
clearable
placeholder="选择起始时间"
style="width: 200px"
></DatePicker>
</Form-item>
<Button
@click="handleSearch"
type="primary"
icon="ios-search"
class="search-btn"
>搜索</Button
>
</Form>
<Table
v-if="refreshTable"
:loading="loading"
border
:columns="columns"
:data="data"
ref="table"
class="mt_10"
@on-selection-change="changeSelect"
>
</Table>
<Row type="flex" justify="end" class="mt_10">
<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>
</Row>
</Card>
</div>
</template>
<script>
import { getCouponReceiveList } from "@/api/promotion";
import {
memberPromotionsStatusRender,
promotionsScopeTypeRender,
} from "@/utils/promotions";
export default {
name: "coupon-recevie",
data() {
return {
loading: true, //
searchForm: {
//
pageNumber: 1, //
pageSize: 10, //
sort: "create_time", //
order: "desc", //
getType: "", //
couponId: this.$route.query.couponId, // id
},
selectList: [], //
selectCount: 0, //
columns: [
//
{
title: "会员名称",
key: "memberName",
minWidth: 130,
fixed: "left",
},
{
title: "优惠券名称",
key: "couponName",
minWidth: 100,
tooltip: true,
},
{
title: "发布店铺",
key: "storeName",
minWidth: 100,
render: (h, params) => {
return h("div", (params.row.storeName === 'platform' && "平台") || params.row.storeName);
},
},
{
title: "面额/折扣",
key: "price",
width: 100,
render: (h, params) => {
if (params.row.price) {
return h(
"div",
this.$options.filters.unitPrice(params.row.price, "¥")
);
} else {
return h("div", params.row.discount + "折");
}
},
},
{
title: "使用门槛",
key: "consumeThreshold",
width: 130,
},
{
title: "获取方式",
width: 120,
key: "getType",
render: (h, params) => {
if (params.row.getType === "FREE") {
return h("Tag", { props: { color: "red" } }, "免费获取");
} else if (params.row.getType === "ACTIVITY") {
return h("Tag", { props: { color: "volcano" } }, "活动获取");
} else if (params.row.getType === "INSIDE") {
return h("Tag", { props: { color: "lime" } }, "内购");
} else {
return h("Tag", { props: { color: "purple" } }, "未知");
}
},
},
{
title: "会员优惠券状态",
width: 130,
key: "memberCouponStatus",
render: (h, params) => {
return memberPromotionsStatusRender(
h,
params.row.memberCouponStatus
);
},
},
{
title: "优惠券类型",
key: "couponType",
width: 120,
render: (h, params) => {
if (params.row.couponType === "DISCOUNT") {
return h("Tag", { props: { color: "orange" } }, "打折");
} else if (params.row.couponType === "PRICE") {
return h("Tag", { props: { color: "magenta" } }, "减免现金");
} else {
return h("Tag", { props: { color: "purple" } }, "未知");
}
},
},
{
title: "品类描述",
key: "scopeType",
width: 120,
render: (h, params) => {
return promotionsScopeTypeRender(h, params);
},
},
{
title: "有效时间",
width: 150,
render: (h, params) => {
if (
params?.row?.getType === "ACTIVITY" &&
params?.row?.rangeDayType === "DYNAMICTIME"
) {
return h("div", "长期有效");
} else if (params?.row?.startTime && params?.row?.endTime) {
return h("div", {
domProps: {
innerHTML:
params.row.startTime + "<br/>" + params.row.endTime,
},
});
}
},
},
],
data: [], //
total: 0, //
refreshTable: true, //
selectDate: [], //
};
},
props: {
promotionStatus: {
type: String,
default: "",
},
},
watch: {
$route(e) {
//
this.searchForm.couponId = e.query.couponId;
if (this.couponId) {
this.getDataList();
} else {
this.$refs.form.resetFields();
}
},
},
methods: {
back() {
this.$store.commit("removeTag", "coupon-receive");
this.$router.go(-1);
},
check() {
//
this.$emit("selected", this.selectList);
},
//
init() {
this.getDataList();
},
changePage(v) {
//
this.searchForm.pageNumber = v;
this.getDataList();
},
changePageSize(v) {
//
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = v;
this.getDataList();
},
handleSearch() {
//
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.getDataList();
},
/**
* 选择优惠券
*/
changeSelect(e) {
this.selectList = e;
this.selectCount = e.length;
if (this.getType === "ACTIVITY") this.check();
},
getDataList() {
//
this.loading = true;
if (this.selectDate && this.selectDate[0] && this.selectDate[1]) {
this.searchForm.startTime = this.selectDate[0].getTime();
this.searchForm.endTime = this.selectDate[1].getTime();
} else {
this.searchForm.startTime = null;
this.searchForm.endTime = null;
}
getCouponReceiveList(this.searchForm).then((res) => {
this.loading = false;
if (res.success) {
console.log(res);
this.data = res.result.records;
this.total = res.result.total;
}
});
this.total = this.data.length;
this.loading = false;
},
},
mounted() {
this.init();
},
};
</script>

View File

@ -17,6 +17,17 @@
style="width: 200px"
/>
</Form-item>
<Form-item label="获取方式" prop="getType">
<Select
v-model="searchForm.getType"
placeholder="请选择"
clearable
style="width: 200px"
>
<Option value="FREE">免费获取</Option>
<Option value="ACTIVITY">活动获取</Option>
</Select>
</Form-item>
<Form-item label="活动状态" prop="promotionStatus">
<Select
v-model="searchForm.promotionStatus"
@ -50,6 +61,7 @@
<Row class="operation padding-row" v-if="getType !== 'ACTIVITY'">
<Button @click="add" type="primary">添加优惠券</Button>
<Button @click="delAll"></Button>
<Button @click="receivePage()" type="info">优惠券领取记录</Button>
</Row>
<Table
v-if="refreshTable"
@ -97,6 +109,13 @@
@click="remove(row)"
>删除
</Button>
<Button
style="margin: 5px"
type="info"
size="small"
@click="receivePage(row.id)"
>领取记录
</Button>
</template>
</Table>
<Row type="flex" justify="end" class="mt_10">
@ -150,12 +169,6 @@ export default {
align: "center",
fixed: "left",
},
{
title: "活动名称",
key: "promotionName",
width: 180,
fixed: "left",
},
{
title: "优惠券名称",
key: "couponName",
@ -200,6 +213,24 @@ export default {
return h("div", params.row.usedNum + "/" + params.row.receivedNum);
},
},
{
title: "获取方式",
width: 120,
key: "getType",
render: (h, params) => {
if (params.row.getType === "FREE") {
return h("Tag", { props: { color: "red" } }, "免费获取");
} else if (params.row.getType === "ACTIVITY") {
return h("Tag", { props: { color: "volcano" } }, "活动获取");
} else if (params.row.getType === "INSIDE") {
return h("Tag", { props: { color: "lime" } }, "内购");
} else if (params.row.getType === "IGAME") {
return h("Tag", { props: { color: "lime" } }, "游戏人生");
} else {
return h("Tag", { props: { color: "purple" } }, "未知");
}
},
},
{
title: "优惠券类型",
key: "couponType",
@ -324,6 +355,13 @@ export default {
//
this.$emit("selected", this.selectList);
},
receivePage(id) {
if (id) {
this.$router.push({ name: "coupon-receive", query: { couponId: id } });
} else {
this.$router.push({ name: "coupon-receive" });
}
},
//
init() {
this.getDataList();

View File

@ -33,11 +33,7 @@
<Select
v-model="form.pointsGoodsCategoryId"
:label-in-value="true"
@on-change="
(val) => {
changeCategory(val, index);
}
"
@on-change="changeCategory"
>
<Option v-for="item in categoryList" :value="item.id" :key="item.id">{{
item.name
@ -97,7 +93,10 @@ export default {
name: "editPointsGoods",
data() {
return {
pointsGoodsCategoryId:'',
pointsGoodsCategoryName:'',
form: {
/** 活动名称 */
promotionName: "",
/** 报名截止时间 */
@ -110,6 +109,7 @@ export default {
seckillRule: "",
goodsSku: {},
promotionStatus: "NEW",
},
categoryList: [], //
id: this.$route.query.id, // id
@ -134,6 +134,12 @@ export default {
}
},
methods: {
//
changeCategory(v){
console.log(v);
this.pointsGoodsCategoryId=v.value
this.pointsGoodsCategoryName=v.label
},
//
closeCurrentPage() {
this.$store.commit("removeTag", "edit-points-goods");
@ -167,7 +173,12 @@ export default {
this.form.startTime = start;
this.form.endTime = end;
this.submitLoading = true;
updatePointsGoods(this.form).then((res) => {
let params={
...this.form,
pointsGoodsCategoryId: this.pointsGoodsCategoryId,
pointsGoodsCategoryName:this.pointsGoodsCategoryName
}
updatePointsGoods(params).then((res) => {
this.submitLoading = false;
if (res.success) {
this.$Message.success("积分商品修改成功");

View File

@ -3,16 +3,16 @@ var BASE = {
* @description api请求基础路径
*/
API_DEV: {
common: "http://192.168.0.113:8890",
buyer: "http://192.168.0.113:8888",
seller: "http://192.168.0.113:8889",
manager: "http://192.168.0.113:8887"
common: "https://common-api.pickmall.cn",
buyer: "https://buyer-api.pickmall.cn",
seller: "https://store-api.pickmall.cn",
manager: "https://admin-api.pickmall.cn",
},
API_PROD: {
common: "https://common-api.pickmall.cn",
buyer: "https://buyer-api.pickmall.cn",
seller: "https://store-api.pickmall.cn",
manager: "https://admin-api.pickmall.cn"
manager: "https://admin-api.pickmall.cn",
},
/**
* @description // 跳转买家端地址 pc端
@ -25,5 +25,5 @@ var BASE = {
/**
* @description api请求基础路径前缀
*/
PREFIX: "/store"
PREFIX: "/store",
};

Binary file not shown.

Binary file not shown.

View File

@ -177,3 +177,8 @@ export const delFullDiscount = (id) => {
export const updateFullDiscount = (id, params) => {
return putRequest(`/promotion/fullDiscount/status/${id}`, params)
}
// 获取优惠券领取记录
export const getCouponReceiveList = (params) => {
return getRequest("/promotion/coupon/received", params);
};

View File

@ -158,6 +158,12 @@ export const otherRouter = {
name: "renovation",
component: () => import("@/views/shop/renovation.vue")
},
{
path: "promotions/coupon-receive",
title: "优惠券领取记录",
name: "coupon-receive",
component: () => import("@/views/promotion/coupon/coupon-receive.vue"),
},
// {
// path: "/*",
// name: "error-404",

View File

@ -57,4 +57,31 @@ export function promotionsScopeTypeRender(h, params) {
]);
}
export function memberPromotionsStatusRender(h, status) {
let text = "未知",
color = "red";
if (status == "NEW") {
text = "已领取";
color = "geekblue";
} else if (status == "USED") {
text = "已使用";
color = "green";
} else if (status == "EXPIRE") {
text = "已过期";
color = "red";
} else if (status == "CLOSED") {
text = "已作废";
color = "red";
}
return h("div", [
h(
"Tag",
{
props: {
color: color,
},
},
text
),
]);
}

View File

@ -1383,6 +1383,10 @@ export default {
this.$Message.error("已存在相同规格值!");
return;
}
if (val.value === '') {
this.$Message.error("规格值不能为空!");
return;
}
let curVal = this.currentSkuVal;
this.skuTableData = this.skuTableData.map((e) => {
if (e[val.name] === curVal) {

View File

@ -117,7 +117,7 @@
</template>
</Col>
<Col span="12">
<div class="div-item">
<div class="div-item" v-if="orderInfo.order.deliveryMethod != 'SELF_PICK_UP'">
<div class="div-item-left">收货信息</div>
<div class="div-item-right">
{{ orderInfo.order.consigneeName }}
@ -126,6 +126,13 @@
{{ orderInfo.order.consigneeDetail }}
</div>
</div>
<div class="div-item" v-if="orderInfo.order.deliveryMethod == 'SELF_PICK_UP'">
<div class="div-item-left">自提信息</div>
<div class="div-item-right">
{{ orderInfo.order.storeAddressPath }}
{{ orderInfo.order.storeAddressMobile }}
</div>
</div>
<div class="div-item">
<div class="div-item-left">支付方式</div>
<div class="div-item-right">

View File

@ -39,6 +39,7 @@
<Option value="DELIVERED">已发货</Option>
<Option value="COMPLETED">已完成</Option>
<Option value="CANCELLED">已取消</Option>
<Option value="STAY_PICKED_UP">待自提</Option>
</Select>
</Form-item>
<Form-item label="订单类型" prop="orderType">
@ -225,6 +226,10 @@ export default {
return h("div", [
h("tag", { props: { color: "geekblue" } }, "待发货"),
]);
}else if (params.row.orderStatus == "STAY_PICKED_UP") {
return h("div", [
h("tag", { props: { color: "geekblue" } }, "待自提"),
]);
} else if (params.row.orderStatus == "DELIVERED") {
return h("div", [
h("tag", { props: { color: "cyan" } }, "已发货"),

View File

@ -0,0 +1,285 @@
<template>
<div class="search">
<Card>
<Button style="margin-bottom: 10px" @click="back()"></Button>
<Form
ref="searchForm"
:model="searchForm"
inline
:label-width="75"
class="search-form mb_10"
>
<Form-item label="优惠券名称" prop="couponName">
<Input
type="text"
v-model="searchForm.couponName"
placeholder="请输入优惠券名称"
clearable
style="width: 200px"
/>
</Form-item>
<Form-item label="会员名称" prop="memberName">
<Input
type="text"
v-model="searchForm.memberName"
placeholder="请输入会员名称"
clearable
style="width: 200px"
/>
</Form-item>
<Form-item label="优惠券状态" prop="memberCouponStatus">
<Select
v-model="searchForm.memberCouponStatus"
placeholder="请选择"
clearable
style="width: 200px"
>
<Option value="NEW">已领取</Option>
<Option value="USED">已使用</Option>
<Option value="EXPIRE">已过期</Option>
<Option value="CLOSED">已作废</Option>
</Select>
</Form-item>
<Form-item label="活动时间">
<DatePicker
v-model="selectDate"
type="daterange"
clearable
placeholder="选择起始时间"
style="width: 200px"
></DatePicker>
</Form-item>
<Button
@click="handleSearch"
type="primary"
icon="ios-search"
class="search-btn"
>搜索</Button
>
</Form>
<Table
v-if="refreshTable"
:loading="loading"
border
:columns="columns"
:data="data"
ref="table"
class="mt_10"
@on-selection-change="changeSelect"
>
</Table>
<Row type="flex" justify="end" class="mt_10">
<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>
</Row>
</Card>
</div>
</template>
<script>
import { getCouponReceiveList } from "@/api/promotion";
import {
memberPromotionsStatusRender,
promotionsScopeTypeRender,
} from "@/utils/promotions";
export default {
name: "coupon-recevie",
data() {
return {
loading: true, //
searchForm: {
//
pageNumber: 1, //
pageSize: 10, //
sort: "create_time", //
order: "desc", //
getType: "", //
couponId: this.$route.query.couponId, // id
},
selectList: [], //
selectCount: 0, //
columns: [
//
{
title: "会员名称",
key: "memberName",
fixed: "left",
},
{
title: "优惠券名称",
key: "couponName",
minWidth: 100,
tooltip: true,
},
{
title: "面额/折扣",
key: "price",
width: 100,
render: (h, params) => {
if (params.row.price) {
return h(
"div",
this.$options.filters.unitPrice(params.row.price, "¥")
);
} else {
return h("div", params.row.discount + "折");
}
},
},
{
title: "使用门槛",
key: "consumeThreshold",
width: 130,
},
{
title: "会员优惠券状态",
width: 130,
key: "memberCouponStatus",
render: (h, params) => {
return memberPromotionsStatusRender(
h,
params.row.memberCouponStatus
);
},
},
{
title: "优惠券类型",
key: "couponType",
width: 120,
render: (h, params) => {
if (params.row.couponType === "DISCOUNT") {
return h("Tag", { props: { color: "orange" } }, "打折");
} else if (params.row.couponType === "PRICE") {
return h("Tag", { props: { color: "magenta" } }, "减免现金");
} else {
return h("Tag", { props: { color: "purple" } }, "未知");
}
},
},
{
title: "品类描述",
key: "scopeType",
width: 120,
render: (h, params) => {
return promotionsScopeTypeRender(h, params);
},
},
{
title: "有效时间",
width: 150,
render: (h, params) => {
if (
params?.row?.getType === "ACTIVITY" &&
params?.row?.rangeDayType === "DYNAMICTIME"
) {
return h("div", "长期有效");
} else if (params?.row?.startTime && params?.row?.endTime) {
return h("div", {
domProps: {
innerHTML:
params.row.startTime + "<br/>" + params.row.endTime,
},
});
}
},
},
],
data: [], //
total: 0, //
refreshTable: true, //
selectDate: [], //
};
},
props: {
promotionStatus: {
type: String,
default: "",
},
},
watch: {
$route(e) {
//
this.searchForm.couponId = e.query.couponId;
if (this.couponId) {
this.getDataList();
} else {
this.$refs.form.resetFields();
}
},
},
methods: {
back() {
this.$store.commit("removeTag", "coupon-receive");
this.$router.go(-1);
},
check() {
//
this.$emit("selected", this.selectList);
},
//
init() {
this.getDataList();
},
changePage(v) {
//
this.searchForm.pageNumber = v;
this.getDataList();
},
changePageSize(v) {
//
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = v;
this.getDataList();
},
handleSearch() {
//
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.getDataList();
},
/**
* 选择优惠券
*/
changeSelect(e) {
this.selectList = e;
this.selectCount = e.length;
if (this.getType === "ACTIVITY") this.check();
},
getDataList() {
//
this.loading = true;
if (this.selectDate && this.selectDate[0] && this.selectDate[1]) {
this.searchForm.startTime = this.selectDate[0].getTime();
this.searchForm.endTime = this.selectDate[1].getTime();
} else {
this.searchForm.startTime = null;
this.searchForm.endTime = null;
}
getCouponReceiveList(this.searchForm).then((res) => {
this.loading = false;
if (res.success) {
console.log(res);
this.data = res.result.records;
this.total = res.result.total;
}
});
this.total = this.data.length;
this.loading = false;
},
},
mounted() {
this.init();
},
};
</script>

View File

@ -53,6 +53,7 @@
<Row class="operator padding-row">
<Button @click="add" type="primary">添加</Button>
<Button @click="delAll" class="ml_10">批量关闭</Button>
<Button @click="receivePage()" class="ml_10" type="info">优惠券领取记录</Button>
</Row>
<Table
class="mt_10"
@ -86,6 +87,13 @@
@click="remove(row)"
>关闭</Button
>
<Button
style="margin: 5px"
type="info"
size="small"
@click="receivePage(row.id)"
>领取记录
</Button>
</template>
</Table>
<Row type="flex" justify="end" class="mt_10">
@ -136,11 +144,6 @@ export default {
align: "center",
fixed: "left",
},
{
title: "活动名称",
key: "promotionName",
fixed: "left",
},
{
title: "优惠券名称",
key: "couponName",
@ -204,7 +207,7 @@ export default {
},
{
title: "活动时间",
width: 150,
render: (h, params) => {
if (
params?.row?.getType === "ACTIVITY" &&
@ -246,6 +249,13 @@ export default {
init() {
this.getDataList();
},
receivePage(id) {
if (id) {
this.$router.push({ name: "coupon-receive", query: { couponId: id } });
} else {
this.$router.push({ name: "coupon-receive" });
}
},
add() {
this.$router.push({ name: "add-coupon" });
},

View File

@ -9,7 +9,7 @@
ref="table"
></Table>
</Card>
<Modal v-model="openModal" :title="openModalTitle" @on-ok="submit">
<Modal v-model="openModal" :title="openModalTitle" @on-ok="submit" @on-cancel="cancelModal">
<h3 style="color: #ff3c2a; margin-bottom: 10px">是否需要电子面单</h3>
<RadioGroup
v-model="faceSheetForm.faceSheetFlag"
@ -245,6 +245,10 @@ export default {
});
this.loading = false;
},
cancelModal(){
this.faceSheetFlag = false;
this.faceSheetForm.faceSheetFlag = false;
},
//
open(v) {
this.row = v;
@ -284,7 +288,7 @@ export default {
var a = document.createElement("a"); //<a></a>
//
if (val === 'use') {
a.href = "static/open.xlsx"; // ahref .
a.href = "static/instructions.xlsx"; // ahref .
a.download = "使用说明.xlsx"; //.xlsxpdf.fpd
} else if (val === 'type') {
a.href = "static/logisticsType.xlsx"; // ahref .