Merge branch 'ma'

# Conflicts:
#	manager/src/config/index.js
master
mabo 2021-05-21 17:47:48 +08:00
commit 44c88468d4
25 changed files with 114 additions and 247 deletions

View File

@ -85,6 +85,14 @@ module.exports = {
limit: 10000,
name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
}
},
{
test: /\.(cur)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('cur/[name].[hash:7].[ext]')
}
}
]
},

View File

@ -6,7 +6,7 @@
<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 === '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>

View File

@ -38,7 +38,7 @@
<div class="c-left">
<div>
<span v-if="coupon.couponType === 'PRICE'" class="fontsize_12 global_color">¥<span class="price">{{coupon.price | unitPrice}}</span></span>
<span v-if="coupon.couponType === 'DISCOUNT'" class="fontsize_12 global_color"><span class="price">{{coupon.discount}}</span></span>
<span v-if="coupon.couponType === 'DISCOUNT'" class="fontsize_12 global_color"><span class="price">{{coupon.couponDiscount}}</span></span>
<span class="describe">{{coupon.consumeThreshold}}元可用</span>
</div>
<p>使用范围{{useScope(coupon.scopeType, coupon.storeName)}}</p>

View File

@ -56,8 +56,8 @@
<Rate disabled :value="Number(item.descriptionScore)" allow-half class="remarks-star"></Rate>
</p>
<p class="remarks-content">{{item.content}}</p>
<div class="comment-img" v-if="item.image">
<div v-for="(img, imgIndex) in item.image.split(',')"
<div class="comment-img" v-if="item.images">
<div v-for="(img, imgIndex) in item.images.split(',')"
@click="previewImg(img, item)"
:class="{borderColor:img === item.previewImg}"
:key="imgIndex">

View File

