合并master

This commit is contained in:
lemon橪
2021-07-22 09:10:42 +08:00
40 changed files with 1141 additions and 1221 deletions

View File

@@ -175,3 +175,7 @@ export const getFullDiscountById = (id) => {
export const delFullDiscount = (id) => {
return deleteRequest(`/promotion/fullDiscount/${id}`)
}
// 开启、关闭满减活动
export const updateFullDiscount = (id, promotionStatus) => {
return putRequest(`/promotion/fullDiscount/status/${id}/${promotionStatus}`)
}

View File

@@ -18,14 +18,14 @@ export default {
* @description api请求基础路径
*/
api_dev: {
// common: "https://common-api.pickmall.cn",
// buyer: "https://buyer-api.pickmall.cn",
// seller: "https://store-api.pickmall.cn",
// manager: "https://admin-api.pickmall.cn"
common: 'http://192.168.0.101:8890',
buyer: 'http://192.168.0.101:8888',
seller: 'http://192.168.0.101:8889',
manager: 'http://192.168.0.101: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"
// common: 'http://192.168.0.101:8890',
// buyer: 'http://192.168.0.101:8888',
// seller: 'http://192.168.0.101:8889',
// manager: 'http://192.168.0.101:8887'
},
api_prod: {
common: "https://common-api.pickmall.cn",

View File

@@ -233,6 +233,7 @@ util.openNewPage = function (vm, name, argu, query) {
if (query) {
tag.query = query;
}
console.log(tag);
vm.$store.commit('increateTag', tag);
}
}

View File

@@ -14,7 +14,7 @@ const app = {
navList: [], // 顶部菜单
currNav: "", // 当前顶部菜单name
currNavTitle: "", // 当前顶部菜单标题
cachePage: [],
cachePage: [], // 缓存的页面
lang: '',
isFullScreen: false,
openedSubmenuArr: [], // 要展开的菜单数组
@@ -93,6 +93,7 @@ const app = {
state.cachePage.splice(index, 1);
}
});
localStorage.cachePage = JSON.stringify(state.cachePage);
},
initCachepage(state) {
if (localStorage.cachePage) {
@@ -120,6 +121,7 @@ const app = {
clearAllTags(state) {
state.storeOpenedList.splice(1);
state.cachePage.length = 0;
localStorage.cachePage = '';
localStorage.storeOpenedList = JSON.stringify(state.storeOpenedList);
},
clearOtherTags(state, vm) {
@@ -140,6 +142,7 @@ const app = {
return item == currentName;
});
state.cachePage = newCachepage;
localStorage.cachePage = JSON.stringify(state.cachePage);
localStorage.storeOpenedList = JSON.stringify(state.storeOpenedList);
},
setOpenedList(state) {
@@ -165,6 +168,7 @@ const app = {
setMessageCount(state, count) {
state.messageCount = count;
},
// 新增页签
increateTag(state, tagObj) {
if (!Util.oneOf(tagObj.name, state.dontCache)) {
state.cachePage.push(tagObj.name);

View File

@@ -11,15 +11,15 @@
:readonly="readonly"
:maxlength="maxlength"
>
<Button slot="append" icon="md-eye"></Button>
<Poptip slot="append" transfer trigger="hover" title="图片预览" placement="right">
<Icon type="md-eye" class="see-icon" />
<div slot="content">
<img :src="currentValue" alt="该资源不存在" style="width: 100%;margin: 0 auto;display: block;" />
<a @click="viewImage=true" style="margin-top:5px;text-align:right;display:block">查看大图</a>
</div>
</Poptip>
</Input>
<Poptip transfer trigger="hover" title="图片预览" placement="right" width="350">
<Icon type="md-eye" class="see-icon" />
<div slot="content">
<img :src="currentValue" alt="该资源不存在" style="width: 100%;margin: 0 auto;display: block;" />
<a @click="viewImage=true" style="margin-top:5px;text-align:right;display:block">查看大图</a>
</div>
</Poptip>
<Upload
:action="uploadFileUrl"
:headers="accessToken"
@@ -35,7 +35,7 @@
ref="up"
class="upload"
>
<Button :loading="loading" :size="size" :disabled="disabled" :icon="icon">上传图片</Button>
<Button :loading="loading" :size="size" :disabled="disabled">上传图片</Button>
</Upload>
</div>
@@ -166,9 +166,6 @@ export default {
<style lang="scss" scoped>
.see-icon {
font-size: 16px;
margin-left: -32px;
margin-top: 3px;
padding: 7px;
cursor: pointer;
}

View File

@@ -1,7 +1,7 @@
<template>
<div class="search">
<Card style="height: 60px">
<div style="">
<div>
<Button
v-if="allowOperation.editPrice"
@click="modifyPrice"
@@ -30,127 +30,124 @@
</div>
</Card>
<Card style="height: 400px" class="mt_10">
<div style="width: 30%; float: left; margin-left: 20px">
<div class="div-item">
<div class="div-item-left">订单号</div>
<div class="div-item-right">{{ orderInfo.order.sn }}</div>
</div>
<div class="div-item">
<div class="div-item-left">订单来源</div>
<div class="div-item-right">
{{ orderInfo.order.clientType | clientTypeWay }}
</div>
</div>
</div>
<div class="div-item">
<div class="div-item-left">订单状态</div>
<div class="div-item-right">
{{ orderInfo.orderStatusValue }}
</div>
</div>
<div class="div-item">
<div class="div-item-left">下单时间</div>
<div class="div-item-right">
{{ orderInfo.order.createTime }}
</div>
</div>
<div style="width: 30%; float: left; margin-left: 20px">
<div class="div-item" v-if="orderInfo.order.needReceipt == false">
<div class="div-item-left">发票信息</div>
<div class="div-item-right">暂无发票信息</div>
</div>
<template v-if="orderInfo.order.needReceipt == true && orderInfo.receipt">
<Card class="mt_10">
<Row>
<Col span="12">
<div class="div-item">
<div class="div-item-left">发票抬头</div>
<div class="div-item-left">订单号</div>
<div class="div-item-right">{{ orderInfo.order.sn }}</div>
</div>
<div class="div-item">
<div class="div-item-left">订单来源</div>
<div class="div-item-right">
{{ orderInfo.order.clientType | clientTypeWay }}
</div>
</div>
<div class="div-item">
<div class="div-item-left">订单状态</div>
<div class="div-item-right">
{{ orderInfo.orderStatusValue }}
</div>
</div>
<div class="div-item">
<div class="div-item-left">下单时间</div>
<div class="div-item-right">
{{ orderInfo.order.createTime }}
</div>
</div>
<div class="div-item" v-if="orderInfo.order.needReceipt == false">
<div class="div-item-left">发票信息</div>
<div class="div-item-right">暂无发票信息</div>
</div>
<template v-if="orderInfo.order.needReceipt == true && orderInfo.receipt">
<div class="div-item">
<div class="div-item-left">发票抬头</div>
<div class="div-item-right">
{{
orderInfo.receipt.receiptTitle
? orderInfo.receipt.receiptTitle
: "暂无"
}}
</div>
</div>
<div class="div-item" v-if="orderInfo.receipt.taxpayerId">
<div class="div-item-left">发票税号</div>
<div class="div-item-right">
{{
orderInfo.receipt.taxpayerId
? orderInfo.receipt.taxpayerId
: "暂无"
}}
</div>
</div>
<div class="div-item">
<div class="div-item-left">发票内容</div>
<div class="div-item-right">
{{
orderInfo.receipt.receiptContent
? orderInfo.receipt.receiptContent
: "暂无"
}}
</div>
</div>
<div class="div-item">
<div class="div-item-left">发票金额</div>
<div class="div-item-right">
<span v-if="orderInfo.receipt.receiptPrice"></span
>{{
orderInfo.receipt.receiptPrice
? orderInfo.receipt.receiptPrice
: "暂无" | unitPrice
}}
</div>
</div>
<div class="div-item">
<div class="div-item-left">是否开票</div>
<div class="div-item-right">
{{ orderInfo.receipt.receiptStatus == 0 ? "未开" : "已开" }}
</div>
</div>
</template>
</Col>
<Col span="12">
<div class="div-item">
<div class="div-item-left">收货信息</div>
<div class="div-item-right">
{{ orderInfo.order.consigneeName }}
{{ orderInfo.order.consigneeMobile }}
{{ orderInfo.order.consigneeAddressPath }}
{{ orderInfo.order.consigneeDetail }}
</div>
</div>
<div class="div-item">
<div class="div-item-left">支付方式</div>
<div class="div-item-right">
{{ orderInfo.paymentMethodValue }}
</div>
</div>
<div class="div-item">
<div class="div-item-left">买家留言</div>
<div class="div-item-right">{{ orderInfo.order.remark }}</div>
</div>
<div class="div-item" v-if="orderInfo.order.orderType != 'VIRTUAL'">
<div class="div-item-left">配送方式</div>
<div class="div-item-right">
{{
orderInfo.receipt.receiptTitle
? orderInfo.receipt.receiptTitle
: "暂无"
orderInfo.deliveryMethodValue
? orderInfo.deliveryMethodValue
: "暂无配送方式"
}}
</div>
</div>
<div class="div-item" v-if="orderInfo.receipt.taxpayerId">
<div class="div-item-left">发票税号</div>
<div class="div-item-right">
{{
orderInfo.receipt.taxpayerId
? orderInfo.receipt.taxpayerId
: "暂无"
}}
</div>
</div>
<div class="div-item">
<div class="div-item-left">发票内容</div>
<div class="div-item-right">
{{
orderInfo.receipt.receiptContent
? orderInfo.receipt.receiptContent
: "暂无"
}}
</div>
</div>
<div class="div-item">
<div class="div-item-left">发票金额</div>
<div class="div-item-right">
<span v-if="orderInfo.receipt.receiptPrice"></span
>{{
orderInfo.receipt.receiptPrice
? orderInfo.receipt.receiptPrice
: "暂无" | unitPrice
}}
</div>
</div>
<div class="div-item">
<div class="div-item-left">是否开票</div>
<div class="div-item-right">
{{ orderInfo.receipt.receiptStatus == 0 ? "未开" : "已开" }}
</div>
</div>
</template>
</div>
<div style="width: 36%; float: left">
<div class="div-item">
<div class="div-item-left">收货信息</div>
<div class="div-item-right">
{{ orderInfo.order.consigneeName }}
{{ orderInfo.order.consigneeMobile }}
{{ orderInfo.order.consigneeAddressPath }}
{{ orderInfo.order.consigneeDetail }}
</div>
</div>
<div class="div-item">
<div class="div-item-left">支付方式</div>
<div class="div-item-right">
{{ orderInfo.paymentMethodValue }}
</div>
</div>
<div class="div-item">
<div class="div-item-left">买家留言</div>
<div class="div-item-right">{{ orderInfo.order.remark }}</div>
</div>
<div class="div-item" v-if="orderInfo.order.orderType != 'VIRTUAL'">
<div class="div-item-left">配送方式</div>
<div class="div-item-right">
{{
orderInfo.deliveryMethodValue
? orderInfo.deliveryMethodValue
: "暂无配送方式"
}}
</div>
</div>
</div>
</Col>
</Row>
</Card>
<Card class="mt_10">

View File

@@ -53,7 +53,6 @@
<script>
import * as API_Order from "@/api/order";
import { verificationCode } from "@/api/order";
import JsonExcel from "vue-json-excel";
import Cookies from "js-cookie";
export default {
@@ -186,6 +185,12 @@ export default {
'收货人': 'consigneeName',
'收货人联系电话': 'consigneeMobile',
'收货地址': 'consigneeAddress',
'商品名称': 'goodsName',
'商品价格': 'goodsPrice',
'订单金额': 'flowPrice',
'商品数量': 'num',
'店铺名称': 'storeName',
'创建时间': 'createTime'
}
};
},
@@ -275,6 +280,8 @@ export default {
res.result[i].index = i+1;
res.result[i].consigneeAddress =
res.result[i].consigneeAddressPath.replace(/,/g, "") + res.result[i].consigneeDetail
res.result[i].goodsPrice = this.$options.filters.unitPrice(res.result[i].goodsPrice,'')
res.result[i].flowPrice = this.$options.filters.unitPrice(res.result[i].flowPrice,'')
}
return res.result
} else {

View File

@@ -27,12 +27,12 @@
</Row>
<Table class="mt_10" :loading="loading" border :columns="columns" :data="data" ref="table" @on-selection-change="changeSelect">
<template slot-scope="{ row }" slot="action">
<Button v-if="row.promotionStatus === 'NEW' || row.promotionStatus === 'CLOSE'" type="info" size="small" style="margin-right: 10px" @click="edit(row)">编辑</Button>
<Button v-if="row.promotionStatus === 'NEW' || row.promotionStatus === 'CLOSE'" type="info" size="small" style="margin-right: 5px" @click="edit(row)">编辑</Button>
<Button v-if="row.promotionStatus !== 'CLOSE'" type="error" size="small" @click="remove(row)">下架</Button>
</template>
</Table>
<Row type="flex" justify="end" class="page">
<Page :current="searchForm.pageNumber + 1" :total="total" :page-size="searchForm.pageSize" @on-change="changePage" @on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]"
<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>
@@ -49,7 +49,7 @@ export default {
loading: true, // 表单加载状态
searchForm: {
// 搜索框初始化对象
pageNumber: 0, // 当前页数
pageNumber: 1, // 当前页数
pageSize: 10, // 页面大小
sort: "startTime", // 默认排序字段
order: "desc", // 默认排序方式
@@ -135,7 +135,7 @@ export default {
title: "活动时间",
render: (h, params) => {
if (params.row.getType === "ACTIVITY") {
if (params.row.rangeDayType !== "FIXEDTIME") {
return h("div", "长期有效");
} else {
return h("div", {
@@ -208,7 +208,7 @@ export default {
this.$router.push({ name: "platform-coupon-info", query: { id: v.id } });
},
changePage(v) {
this.searchForm.pageNumber = v - 1;
this.searchForm.pageNumber = v;
this.getDataList();
this.clearSelectAll();
},
@@ -217,13 +217,13 @@ export default {
this.getDataList();
},
handleSearch() {
this.searchForm.pageNumber = 0;
this.searchForm.pageNumber = 1;
this.getDataList();
},
handleReset() {
this.searchForm = {};
this.selectDate = "";
this.searchForm.pageNumber = 0;
this.searchForm.pageNumber = 1;
this.getDataList();
},
clearSelectAll() {

View File

@@ -351,7 +351,6 @@ export default {
} else {
// 编辑
delete params.consumeLimit;
delete params.couponDiscount;
delete params.updateTime;
editShopCoupon(params).then((res) => {

View File

@@ -1,5 +1,5 @@
<template>
<div class="full-cut">
<div class="search">
<Card>
<Form
ref="searchForm"
@@ -73,25 +73,38 @@
v-if="row.promotionStatus == 'NEW'"
size="small"
@click="edit(row)"
>编辑</Button
>&nbsp;
<Button type="success" v-else size="small" @click="edit(row)"
>查看</Button
>&nbsp;
>编辑</Button>
<Button type="info" v-else size="small" @click="edit(row)">查看</Button>
<Button
type="success"
v-if="row.promotionStatus === 'START'"
ghost
style="margin-left:5px"
size="small"
@click="openOrClose(row)"
>关闭</Button>
<Button
type="success"
v-if="row.promotionStatus === 'CLOSE' || row.promotionStatus === 'NEW'"
ghost
style="margin-left:5px"
size="small"
@click="openOrClose(row)"
>开启</Button>
<Button
type="error"
:disabled="row.promotionStatus == 'START'"
ghost
style="margin-left:5px"
size="small"
@click="del(row)"
>删除</Button
>
>删除</Button>
</div>
</template>
</Table>
<Row type="flex" justify="end" class="page operation">
<Page
:current="searchForm.pageNumber + 1"
:current="searchForm.pageNumber"
:total="total"
:page-size="searchForm.pageSize"
@on-change="changePage"
@@ -107,14 +120,14 @@
</div>
</template>
<script>
import { getFullDiscountList, delFullDiscount } from "@/api/promotion.js";
import { getFullDiscountList, delFullDiscount, updateFullDiscount } from "@/api/promotion.js";
export default {
name: 'full-cut',
data() {
return {
loading: false, // 表单加载状态
searchForm: { // 列表请求参数
pageNumber: 0,
pageNumber: 1,
pageSize: 10,
sort: "startTime",
order: "desc",
@@ -194,7 +207,7 @@ export default {
},
// 改变页数
changePage(v) {
this.searchForm.pageNumber = v - 1;
this.searchForm.pageNumber = v;
this.getDataList();
},
// 改变页码
@@ -204,7 +217,7 @@ export default {
},
// 搜索
handleSearch() {
this.searchForm.pageNumber = 0;
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.getDataList();
},
@@ -212,7 +225,7 @@ export default {
handleReset() {
this.selectDate = ''
this.searchForm = {}
this.searchForm.pageNumber = 0;
this.searchForm.pageNumber = 1;
this.searchForm.pageSize = 10;
this.getDataList();
},
@@ -239,6 +252,31 @@ export default {
},
});
},
// 开启或关闭活动
openOrClose (row) {
let name = '开启'
let status = 'START'
if (row.promotionStatus === 'START') {
name = '关闭'
status = 'CLOSE'
}
this.$Modal.confirm({
title: "提示",
// 记得确认修改此处
content: `确认${name}此活动吗?需要一定时间才能生效,请耐心等待`,
loading: true,
onOk: () => {
// 删除
updateFullDiscount(row.id, status).then((res) => {
this.$Modal.remove();
if (res.success) {
this.$Message.success(`${name}成功`);
this.getDataList();
}
});
},
});
},
// 获取列表数据
getDataList() {
this.loading = true;

View File

@@ -100,17 +100,17 @@
:disabled="form.promotionStatus != 'NEW'"
v-model="form.isFreeFreight"
>免邮费</Checkbox
>&nbsp;
>
<Checkbox
:disabled="form.promotionStatus != 'NEW'"
v-model="form.isCoupon"
>送优惠券</Checkbox
>&nbsp;
>
<Checkbox
:disabled="form.promotionStatus != 'NEW'"
v-model="form.isGift"
>送赠品</Checkbox
>&nbsp;
>
<Checkbox
:disabled="form.promotionStatus != 'NEW'"
v-if="JSON.parse(getStore('userInfo')).selfOperated"
@@ -389,6 +389,7 @@ export default {
getDetail() {
// 获取活动详情
getFullDiscountById(this.id).then((res) => {
console.log(res);
let data = res.result;
if (data.number == -1) {
data.promotionGoodsList = [];
@@ -400,7 +401,7 @@ export default {
data.discountType = "isFullMinus";
delete data.isFullMinus;
} else {
data.discountType = "isFullMinus";
data.discountType = "isFullRate";
delete data.isFullRate;
}
data.rangeTime = [];