一些bug修改

master
mabo 2021-05-21 17:46:29 +08:00
parent ae730cacf3
commit 05d35c3974
26 changed files with 120 additions and 249 deletions

View File

@ -85,6 +85,14 @@ module.exports = {
limit: 10000, limit: 10000,
name: utils.assetsPath('fonts/[name].[hash:7].[ext]') 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 class="c-left">
<div> <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 === '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> <span class="describe">{{item.consumeThreshold}}元可用</span>
</div> </div>
<p>使用范围{{useScope(item.scopeType, item.storeName)}}</p> <p>使用范围{{useScope(item.scopeType, item.storeName)}}</p>

View File

@ -38,7 +38,7 @@
<div class="c-left"> <div class="c-left">
<div> <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 === '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> <span class="describe">{{coupon.consumeThreshold}}元可用</span>
</div> </div>
<p>使用范围{{useScope(coupon.scopeType, coupon.storeName)}}</p> <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> <Rate disabled :value="Number(item.descriptionScore)" allow-half class="remarks-star"></Rate>
</p> </p>
<p class="remarks-content">{{item.content}}</p> <p class="remarks-content">{{item.content}}</p>
<div class="comment-img" v-if="item.image"> <div class="comment-img" v-if="item.images">
<div v-for="(img, imgIndex) in item.image.split(',')" <div v-for="(img, imgIndex) in item.images.split(',')"
@click="previewImg(img, item)" @click="previewImg(img, item)"
:class="{borderColor:img === item.previewImg}" :class="{borderColor:img === item.previewImg}"
:key="imgIndex"> :key="imgIndex">

View File

@ -53,16 +53,19 @@
</li> </li>
<li class="hover-color" @click="goUserCenter('/home/MyOrder')"><span class="nav-item">我的订单</span></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 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> <i class="cart-badge" v-show="Number(cartNum)">{{cartNum < 100 ? cartNum : '99'}}</i>
<Dropdown placement="bottom-start"> <Dropdown placement="bottom-start">
<router-link to="cart" target="_blank" > <router-link to="cart" target="_blank" >
<span @mouseenter="getCartList">
<Icon <Icon
size="18" size="18"
class="cart-icon" class="cart-icon"
type="ios-cart-outline" type="ios-cart-outline"
></Icon> ></Icon>
购物车 购物车
</span>
</router-link> </router-link>
<DropdownMenu slot="list"> <DropdownMenu slot="list">
@ -115,7 +118,7 @@
<script> <script>
import storage from '@/plugins/storage.js'; import storage from '@/plugins/storage.js';
import {cartGoodsAll, cartCount} from '@/api/cart.js' import {cartGoodsAll} from '@/api/cart.js'
export default { export default {
name: 'M-Header', name: 'M-Header',
created () { created () {
@ -211,12 +214,11 @@ export default {
}, },
getCartList () { // getCartList () { //
if (this.userInfo.username) { if (this.userInfo.username) {
cartCount().then(res => {
this.$store.commit('SET_CARTNUM', res.result)
this.Cookies.setItem('cartNum', res.result)
})
cartGoodsAll().then(res => { cartGoodsAll().then(res => {
this.shoppingCart = res.result.skuList 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> <template v-else>
<div style="font-size:14px">全部结果</div> <div style="font-size:14px">全部结果</div>
<Icon type="ios-arrow-forward" /> <Icon type="ios-arrow-forward" />
<div>{{params.keyword}}</div> <div style="font-weight:bold;" class="mr_10">{{params.keyword}}</div>
</template> </template>
<!-- 所选分类 --> <!-- 所选分类 -->
<a <a
@ -41,8 +41,7 @@
:key="index" :key="index"
:title="item.name" :title="item.name"
> >
<span>{{ item.type }}</span><span>{{ item.name }}</span <span>{{ item.type }}</span><span>{{ item.name }}</span><Icon type="md-close" />
><Icon type="md-close" />
</a> </a>
</div> </div>
@ -190,8 +189,10 @@ export default {
selectedItem: { selectedItem: {
// //
handler (val) { handler (val) {
console.log(val);
let classification = []; let classification = [];
if (val.length) { this.params.brandId = ''
this.params.prop = ''
val.forEach((item) => { val.forEach((item) => {
if (item.type === '品牌') { if (item.type === '品牌') {
this.params.brandId = this.brandIds.join('@'); this.params.brandId = this.brandIds.join('@');
@ -203,10 +204,6 @@ export default {
} }
}); });
this.params.prop = classification.join('@'); this.params.prop = classification.join('@');
} else {
this.params.prop = ''
this.params.brandId = ''
}
this.getFilterList(this.params); this.getFilterList(this.params);
this.$emit('getParams', this.params); this.$emit('getParams', this.params);
}, },
@ -251,7 +248,7 @@ export default {
this.$set(this.tabBar, 'second', second) this.$set(this.tabBar, 'second', second)
} }
}, },
cateClick (item, index) { cateClick (item, index) { //
switch (index) { switch (index) {
case 1: case 1:
this.$router.push({ this.$router.push({
@ -299,7 +296,6 @@ export default {
brands.forEach((val) => { brands.forEach((val) => {
if (val.name === item) this.brandIds.push(val.value); 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 v-if="couponAvailable === index">
<div class="coupon-item" v-for="(item, index) in shop.couponList" :key="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 === '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> <span>{{item.consumeThreshold}}元可用</span>
<Button class="coupon-btn" size="small" type="primary" @click="receiveShopCoupon(item)" :disabled="item.disabled">{{ item.disabled ? "已领取" : "领取" }}</Button> <Button class="coupon-btn" size="small" type="primary" @click="receiveShopCoupon(item)" :disabled="item.disabled">{{ item.disabled ? "已领取" : "领取" }}</Button>
</div> </div>

View File

@ -19,7 +19,7 @@
<div class="c-left"> <div class="c-left">
<div> <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 === '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> <span class="describe">{{item.consumeThreshold}}元可用</span>
</div> </div>
<p>使用范围{{useScope(item.scopeType, item.storeName)}}</p> <p>使用范围{{useScope(item.scopeType, item.storeName)}}</p>

View File

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

View File

@ -17,10 +17,14 @@ export default {
* @description api请求基础路径 * @description api请求基础路径
*/ */
api_dev: { api_dev: {
common: 'http://192.168.0.103:8890/', // common: 'http://192.168.0.103:8890/',
// buyer: 'https://buyer-api.pickmall.cn',
// seller: 'https://store-api.pickmall.cn',
// manager: 'http://192.168.0.103:8887'
common: 'https://common-api.pickmall.cn',
buyer: 'https://buyer-api.pickmall.cn', buyer: 'https://buyer-api.pickmall.cn',
seller: 'https://store-api.pickmall.cn', seller: 'https://store-api.pickmall.cn',
manager: 'http://192.168.0.103:8887' manager: 'https://admin-api.pickmall.cn'
}, },
api_prod: { api_prod: {
common: 'https://common-api.pickmall.cn', common: 'https://common-api.pickmall.cn',

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -8,26 +8,14 @@
活动名称将显示在对人拼团活动列表中方便商家管理使用最多输入25个字符 活动名称将显示在对人拼团活动列表中方便商家管理使用最多输入25个字符
</div> </div>
</FormItem> </FormItem>
<FormItem label="活动时间" prop="startTime"> <FormItem label="活动时间" prop="rangeTime">
<DatePicker <DatePicker
type="datetime" type="datetimerange"
v-model="form.startTime" v-model="form.rangeTime"
format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss"
:options="options"
placeholder="请选择" placeholder="请选择"
clearable
style="width: 200px"
>
</DatePicker>
-
<DatePicker
type="datetime"
v-model="form.endTime"
format="yyyy-MM-dd HH:mm:ss"
:options="options" :options="options"
placeholder="请选择" style="width: 260px"
clearable
style="width: 200px"
> >
</DatePicker> </DatePicker>
</FormItem> </FormItem>
@ -87,20 +75,6 @@
import { savePintuan, editPintuan, getPintuanDetail } from "@/api/promotion"; import { savePintuan, editPintuan, getPintuanDetail } from "@/api/promotion";
export default { export default {
data() { 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 { return {
id: this.$route.query.id, // id id: this.$route.query.id, // id
form: { form: {
@ -131,33 +105,10 @@ export default {
message: "限购数不合法", message: "限购数不合法",
}, },
], ],
startTime: [ rangeTime: [{ required: true, message: "请选择活动时间" }],
{
required: true,
type: "date",
message: "请选择开始时间",
},
{
trigger: "change",
message: "开始时间要小于结束时间",
validator: isLtEndDate,
},
],
endTime: [
{
required: true,
type: "date",
message: "请选择结束时间",
},
{
trigger: "change",
message: "结束时间要大于开始时间",
validator: isGtStartDate,
},
],
}, },
submitLoading: false, // submitLoading: false, //
options: { // options: { //
disabledDate(date) { disabledDate(date) {
return date && date.valueOf() < Date.now() - 86400000; return date && date.valueOf() < Date.now() - 86400000;
}, },
@ -185,11 +136,12 @@ export default {
this.submitLoading = true; this.submitLoading = true;
let params = JSON.parse(JSON.stringify(this.form)); let params = JSON.parse(JSON.stringify(this.form));
params.startTime = this.$options.filters.unixToDate( params.startTime = this.$options.filters.unixToDate(
this.form.startTime / 1000 this.form.rangeTime[0] / 1000
); );
params.endTime = this.$options.filters.unixToDate( params.endTime = this.$options.filters.unixToDate(
this.form.endTime / 1000 this.form.rangeTime[1] / 1000
); );
delete params.rangeTime
if (!this.id) { if (!this.id) {
// id // id
delete params.id; delete params.id;
@ -218,7 +170,10 @@ export default {
getDetail() { getDetail() {
getPintuanDetail(this.id).then((res) => { getPintuanDetail(this.id).then((res) => {
if (res.success) { 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"> <template slot-scope="{ row, index }" slot="price">
<Input v-model="row.price" :disabled="status==='view'" @input="goodsData[index].price = row.price" /> <Input v-model="row.price" :disabled="status==='view'" @input="goodsData[index].price = row.price" />
</template> </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"> <template slot-scope="{ index }" slot="action">
<Button type="error" size="small" ghost v-if="status === 'manager'" @click="delGoods(index)"></Button> <Button type="error" size="small" ghost v-if="status === 'manager'" @click="delGoods(index)"></Button>
</template> </template>
@ -107,11 +104,7 @@ export default {
return h("div", [ return h("div", [
h( h(
"Tag", "Tag",
{ {props: {color: color}},
props: {
color: color,
},
},
text text
), ),
]); ]);
@ -125,20 +118,17 @@ export default {
key: "goodsName", key: "goodsName",
minWidth: 120, minWidth: 120,
}, },
{ {
title: "库存", title: "库存",
key: "quantity", key: "quantity",
minWidth: 40, minWidth: 40,
}, },
{ {
title: "拼团价格", title: "拼团价格",
key: "price", key: "price",
slot: "price", slot: "price",
minWidth: 50, minWidth: 50,
}, },
{ {
title: "操作", title: "操作",
slot: "action", slot: "action",
@ -188,23 +178,23 @@ export default {
} }
}); });
}, },
init() { init() { //
this.getDataList(); this.getDataList();
this.getPintuanMsg(); this.getPintuanMsg();
}, },
changePage(v) { changePage(v) { //
this.searchForm.pageNumber = v - 1; this.searchForm.pageNumber = v - 1;
this.getDataList(); this.getDataList();
this.clearSelectAll(); this.clearSelectAll();
}, },
changePageSize(v) { changePageSize(v) { //
this.searchForm.pageSize = v; this.searchForm.pageSize = v;
this.getDataList(); this.getDataList();
}, },
handleSearch() { handleSearch() { //
this.searchForm.pageNumber = 0; this.searchForm.pageNumber = 0;
this.searchForm.pageSize = 10; this.searchForm.pageSize = 10;
this.getDataList(); this.getDataList();
@ -253,7 +243,7 @@ export default {
// //
this.goodsData.splice(index, 1); this.goodsData.splice(index, 1);
}, },
delAll() { delAll() { //
if (this.selectCount <= 0) { if (this.selectCount <= 0) {
this.$Message.warning("您还未选择要删除的数据"); this.$Message.warning("您还未选择要删除的数据");
return; return;
@ -272,7 +262,7 @@ export default {
}, },
}); });
}, },
selectedGoodsData(item) { selectedGoodsData(item) { //
let ids = []; let ids = [];
let list = []; let list = [];
this.goodsData.forEach((e) => { this.goodsData.forEach((e) => {
@ -295,7 +285,7 @@ export default {
}); });
this.goodsData.push(...list); this.goodsData.push(...list);
}, },
openSkuList() { openSkuList() { //
this.$refs.skuSelect.open("goods"); this.$refs.skuSelect.open("goods");
}, },
}, },

View File

@ -46,13 +46,13 @@
{{children.firstCompany}} {{children.firstCompany}}
</td> </td>
<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>
<td> <td>
{{children.continuedCompany}} {{children.continuedCompany}}
</td> </td>
<td class="bdr"> <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> </td>
</tr> </tr>
</tbody> </tbody>

View File

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

View File

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