@ -53,16 +53,19 @@
</li>
<li class="hover-color" @click="goUserCenter('/home/MyOrder')"><span class="nav-item">我的订单</span></li>
<li class="hover-color" @click="goUserCenter('/home/MyTracks')"><span class="nav-item">我的足迹</span></li>
<li v-if="$route.name !== 'Cart'" style="position:relative;" @mouseenter="getCartList">
<li v-if="$route.name !== 'Cart'" style="position:relative;" >
<i class="cart-badge" v-show="Number(cartNum)">{{cartNum < 100 ? cartNum : '99'}}</i>
<Dropdown placement="bottom-start">
<router-link to="cart" target="_blank">
<Icon
size="18"
class="cart-icon"
type="ios-cart-outline"
></Icon>
购物车
<router-link to="cart" target="_blank" >
<span @mouseenter="getCartList">
<Icon
size="18"
class="cart-icon"
type="ios-cart-outline"
></Icon>
购物车
</span>
</router-link>
<DropdownMenu slot="list">
@ -115,7 +118,7 @@
<script>
import storage from '@/plugins/storage.js';
import {cartGoodsAll, cartCount} from '@/api/cart.js'
import {cartGoodsAll} from '@/api/cart.js'
export default {
name: 'M-Header',
created () {
@ -211,12 +214,11 @@ export default {
},
getCartList () { //
if (this.userInfo.username) {
cartCount().then(res => {
this.$store.commit('SET_CARTNUM', res.result)
this.Cookies.setItem('cartNum', res.result)
})
cartGoodsAll().then(res => {
this.shoppingCart = res.result.skuList
this.$store.commit('SET_CARTNUM', this.shoppingCart.length)
this.Cookies.setItem('cartNum', this.shoppingCart.length)
})
}
}

View File

@ -31,7 +31,7 @@
<template v-else>
<div style="font-size:14px">全部结果</div>
<Icon type="ios-arrow-forward" />
<div>{{params.keyword}}</div>
<div style="font-weight:bold;" class="mr_10">{{params.keyword}}</div>
</template>
<!-- 所选分类 -->
<a
@ -41,8 +41,7 @@
:key="index"
:title="item.name"
>
<span>{{ item.type }}</span><span>{{ item.name }}</span
><Icon type="md-close" />
<span>{{ item.type }}</span><span>{{ item.name }}</span><Icon type="md-close" />
</a>
</div>
@ -190,23 +189,21 @@ export default {
selectedItem: {
//
handler (val) {
console.log(val);
let classification = [];
if (val.length) {
val.forEach((item) => {
if (item.type === '品牌') {
this.params.brandId = this.brandIds.join('@');
} else {
const nameArr = item.name.split('、');
nameArr.forEach((name) => {
classification.push(item.type + '_' + name);
});
}
});
this.params.prop = classification.join('@');
} else {
this.params.prop = ''
this.params.brandId = ''
}
this.params.brandId = ''
this.params.prop = ''
val.forEach((item) => {
if (item.type === '品牌') {
this.params.brandId = this.brandIds.join('@');
} else {
const nameArr = item.name.split('、');
nameArr.forEach((name) => {
classification.push(item.type + '_' + name);
});
}
});
this.params.prop = classification.join('@');
this.getFilterList(this.params);
this.$emit('getParams', this.params);
},
@ -251,7 +248,7 @@ export default {
this.$set(this.tabBar, 'second', second)
}
},
cateClick (item, index) {
cateClick (item, index) { //
switch (index) {
case 1:
this.$router.push({
@ -299,7 +296,6 @@ export default {
brands.forEach((val) => {
if (val.name === item) this.brandIds.push(val.value);
console.log(this.brandIds);
});
}
}

View File

@ -50,7 +50,7 @@
<div v-if="couponAvailable === index">
<div class="coupon-item" v-for="(item, index) in shop.couponList" :key="index">
<span v-if="item.couponType === 'PRICE'">{{ item.price }}</span>
<span v-if="item.couponType === 'DISCOUNT'">{{ item.discount }}</span>
<span v-if="item.couponType === 'DISCOUNT'">{{ item.couponDiscount }}</span>
<span>{{item.consumeThreshold}}元可用</span>
<Button class="coupon-btn" size="small" type="primary" @click="receiveShopCoupon(item)" :disabled="item.disabled">{{ item.disabled ? "已领取" : "领取" }}</Button>
</div>

View File

@ -19,7 +19,7 @@
<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 === '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>

View File

@ -113,7 +113,7 @@
<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 === 'DISCOUNT'" class="fontsize_12 global_color"><span class="price">{{item.couponDiscount}}</span></span>
<span class="describe">{{item.consumeThreshold}}元可用</span>
</div>
<p>使用范围{{useScope(item.scopeType)}}</p>

View File

@ -147,7 +147,7 @@ export default {
{
style: {},
},
this.$options.filters.unitPrice(params.row.price)
this.$options.filters.unitPrice(params.row.price, '¥')
);
},
},

View File

@ -174,7 +174,6 @@ export default {
{
title: "领取数量/总数量",
key: "publishNum",
width: 100,
render: (h, params) => {
return h(
"div", params.row.receivedNum + "/" + params.row.publishNum)
@ -214,7 +213,6 @@ export default {
},
{
title: "活动时间",
minWidth: 120,
render: (h, params) => {
return h("div", {
domProps:

View File

@ -14,7 +14,7 @@
}}</span>
</FormItem>
<FormItem label="面额">
<span class="goods-category-name"> {{ form.price }}</span>
<span class="goods-category-name"> {{ form.price | unitPrice }}</span>
</FormItem>
<FormItem label="活动说明">
<span class="goods-category-name">{{ form.description }}</span>

View File

@ -49,11 +49,15 @@
<FormItem label="领取限制" prop="couponLimitNum">
<Input v-model="form.couponLimitNum" placeholder="领取限制" clearable style="width: 260px" />
</FormItem>
<FormItem label="有效期" prop="startTime">
<DatePicker type="datetime" v-model="form.startTime" format="yyyy-MM-dd HH:mm:ss" placeholder="请选择" :options="options" clearable style="width: 200px">
</DatePicker>
-
<DatePicker type="datetime" v-model="form.endTime" format="yyyy-MM-dd HH:mm:ss" :options="options" placeholder="请选择" clearable style="width: 200px">
<FormItem label="有效期" prop="rangeTime">
<DatePicker
type="datetimerange"
v-model="form.rangeTime"
format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择"
:options="options"
style="width: 260px"
>
</DatePicker>
</FormItem>
<FormItem label="使用范围" prop="scopeType">
@ -135,20 +139,6 @@ export default {
callback();
}
};
const isLtEndDate = (rule, value, callback) => {
if (new Date(value).getTime() > new Date(this.form.endTime).getTime()) {
callback(new Error());
} else {
callback();
}
};
const isGtStartDate = (rule, value, callback) => {
if (new Date(value).getTime() < new Date(this.form.startTime).getTime()) {
callback(new Error());
} else {
callback();
}
};
return {
modalType: 0, //
form: {
@ -186,34 +176,11 @@ export default {
{ required: true, message: "请输入面额" },
{ validator: checkPrice },
],
rangeTime: [{ required: true, message: "请选择优惠券有效期" }],
consumeThreshold: [
{ required: true, message: "请输入消费门槛" },
{ validator: checkWeight },
],
startTime: [
{
required: true,
type: "date",
message: "请选择开始时间",
},
{
trigger: "change",
message: "开始时间要小于结束时间",
validator: isLtEndDate,
},
],
endTime: [
{
required: true,
type: "date",
message: "请选择结束时间",
},
{
trigger: "change",
message: "结束时间要大于开始时间",
validator: isGtStartDate,
},
],
couponDiscount: [
{ required: true, message: "请输入折扣" },
{
@ -337,6 +304,8 @@ export default {
next(this.goodsCategoryList, []);
data.scopeIdGoods = prevCascader;
}
data.rangeTime = [];
data.rangeTime.push(new Date(data.startTime), new Date(data.endTime));
this.form = data;
});
},
@ -345,15 +314,14 @@ export default {
this.$refs.form.validate((valid) => {
if (valid) {
const params = JSON.parse(JSON.stringify(this.form));
const strat = this.$options.filters.unixToDate(
this.form.startTime / 1000
params.startTime = this.$options.filters.unixToDate(
this.form.rangeTime[0] / 1000
);
const end = this.$options.filters.unixToDate(
this.form.endTime / 1000
params.endTime = this.$options.filters.unixToDate(
this.form.rangeTime[1] / 1000
);
delete params.rangeTime
let scopeId = [];
params.startTime = strat;
params.endTime = end;
if (
params.scopeType == "PORTION_GOODS" &&

View File

@ -15,7 +15,7 @@
<div>{{ form.goodsSku.sellerName }}</div>
</FormItem>
<FormItem label="商品价格" prop="goodsPrice">
<div>{{ form.goodsSku.price }}</div>
<div>{{ form.goodsSku.price | unitPrice('¥') }}</div>
</FormItem>
<FormItem label="库存" prop="quantity">
<div>{{ form.goodsSku.quantity }}</div>

View File

@ -54,7 +54,7 @@ export default {
render: (h, params) => {
return h(
"div",
this.$options.filters.unitPrice(params.row.price)
this.$options.filters.unitPrice(params.row.price, '¥')
);
},
},

View File

@ -183,13 +183,14 @@ export default {
{
title: "商品价格",
key: "price",
minWidth: 120
render: (h, params) => {
return h('div', this.$options.filters.unitPrice(params.row.price, '¥'))
}
},
{
title: "商品库存",
key: "quantity",
minWidth: 120
},
{
title: "创建时间",
@ -200,7 +201,7 @@ export default {
title: "操作",
key: "action",
align: "center",
width: 200,
width: 150,
render: (h, params) => {
return h("div", [
h(

View File

@ -166,7 +166,7 @@
<Icon class="icon" size="31" type="ios-card" />
</div>
<div>
<div class="counts">{{homeData.orderPrice ||0}}</div>
<div class="counts">{{homeData.orderPrice || 0 | unitPrice('¥')}}</div>
<div>订单总额</div>
</div>

View File

@ -2,7 +2,6 @@
<div>
<Row class="header">
<img src="../../assets/lili.png" class="logo" width="220px">
</Row>
</div>
</template>

View File

@ -173,7 +173,7 @@
</dt>
<dd>
<a>{{ complaintInfo.goodsName }}</a><br>
<span>{{ complaintInfo.goodsPrice | unitPrice }} * {{ complaintInfo.num }}(数量)</span>
<span>{{ complaintInfo.goodsPrice | unitPrice }} * {{ complaintInfo.num }}(数量)</span>
</dd>
</dl>
@ -201,7 +201,7 @@
订单金额
</dt>
<dd>
{{ complaintInfo.orderPrice }}
{{ complaintInfo.orderPrice | unitPrice('¥')}}
</dd>
</dl>

View File

@ -90,26 +90,14 @@
style="width: 260px"
/>
</FormItem>
<FormItem label="有效期" prop="startTime">
<FormItem label="有效期" prop="rangeTime">
<DatePicker
type="datetime"
v-model="form.startTime"
type="datetimerange"
v-model="form.rangeTime"
format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择"
:options="options"
clearable
style="width: 200px"
>
</DatePicker>
-
<DatePicker
type="datetime"
v-model="form.endTime"
format="yyyy-MM-dd HH:mm:ss"
:options="options"
placeholder="请选择"
clearable
style="width: 200px"
style="width: 260px"
>
</DatePicker>
</FormItem>
@ -225,20 +213,7 @@ export default {
callback();
}
};
const isLtEndDate = (rule, value, callback) => {
if (new Date(value).getTime() > new Date(this.form.endTime).getTime()) {
callback(new Error());
} else {
callback();
}
};
const isGtStartDate = (rule, value, callback) => {
if (new Date(value).getTime() < new Date(this.form.startTime).getTime()) {
callback(new Error());
} else {
callback();
}
};
return {
modalType: 0, // 0 1
categoryId: 0, // id
@ -281,30 +256,7 @@ export default {
{ required: true, message: "请输入消费门槛" },
{ validator: checkWeight },
],
startTime: [
{
required: true,
type: "date",
message: "请选择开始时间",
},
{
trigger: "change",
message: "开始时间要小于结束时间",
validator: isLtEndDate,
},
],
endTime: [
{
required: true,
type: "date",
message: "请选择结束时间",
},
{
trigger: "change",
message: "结束时间要大于开始时间",
validator: isGtStartDate,
},
],
rangeTime: [{ required: true, message: "请选择优惠券有效期" }],
couponDiscount: [
{ required: true, message: "请输入折扣" },
{
@ -425,6 +377,8 @@ export default {
next(this.goodsCategoryList, []);
data.scopeIdGoods = prevCascader;
}
data.rangeTime = [];
data.rangeTime.push(new Date(data.startTime), new Date(data.endTime));
this.form = data;
});
},
@ -433,16 +387,14 @@ export default {
this.$refs.form.validate((valid) => {
if (valid) {
const params = JSON.parse(JSON.stringify(this.form));
const strat = this.$options.filters.unixToDate(
this.form.startTime / 1000
params.startTime = this.$options.filters.unixToDate(
this.form.rangeTime[0] / 1000
);
const end = this.$options.filters.unixToDate(
this.form.endTime / 1000
params.endTime = this.$options.filters.unixToDate(
this.form.rangeTime[1] / 1000
);
delete params.rangeTime
let scopeId = [];
params.startTime = strat;
params.endTime = end;
if (
params.scopeType == "PORTION_GOODS" &&
(!params.promotionGoodsList ||

View File

@ -8,26 +8,14 @@
活动名称将显示在对人拼团活动列表中方便商家管理使用最多输入25个字符
</div>
</FormItem>
<FormItem label="活动时间" prop="startTime">
<FormItem label="活动时间" prop="rangeTime">
<DatePicker
type="datetime"
v-model="form.startTime"
type="datetimerange"
v-model="form.rangeTime"
format="yyyy-MM-dd HH:mm:ss"
:options="options"
placeholder="请选择"
clearable
style="width: 200px"
>
</DatePicker>
-
<DatePicker
type="datetime"
v-model="form.endTime"
format="yyyy-MM-dd HH:mm:ss"
:options="options"
placeholder="请选择"
clearable
style="width: 200px"
style="width: 260px"
>
</DatePicker>
</FormItem>
@ -87,20 +75,6 @@
import { savePintuan, editPintuan, getPintuanDetail } from "@/api/promotion";
export default {
data() {
const isLtEndDate = (rule, value, callback) => {
if (new Date(value).getTime() > new Date(this.form.endTime).getTime()) {
callback(new Error());
} else {
callback();
}
};
const isGtStartDate = (rule, value, callback) => {
if (new Date(value).getTime() < new Date(this.form.startTime).getTime()) {
callback(new Error());
} else {
callback();
}
};
return {
id: this.$route.query.id, // id
form: {
@ -131,33 +105,10 @@ export default {
message: "限购数不合法",
},
],
startTime: [
{
required: true,
type: "date",
message: "请选择开始时间",
},
{
trigger: "change",
message: "开始时间要小于结束时间",
validator: isLtEndDate,
},
],
endTime: [
{
required: true,
type: "date",
message: "请选择结束时间",
},
{
trigger: "change",
message: "结束时间要大于开始时间",
validator: isGtStartDate,
},
],
rangeTime: [{ required: true, message: "请选择活动时间" }],
},
submitLoading: false, //
options: { //
options: { //
disabledDate(date) {
return date && date.valueOf() < Date.now() - 86400000;
},
@ -185,11 +136,12 @@ export default {
this.submitLoading = true;
let params = JSON.parse(JSON.stringify(this.form));
params.startTime = this.$options.filters.unixToDate(
this.form.startTime / 1000
this.form.rangeTime[0] / 1000
);
params.endTime = this.$options.filters.unixToDate(
this.form.endTime / 1000
this.form.rangeTime[1] / 1000
);
delete params.rangeTime
if (!this.id) {
// id
delete params.id;
@ -218,7 +170,10 @@ export default {
getDetail() {
getPintuanDetail(this.id).then((res) => {
if (res.success) {
this.form = res.result;
const data = res.result;
data.rangeTime = [];
data.rangeTime.push(new Date(data.startTime), new Date(data.endTime));
this.form = data;
}
});
},

View File

@ -21,9 +21,6 @@
<template slot-scope="{ row, index }" slot="price">
<Input v-model="row.price" :disabled="status==='view'" @input="goodsData[index].price = row.price" />
</template>
<template slot-scope="{ row }" slot="QRCode">
<img :src="row.QRCode || '../../../assets/lili.png'" width="50px" height="50px" alt="" />
</template>
<template slot-scope="{ index }" slot="action">
<Button type="error" size="small" ghost v-if="status === 'manager'" @click="delGoods(index)"></Button>
</template>
@ -107,11 +104,7 @@ export default {
return h("div", [
h(
"Tag",
{
props: {
color: color,
},
},
{props: {color: color}},
text
),
]);
@ -125,20 +118,17 @@ export default {
key: "goodsName",
minWidth: 120,
},
{
title: "库存",
key: "quantity",
minWidth: 40,
},
{
title: "拼团价格",
key: "price",
slot: "price",
minWidth: 50,
},
{
title: "操作",
slot: "action",
@ -188,23 +178,23 @@ export default {
}
});
},
init() {
init() { //
this.getDataList();
this.getPintuanMsg();
},
changePage(v) {
changePage(v) { //
this.searchForm.pageNumber = v - 1;
this.getDataList();
this.clearSelectAll();
},
changePageSize(v) {
changePageSize(v) { //
this.searchForm.pageSize = v;
this.getDataList();
},
handleSearch() {
handleSearch() { //
this.searchForm.pageNumber = 0;
this.searchForm.pageSize = 10;
this.getDataList();
@ -253,7 +243,7 @@ export default {
//
this.goodsData.splice(index, 1);
},
delAll() {
delAll() { //
if (this.selectCount <= 0) {
this.$Message.warning("您还未选择要删除的数据");
return;
@ -272,7 +262,7 @@ export default {
},
});
},
selectedGoodsData(item) {
selectedGoodsData(item) { //
let ids = [];
let list = [];
this.goodsData.forEach((e) => {
@ -295,7 +285,7 @@ export default {
});
this.goodsData.push(...list);
},
openSkuList() {
openSkuList() { //
this.$refs.skuSelect.open("goods");
},
},

View File

@ -46,13 +46,13 @@
{{children.firstCompany}}
</td>
<td>
<span class="yuan"></span><span class="integer">{{children.firstPrice}}</span>
<span class="yuan"></span><span class="integer">{{children.firstPrice | unitPrice}}</span>
</td>
<td>
{{children.continuedCompany}}
</td>
<td class="bdr">
<span class="yuan"></span><span class="integer">{{children.continuedPrice}}</span>
<span class="yuan"></span><span class="integer">{{children.continuedPrice | unitPrice}}</span>
</td>
</tr>
</tbody>

View File

@ -68,7 +68,7 @@
</div>
<div class="card-item">
<div class="card-item-label">退单金额</div>
<div class="card-item-value">{{overViewList.refundOrderPrice || 0}}</div>
<div class="card-item-value">{{overViewList.refundOrderPrice || 0 | unitPrice('¥')}}</div>
</div>
</div>
@ -333,9 +333,7 @@ export default {
key: "applyRefundPrice",
render: (h, params) => {
return h(
"div",
"¥" +
(params.row.applyRefundPrice ? params.row.applyRefundPrice : 0)
"div", this.$options.filters.unitPrice(params.row.applyRefundPrice, '¥')
);
},
},

View File

@ -51,7 +51,7 @@
<span style="font-size: 14px;">总金额</span>
</p>
<p class="static-num">
{{ priceData.price | unitPrice }}
{{ priceData.price | unitPrice('¥') }}
</p>
</div>
</div>