Commit ad03eeb0 authored by liwenhong's avatar liwenhong

update:线上回归

parents 640835e0 a0b79a7b
......@@ -10,10 +10,10 @@ const PANDORA_URI = {
};
const API_INTERNAL_URI = {
'development': "http://bp-dev.ini.yidian-inc.com",
'test': "http://bp-test.ini.yidian-inc.com",
'production': "http://bp.int.yidian-inc.com"
}
development: "http://bp-dev.ini.yidian-inc.com",
test: "http://bp-test.ini.yidian-inc.com",
production: "http://bp.int.yidian-inc.com"
};
module.exports = {
env: env,
......
......@@ -41,6 +41,26 @@ exports.getSaveDeliverer = async ctx => {
};
ctx.body = await req(ctx, opts);
};
// 下载配送路线 -lh
exports.getDeliveryRoutes = async ctx => {
const opts = {
url: `${GROUPMEAL_URI}/order/deliverer/build_plan`,
method: "POST",
json: true,
body: ctx.request.body
};
ctx.body = await req(ctx, opts);
};
// 查看下载配送路线记录 -lh
exports.getEmailRecords = async ctx => {
const opts = {
url: `${GROUPMEAL_URI}/order/deliverer/plan_down_log`,
method: "POST",
json: true,
body: ctx.request.body
};
ctx.body = await req(ctx, opts);
};
// 老订单管理
......
......@@ -103,6 +103,8 @@ router.get(`${API_VERSION}/order/oldbackground/order_print`, groupmeal.orderPrin
router.get(`${API_VERSION}/order/oldbackground/order_item_list`, groupmeal.orderItemList);
router.get(`${API_VERSION}/order/oldbackground/order_refund_reject`, groupmeal.orderRefundReject);
router.post(`${API_VERSION}/order/oldbackground/order_refund`, groupmeal.orderRefund);
router.post(`${API_VERSION}/order/deliverer/build_plan`, groupmeal.getDeliveryRoutes); //下载配送路线 -lh
router.post(`${API_VERSION}/order/deliverer/plan_down_log`, groupmeal.getEmailRecords); // 查看邮件记录 -lh
// 新订单管理
router.get(`${API_VERSION}/order/background/order_list`, groupmeal.newGetOrderList);
......
<template>
<div class="YDDialog">
<el-dialog
:title="dialogTitle"
v-model="dialogVisible"
:width="dialogWidth"
:show-close="showDialogClose"
:top="dialogMarginTop"
:modal="dialogModel"
:close-on-click-modal="dialogCloseOnClickModal"
:close-on-press-escape="dialogCloseOnPressEscape"
:center="dialogCenter"
>
<slot></slot>
<template #footer>
<span class="dialog-footer">
<el-button v-show="isShowCancelButton" @click="cancel">{{
cancelButtonText
}}</el-button>
<el-button
v-show="isShowConfirmButton"
type="primary"
@click="cofirm"
>{{ confirmButtonText }}</el-button
>
</span>
</template>
</el-dialog>
</div>
</template>
<script>
export default {
props: {
// 标题
dialogTitle: {
type: String,
default: "标题"
},
// dialog 显示控制
myDialogVisible: {
type: Boolean,
default: false
},
// 确认button文案
confirmButtonText: {
type: String,
default: "确 定"
},
// 取消button文案
cancelButtonText: {
type: String,
default: "取 消"
},
// 宽度
dialogWidth: {
type: String,
default: "50%"
},
// 距离顶部的margin
dialogMarginTop: {
type: String,
default: "15vh"
},
// 是否需要遮罩层
dialogModel: {
type: Boolean,
default: true
},
// 点击遮罩层是否关闭dialog
dialogCloseOnClickModal: {
type: Boolean,
default: false
},
// 是否显示关闭(右上角X)
showDialogClose: {
type: Boolean,
default: false
},
// 是否展示确定按钮
isShowConfirmButton: {
type: Boolean,
default: true
},
// 是否展示取消按钮
isShowCancelButton: {
type: Boolean,
default: true
},
// 点击esc是否关闭
dialogCloseOnPressEscape: {
type: Boolean,
default: false
},
// 底部按钮是否居中显示
dialogCenter: {
type: Boolean,
default: false
},
// cancelDialog 方法名称
cancelDialogMethodName: {
type: String,
default: "dialogCancel"
},
// confirmDialog 方法名称
confirmDialogMethodName: {
type: String,
default: "dialogConfirm"
}
},
data() {
return {
dialogVisible: this.myDialogVisible
};
},
watch: {
myDialogVisible(newVal) {
this.dialogVisible = newVal;
}
},
methods: {
cancel() {
this.$emit(this.cancelDialogMethodName);
},
cofirm() {
this.$emit(this.confirmDialogMethodName);
}
}
};
</script>
<style lang="less" scoped></style>
......@@ -42,6 +42,12 @@
<el-card class="activityGoods box-card">
<div class="my-header">
<h3>{{ marketingInfo.marketing_name }}</h3>
<!-- 查看参与字段待确认 -->
<p>
<span>{{ detailInfo.lookUserCount }}人查看</span><span
>{{ detailInfo.haveBuyGoodsUserCount }}人参与</span
>
</p>
<p class="endTime">{{ showTimer }}</p>
</div>
<p class="title">拼单商品</p>
......@@ -94,6 +100,9 @@
<span class="originPrice">{{
`¥${goodsItem.original_price} `
}}</span>
<span class="sold" v-if="goodsItem.inventory_rest==0">抢光了</span>
<span class="sold" v-else>已售{{ goodsItem.all_have_buy_goods_count }}</span
>
</p>
</div>
</div>
......@@ -126,7 +135,7 @@ export default {
marketingInfo: {},
endTime: "",
showTimer: "",
detailInfo: {}
detailInfo: {},
};
},
watch: {},
......@@ -138,13 +147,12 @@ export default {
let dataArr = await Promise.all([
ActivityService.checkActivityDetail({
marketing_id: this.$route.query.marketing_id,
marketing_type: this.$route.query.marketing_type
marketing_type: this.$route.query.marketing_type,
}),
ActivityService.checkActivityDetailInfo({
marketing_id: this.$route.query.marketing_id
})
marketing_id: this.$route.query.marketing_id,
}),
]);
this.pageLoading = false;
this.goodsList = dataArr[0].result.goods_list;
this.marketingInfo = dataArr[0].result.marketing_info;
......@@ -195,7 +203,7 @@ export default {
closePage() {
this.$router.go(-1);
}
},
},
async created() {
await this.checkActivityDetail();
......@@ -203,7 +211,7 @@ export default {
},
beforeUnmount() {
clearInterval(this.timer);
}
},
};
</script>
<style lang="less" scoped>
......@@ -278,7 +286,9 @@ export default {
display: flex;
margin: 15px 0;
.itemIntroduce {
position: relative;
display: flex;
width: 100%;
flex-direction: column;
justify-content: space-around;
margin-left: 10px;
......@@ -295,6 +305,12 @@ export default {
}
}
}
.sold {
position:absolute;
right: 20px;;
color:#d44549;
font-weight: 500;
}
}
}
}
......
......@@ -31,8 +31,10 @@
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" @click="getActivityList">搜索</el-button>
</el-form-item>
<el-form-item>
<el-form-item style="margin-left: 50px">
<el-button @click="reset()">重置</el-button>
<!-- <el-button type="primary" @click="getActivityList">搜索</el-button> -->
</el-form-item>
<el-button type="primary" size="small" @click="goReleaseProduc"
>发布拼单</el-button
>
......@@ -189,6 +191,13 @@ export default {
};
},
methods: {
// 重置
reset() {
this.activity.activityName = "";
this.activity.online_status = "";
this.getActivityList();
},
/* API */
// 获取商品列表
async getActivityList() {
......
<template>
<div class="infoEditing">
<el-form ref="infoEditForm" :model="infoEditForm" label-width="80px">
<el-form
ref="infoEditForm"
:model="infoEditForm"
label-width="80px"
@submit.prevent
>
<el-form-item label="标题:">
<el-input v-model="infoEditForm.title" maxlength="30"></el-input>
</el-form-item>
......
......@@ -2,7 +2,7 @@
<div id="map" class="mapContainer">
<div class="mapWrapper">
<div class="search">
<el-form ref="form" label-width="80px">
<el-form ref="form" label-width="80px" @submit.prevent>
<el-form-item label-position="left">
<el-button @click="handleSearch">搜索</el-button>
<el-input
......@@ -193,15 +193,15 @@ export default {
</script>
<style lang="less" scoped>
.mapDialog {
margin-top: 11vh !important;
display: flex !important;
flex-direction: column !important;
background: red !important;
/deep/ .el-dialog__body {
height: 90%;
}
}
// .mapDialog {
// margin-top: 11vh !important;
// display: flex !important;
// flex-direction: column !important;
// background: red !important;
// /deep/ .el-dialog__body {
// height: 90%;
// }
// }
.mapContainer {
height: 100%;
width: 100%;
......
<template>
<div class="releaseProduc">
<h4 class="headTitle">发布活动</h4>
<el-steps
class="steps"
:active="active"
finish-status="success"
space="30%"
:align-center="true"
>
<el-step title="信息编辑"></el-step>
<el-step title="添加商品"></el-step>
<el-step title="拼单设置"></el-step>
</el-steps>
<div class="content">
<infoEditing
ref="infoEdit"
v-show="active === 1"
:infoEditArr="infoEditArr"
/>
<addProduc
ref="addProduc"
v-show="active === 2"
:addProduc="addProducArr"
:editInfo="infoEditArr"
:stepTwoTitle="stepTwoTitle"
/>
<spellOrderSet
ref="spellOrderSet"
v-show="active === 3"
:spellOrderSetArr="spellOrderSetArr"
:startTime="startTime"
:endTime="endTime"
@getTakeTakePlaceListFromChild="getTakeTakePlaceListFromChild"
/>
<div class="releaseProducBox">
<div class="releaseProduc">
<h4 class="headTitle">发布活动</h4>
<el-steps
class="steps"
:active="active"
finish-status="success"
space="30%"
:align-center="true"
>
<el-step title="信息编辑" @click="step1"></el-step>
<el-step title="添加商品" @click="step2"></el-step>
<el-step title="拼单设置" @click="step3"></el-step>
</el-steps>
<div class="content">
<infoEditing
ref="infoEdit"
v-show="active === 1"
:infoEditArr="infoEditArr"
/>
<addProduc
ref="addProduc"
v-show="active === 2"
:addProduc="addProducArr"
:editInfo="infoEditArr"
:stepTwoTitle="stepTwoTitle"
/>
<spellOrderSet
ref="spellOrderSet"
v-show="active === 3"
:spellOrderSetArr="spellOrderSetArr"
:startTime="startTime"
:endTime="endTime"
@getTakeTakePlaceListFromChild="getTakeTakePlaceListFromChild"
/>
</div>
</div>
<div class="stepsBtn">
<el-button @click="prev" v-show="active >= 2" style="margin-right: 20px"
......@@ -85,6 +87,35 @@ export default {
},
methods: {
// 步骤条点击事件
step1() {
if (this.$route.query.marketing_id != undefined) {
this.active = 1;
}
},
step2() {
if (this.$route.query.marketing_id != undefined) {
if (this.$refs.infoEdit.infoEditForm.title == "") {
ElMessage.error("请填写商品标题");
return;
}
this.active = 2;
}
},
step3() {
if (this.$route.query.marketing_id != undefined) {
if (this.$refs.infoEdit.infoEditForm.title == "") {
ElMessage.error("请填写商品标题");
return;
} else if (this.$refs.addProduc.comTableData.length == 0) {
ElMessage.error("请至少选择一个商品");
return;
} else {
this.active = 3;
}
}
},
// 上一步
prev() {
this.active--;
......@@ -199,20 +230,37 @@ export default {
};
</script>
<style scope>
<style lang="less" scope>
.releaseProduc {
height: 100%;
padding: 30px;
box-sizing: border-box;
display: flex;
flex-direction: column;
}
@media screen and (max-width: 800px) {
// form表单
.releaseProduc {
padding: 0;
}
}
.headTitle {
height: 30px;
width: 75%;
font-size: 18px;
margin: 0 auto 40px auto;
}
.steps {
height: 60px;
}
/* 内容cotent */
.content {
flex-grow: 1;
}
.steps {
display: flex;
justify-content: center;
margin-bottom: 50px;
margin-bottom: 35px;
}
.steps /deep/ .el-step__icon {
width: 50px;
......@@ -221,11 +269,14 @@ export default {
.steps /deep/ .el-step.is-horizontal .el-step__line {
top: 25px;
}
.stepsBtn {
display: flex;
margin: 20px auto;
justify-content: center;
width: 100%;
height: 80px;
line-height: 80px;
background: white;
/* position: fixed;
bottom: 0px; */
text-align: center;
z-index: 999;
}
</style>
This diff is collapsed.
<template>
<div class="block">
<el-pagination
class="pagination"
layout="prev, pager, next, jumper, ->,page , total"
v-bind="$attrs"
v-on="$listener"
>
</el-pagination>
</div>
</template>
<script>
<script>
export default {
name: 'Pagination'
name: "Pagination"
};
</script>
<style lang="less">
<style lang="less">
.block {
margin-top: 50px;
}
......
<template>
<layout>
<div class="life-no">
<el-form
:inline="true"
:model="formInline"
class="demo-form-inline"
>
<el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item label="生活号名称">
<el-input
class="search_life"
......@@ -17,81 +12,47 @@
></el-input>
</el-form-item>
<el-form-item label="类型">
<el-select
v-model="life_account.type"
placeholder="类型"
>
<el-option
value="0"
label="全部"
></el-option>
<el-option
value="1"
label="个人"
></el-option>
<el-option
value="2"
label="企业"
></el-option>
<el-select v-model="life_account.type" placeholder="类型">
<el-option value="0" label="全部"></el-option>
<el-option value="1" label="个人"></el-option>
<el-option value="2" label="企业"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type="primary"
@click="onSearchSubmit"
>查询</el-button>
<el-button type="primary" @click="onSearchSubmit">查询</el-button>
<el-button @click="onReset">重置</el-button>
</el-form-item>
</el-form>
<el-table
:data="LifeNoList"
border
style="width: 100%"
>
<el-table-column
prop="life_account_id"
label="ID"
> </el-table-column>
<el-table-column
prop="life_account_name"
label="生活号名称"
>
<el-table :data="LifeNoList" border style="width: 100%">
<el-table-column prop="life_account_id" label="ID"> </el-table-column>
<el-table-column prop="life_account_name" label="生活号名称">
</el-table-column>
<el-table-column
:formatter="hasTypeFormat"
label="类型"
>
<el-table-column :formatter="hasTypeFormat" label="类型">
</el-table-column>
<el-table-column
:formatter="hasStatusFormat"
label="状态"
>
<el-table-column :formatter="hasStatusFormat" label="状态">
</el-table-column>
<el-table-column
prop="create_time"
label="创建时间"
> </el-table-column>
<el-table-column prop="create_time" label="创建时间"> </el-table-column>
<el-table-column label="操作">
<template #default="scope">
<el-button
size="mini"
type="primary"
@click.stop="toLifeDetail(scope.row)"
>查看详情</el-button>
>查看详情</el-button
>
</template>
</el-table-column>
</el-table>
<page
:totalNum="totalNum"
@update="update"
/>
<page :totalNum="totalNum" @update="update" />
</div>
</layout>
</template>
<script>
import Layout from '@/layouts'
import page from "../components/Pagination"
import Layout from "@/layouts";
// import page from "../components/Pagination";
import page from "../components/Pagination.vue";
import { getLifeNoList as reqGetLifeNoList } from "../../service/life-no";
export default {
name: "LifeNo",
......@@ -99,7 +60,7 @@ export default {
Layout,
page
},
data () {
data() {
return {
params: {
page: 1,
......@@ -107,25 +68,25 @@ export default {
},
life_account: {
name: "",
type: "",
type: ""
},
totalNum: null,
lifeList: [],
LifeNoList: [],
formInline: {
user: '',
region: ''
user: "",
region: ""
}
}
};
},
created () {
this.getLifeNoListFn()
created() {
this.getLifeNoListFn();
},
methods: {
hasTypeFormat (row) {
return row.life_account_type == 1 ? '个人' : '企业'
hasTypeFormat(row) {
return row.life_account_type == 1 ? "个人" : "企业";
},
hasStatusFormat (row) {
hasStatusFormat(row) {
if (row.life_account_status == 1) {
return "正常";
} else if (row.life_account_status == 3) {
......@@ -135,39 +96,41 @@ export default {
}
},
//获取列表数据
getLifeNoListFn () {
let { name, type } = this.life_account
let { page, page_size } = this.params
getLifeNoListFn() {
let { name, type } = this.life_account;
let { page, page_size } = this.params;
let params = {
page,
page_size,
life_account_name: name,
life_account_type: type
}
};
reqGetLifeNoList(params).then(res => {
this.totalNum = res.count
this.LifeNoList = res.data
})
this.totalNum = res.count;
this.LifeNoList = res.data;
});
},
//查询
onSearchSubmit () {
this.getLifeNoListFn()
onSearchSubmit() {
this.getLifeNoListFn();
},
//重置
onReset () {
this.life_account.name = "",
this.life_account.type = ""
this.getLifeNoListFn()
onReset() {
(this.life_account.name = ""), (this.life_account.type = "");
this.getLifeNoListFn();
},
update (obj) {
Object.assign(this.params, obj)
this.getLifeNoListFn(this.params)
},
toLifeDetail (row) {
this.$router.push({ name: 'LifeNoDetail', query: { lifeId: row.life_account_id } });
update(obj) {
Object.assign(this.params, obj);
this.getLifeNoListFn(this.params);
},
toLifeDetail(row) {
this.$router.push({
name: "LifeNoDetail",
query: { lifeId: row.life_account_id }
});
}
}
}
};
</script>
<style lang="less" scoped>
.life-no {
......
......@@ -14,27 +14,27 @@
</template>
<script>
export default {
props: ['totalNum'],
data () {
props: ["totalNum"],
data() {
return {
currentPage: 1,
page_size: 20
}
};
},
methods: {
handleSizeChange (size) {
handleSizeChange(size) {
console.log(`每页 ${size} 条`);
this.$emit('update', { page_size: size })
this.$emit("update", { page_size: size });
},
handleCurrentChange (pageIndex) {
handleCurrentChange(pageIndex) {
console.log(`当前页: ${pageIndex}`);
this.$emit('update', { page: pageIndex })
this.$emit("update", { page: pageIndex });
}
},
}
}
};
</script>
<style lang="less">
.block {
margin-top: 50px;
}
</style>
\ No newline at end of file
</style>
import axios from "@/utils/request";
import { handlerSuccessResponse } from "@/utils/handlerResponse";
// 获取主页配送员列表
export async function getList (params) {
const res = await axios.post("/api/v1/order/deliverer/list_day_deliverer_conf",params);
return res;
}
export async function getList(params) {
const res = await axios.post(
"/api/v1/order/deliverer/list_day_deliverer_conf",
params
);
return res;
}
// 获取分配配送员列表
export async function getDelivererList(params) {
const res = await axios.post(
......@@ -26,6 +30,17 @@ export async function getSaveDeliverer(params) {
);
return res;
}
// 下载配送路线 -lh
export async function getDeliveryRoutes(params) {
const res = await axios.post("/api/v1/order/deliverer/build_plan", params);
return handlerSuccessResponse(res);
}
// 查看邮件记录 -lh
export async function getEmailRecords(params) {
const res = await axios.post("/api/v1/order/deliverer/plan_down_log", params);
//return Promise.reject(res);
return handlerSuccessResponse(res);
}
// 老订单管理
......@@ -53,7 +68,7 @@ export async function getGoodsList(params) {
// 获取自提点
export async function getSubShopList(params) {
const res = await axios.get("/api/v1/order/oldbackground/sub_shop_list",{
const res = await axios.get("/api/v1/order/oldbackground/sub_shop_list", {
params
});
return res;
......@@ -98,9 +113,12 @@ export async function refundOrder(orderId, itemsToRefund) {
// 订单驳回
export async function orderRefundReject(params) {
const res = await axios.get("/api/v1/order/oldbackground/order_refund_reject", {
params
});
const res = await axios.get(
"/api/v1/order/oldbackground/order_refund_reject",
{
params
}
);
return res;
}
......@@ -129,23 +147,31 @@ export async function newGetOrderList(params) {
// 获取活动名称
export async function newGetMarketingList() {
const res = await axios.get("/api/v1/order/background/order_condition_marketing_list");
const res = await axios.get(
"/api/v1/order/background/order_condition_marketing_list"
);
return res;
}
// 获取商品名称
export async function newGetGoodsList(params) {
const res = await axios.get("/api/v1/order/background/order_condition_goods_list", {
params
});
const res = await axios.get(
"/api/v1/order/background/order_condition_goods_list",
{
params
}
);
return res;
}
// 获取自提点
export async function newGetSubShopList(params) {
const res = await axios.get("/api/v1/order/background/order_condition_take_place_list",{
params
});
const res = await axios.get(
"/api/v1/order/background/order_condition_take_place_list",
{
params
}
);
return res;
}
......
export const handlerSuccessResponse = async response => {
if (!response || response.code !== 0) {
return Promise.reject(response.reason);
}
return Promise.resolve(response);
};
//验证邮箱合法性 (验证头部信息)
export const checkEmailName = emailName => {
let str = /[a-zA-Z0-9_-]+/;
if (!str.test(emailName)) {
return false;
} else {
return true;
}
};
......@@ -52,15 +52,6 @@ module.exports = {
lintOnSave: false,
configureWebpack: {
devServer: {
proxy: {
'/api': {
target: `http://bp-test.ini.yidian-inc.com/ksy/ks3apiunencrypt/ks3api_upload`,
changeOrigin: true,
pathRewrite: {
'^/api': ''
}
},
},
proxy: "http://127.0.0.1:8055", //http://localhost:8055
hot: true,
disableHostCheck: true,
......@@ -75,7 +66,7 @@ module.exports = {
plugins,
},
chainWebpack: config => {
// 默认不开启 c
// 默认不开启 prefetch
config.plugins.delete("prefetch");
// 默认不开启 preload
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment