feature_0521
liuyang 5 years ago
commit a17e5f9f2c

@ -6,32 +6,17 @@
:model="formValidate" :model="formValidate"
:label-width="80"> :label-width="80">
<Row :gutter="10"> <Row :gutter="10">
<i-col span="4"> <i-col span="6">
<FormItem label="开始日期" <FormItem label="选择日期"
prop> prop="">
<Date-picker v-model="formValidate.startDate" <Date-picker style="width: 100%"
:options='startDateOptions' v-model="formValidate.date"
type="date" type="daterange"
placement="bottom-end"
placeholder="选择日期区间"
format="yyyy-MM-dd"
@on-change="startDateChange"></Date-picker>
</FormItem>
</i-col>
<i-col span="4">
<FormItem label="结束日期"
prop>
<Date-picker v-model="formValidate.endDate"
:options='endDateOptions'
type="date"
placement="bottom-end" placement="bottom-end"
placeholder="选择结束日期" placeholder="选择日期区间"></Date-picker>
format="yyyy-MM-dd"
@on-change="endDateChange"></Date-picker>
</FormItem> </FormItem>
</i-col> </i-col>
<i-col span="4"> <i-col span="6">
<FormItem label="零售公司" <FormItem label="零售公司"
prop> prop>
<Select v-model="formValidate.organizationId" <Select v-model="formValidate.organizationId"
@ -452,16 +437,21 @@ export default {
}, },
searchTable (params = {}) { searchTable (params = {}) {
this.loading = true; this.loading = true;
if (this.formValidate.startDate) { if (
this.formValidate.startDate = formatDate(this.formValidate.startDate); this.formValidate.date !== null &&
this.formValidate.date.length > 1
) {
if (this.formValidate.date[0] !== "") {
this.formValidate.startDate = formatDate(this.formValidate.date[0]);
} else { } else {
this.formValidate.startDate = undefined; this.formValidate.startDate = undefined;
} }
if (this.formValidate.endDate) { if (this.formValidate.date[1] !== "") {
this.formValidate.endDate = formatDate(this.formValidate.endDate); this.formValidate.endDate = formatDate(this.formValidate.date[1]);
} else { } else {
this.formValidate.endDate = undefined; this.formValidate.endDate = undefined;
} }
}
params.pageNum = this.pageNum; params.pageNum = this.pageNum;
params.pageSize = this.pageSize; params.pageSize = this.pageSize;
params = { ...params, ...this.formValidate }; params = { ...params, ...this.formValidate };

@ -0,0 +1,21 @@
<template>
<div class="">
</div>
</template>
<script type="text/javascript">
export default {
data () {
return {
}
},
components: {
}
}
</script>
<style lang="scss" scoped>
</style>

@ -1,39 +1,48 @@
<template> <template>
<div> <div>
<Row class="search-row"> <Row class="search-row">
<i-col span="24" class="search-col"> <i-col span="24"
<Row class="row-style"></Row> class="search-col">
<Row class="row-style">
<Button @click="handleEdit"
type="primary">配置欢迎语</Button>
</Row>
</i-col> </i-col>
</Row> </Row>
<Table :columns="columns1" style="margin-top: 20px;" size="small"> <Table :columns="columns1"
<template slot-scope="{s}" slot="action"> style="margin-top: 20px;"
<Button type="primary" size="small" @click="handleEdit(s)"></Button> size="small">
<Button type="error" size="small" @click="handleDelete(s)"></Button> <template slot-scope="{s}"
slot="action">
<Button type="primary"
size="small"
@click="handleEdit(s)">修改</Button>
<Button type="error"
size="small"
@click="handleDelete(s)">删除</Button>
</template> </template>
</Table> </Table>
<Page <Page :total="total"
:total="total"
:current="pageNum" :current="pageNum"
:page-size="pageSize" :page-size="pageSize"
show-elevator show-elevator
show-total show-total
placement="top" placement="top"
@on-change="handlePage" @on-change="handlePage"
class="ks-page" class="ks-page"></Page>
></Page>
</div> </div>
</template> </template>
<script> <script>
import data from "../../utils/PhoneRegionData"; import data from "../../utils/PhoneRegionData";
import http from "../../services/store/IncreaseStoreManager"; import http from "../../services/store/IncreaseStoreManager";
import staff from "../../services/staff/staff"; import staff from "../../services/staff/staff";
export default { export default {
name: "IncreaseWelcomeList", name: "IncreaseWelcomeList",
inject: ["setMenuName"], inject: ["setMenuName"],
data() { data () {
return { return {
loading: true, loading: true,
// //
@ -52,29 +61,53 @@
}, },
}; };
}, },
mounted() { mounted () {
this.setMenuName("门店推广", "欢迎语"); this.setMenuName("门店推广", "欢迎语");
this.handlePaginate(); this.handlePaginate();
}, },
methods: { methods: {
// //
handlePaginate() { handlePaginate () {
this.loading = true;
if (this.formValidate.startDate) {
this.formValidate.startDate = formatDate(this.formValidate.startDate);
} else {
this.formValidate.startDate = undefined;
}
if (this.formValidate.endDate) {
this.formValidate.endDate = formatDate(this.formValidate.endDate);
} else {
this.formValidate.endDate = undefined;
}
params.pageNum = this.pageNum;
params.pageSize = this.pageSize;
params = { ...params, ...this.formValidate };
params.userId = JSON.parse(sessionStorage.getItem("loginInfo")).userId;
if (params.status == 0) {
params.status = undefined;
}
params.date = undefined;
http.get("/activity/instance/list", params).then(res => {
const data = res.data.results.this || {};
this.data = data.list || [];
this.totalSize = data.total || 0;
this.loading = false;
});
}, },
// //
handlePage: function(value) { handlePage: function (value) {
this.pageNum = value; this.pageNum = value;
}, },
// //
handleEdit(row) { handleEdit (row) {
this.$router.push({ path: "/shop/increase/welcome/edit", query: row.id })
}, },
// //
handleDelete(row) { handleDelete (row) {
}, },
}, },
}; };
</script> </script>
<style scoped> <style scoped>

@ -1,213 +1,217 @@
import Vue from "vue"; import Vue from 'vue'
import Router from "vue-router"; import Router from 'vue-router'
import Login from "@/pages/Login"; import Login from '@/pages/Login'
import ExternalContact from "@/pages/ExternalContact"; import ExternalContact from '@/pages/ExternalContact'
import Home from "@/pages/Home"; import Home from '@/pages/Home'
import AccountManager from "@/pages/user/AccountManager"; import AccountManager from '@/pages/user/AccountManager'
import AccountManagerAdd from "@/pages/user/AccountManagerAdd"; import AccountManagerAdd from '@/pages/user/AccountManagerAdd'
import AccountManagementModify from "@/pages/user/AccountManagementModify"; import AccountManagementModify from '@/pages/user/AccountManagementModify'
import AccountManagerUpload from "@/pages/user/AccountManagerUpload"; import AccountManagerUpload from '@/pages/user/AccountManagerUpload'
import RoleManager from "@/pages/user/RoleManager"; import RoleManager from '@/pages/user/RoleManager'
import IncreaseManager from "@/pages/shop/IncreaseManager"; import IncreaseManager from '@/pages/shop/IncreaseManager'
import CustomerView from "@/pages/home/CustomerView"; import CustomerView from '@/pages/home/CustomerView'
import TableAnalysis from "@/pages/TableAnalysis"; import TableAnalysis from '@/pages/TableAnalysis'
import AddCustomerTable from "@/pages/analysis/AddCustomerTable"; import AddCustomerTable from '@/pages/analysis/AddCustomerTable'
import ApplyCustomerTable from "@/pages/analysis/ApplyCustomerTable"; import ApplyCustomerTable from '@/pages/analysis/ApplyCustomerTable'
import ZeroExtendDetail from "@/pages/home/ZeroExtendDetail"; import ZeroExtendDetail from '@/pages/home/ZeroExtendDetail'
import CustomerDetail from "@/pages/home/CustomerDetail"; import CustomerDetail from '@/pages/home/CustomerDetail'
import IncreaseData from "@/pages/shop/IncreaseData"; import IncreaseData from '@/pages/shop/IncreaseData'
import IncreaseDataCompany from "@/pages/shop/IncreaseDataCompany"; import IncreaseDataCompany from '@/pages/shop/IncreaseDataCompany'
import IncreaseDataStaff from "@/pages/shop/IncreaseDataStaff"; import IncreaseDataStaff from '@/pages/shop/IncreaseDataStaff'
import IncreaseDataStore from "@/pages/shop/IncreaseDataStore"; import IncreaseDataStore from '@/pages/shop/IncreaseDataStore'
import IncreaseStaffManager from "@/pages/shop/IncreaseStaffManager"; import IncreaseStaffManager from '@/pages/shop/IncreaseStaffManager'
import IncreaseStaffManagerBatchAdd from "@/pages/shop/IncreaseStaffManagerBatchAdd"; import IncreaseStaffManagerBatchAdd from '@/pages/shop/IncreaseStaffManagerBatchAdd'
import IncreaseStoreManager from "@/pages/shop/IncreaseStoreManager"; import IncreaseStoreManager from '@/pages/shop/IncreaseStoreManager'
import IncreaseConfigure from "@/pages/shop/IncreaseConfigure"; import IncreaseConfigure from '@/pages/shop/IncreaseConfigure'
import IncreaseGroupSendConfigure from "@/pages/shop/IncreaseGroupSendConfigure"; import IncreaseGroupSendConfigure from '@/pages/shop/IncreaseGroupSendConfigure'
import IncreaseWelcomeConfigure from "@/pages/shop/IncreaseWelcomeConfigure"; import IncreaseWelcomeConfigure from '@/pages/shop/IncreaseWelcomeConfigure'
import IncreaseGroupSendConfigureAdd from "@/pages/shop/IncreaseGroupSendConfigureAdd"; import IncreaseGroupSendConfigureAdd from '@/pages/shop/IncreaseGroupSendConfigureAdd'
import NoPermission from "@/pages/shop/NoPermission"; import NoPermission from '@/pages/shop/NoPermission'
import CustomerViewHome from "@/pages/home/CustomerViewHome"; import CustomerViewHome from '@/pages/home/CustomerViewHome'
import ActivityAnalysis from "@/pages/activity/ActivityAnalysis"; import ActivityAnalysis from '@/pages/activity/ActivityAnalysis'
import ActivityManager from "@/pages/activity/ActivityManager"; import ActivityManager from '@/pages/activity/ActivityManager'
import ActivityPlan from "@/pages/activity/ActivityPlan"; import ActivityPlan from '@/pages/activity/ActivityPlan'
import ActivityCode from "@/pages/activity/ActivityCode"; import ActivityCode from '@/pages/activity/ActivityCode'
import GuideCode from "@/pages/activity/GuideCode"; import GuideCode from '@/pages/activity/GuideCode'
Vue.use(Router); Vue.use(Router)
const router = new Router({ const router = new Router({
mode: "history", mode: 'history',
base: "/youke", base: '/youke',
routes: [ routes: [
{ {
path: "/", path: '/',
redirect: "/login", redirect: '/login',
}, },
{ {
path: "/login", path: '/login',
name: "login", name: 'login',
component: Login, component: Login,
}, },
{ {
path: "/external/contact", path: '/external/contact',
name: "externalContact", name: 'externalContact',
component: ExternalContact, component: ExternalContact,
}, },
{ {
path: "/home", path: '/home',
name: "Home", name: 'Home',
component: Home, component: Home,
children: [ children: [
{ {
path: "/activity/manager", path: '/activity/manager',
name: "ActivityManager", name: 'ActivityManager',
component: ActivityManager, component: ActivityManager,
}, },
{ {
path: "/activity/plan", path: '/activity/plan',
name: "ActivityPlan", name: 'ActivityPlan',
component: ActivityPlan, component: ActivityPlan,
children: [], children: [],
}, },
{ {
path: "/activity/plan/code", path: '/activity/plan/code',
name: "ActivityCode", name: 'ActivityCode',
component: ActivityCode, component: ActivityCode,
}, },
{ {
path: "/activity/plan/GuideCode", path: '/activity/plan/GuideCode',
name: "GuideCode", name: 'GuideCode',
component: GuideCode, component: GuideCode,
}, },
{ {
path: "/activity/analysis", path: '/activity/analysis',
name: "ActivityAnalysis", name: 'ActivityAnalysis',
component: ActivityAnalysis, component: ActivityAnalysis,
}, },
{ {
path: "/account/manager", path: '/account/manager',
name: "AccountManager", name: 'AccountManager',
component: AccountManager, component: AccountManager,
}, },
{ {
path: "/account/management/add", path: '/account/management/add',
name: "AccountManagerAdd", name: 'AccountManagerAdd',
component: AccountManagerAdd, component: AccountManagerAdd,
}, },
{ {
path: "/account/management/modify", path: '/account/management/modify',
name: "AccountManagementModify", name: 'AccountManagementModify',
component: AccountManagementModify, component: AccountManagementModify,
}, },
{ {
path: "/account/upload", path: '/account/upload',
name: "AccountManagerUpload", name: 'AccountManagerUpload',
component: AccountManagerUpload, component: AccountManagerUpload,
}, },
{ {
path: "/role/manager", path: '/role/manager',
name: "RoleManager", name: 'RoleManager',
component: RoleManager, component: RoleManager,
}, },
{ {
path: "/shop/increase/manager", path: '/shop/increase/manager',
name: "IncreaseManager", name: 'IncreaseManager',
component: IncreaseManager, component: IncreaseManager,
children: [ children: [
{ {
path: "/", path: '/',
redirect: "/shop/increase/manager/store", redirect: '/shop/increase/manager/store',
}, },
{ {
path: "/shop/increase/manager/store", path: '/shop/increase/manager/store',
name: "IncreaseStoreManager", name: 'IncreaseStoreManager',
component: IncreaseStoreManager, component: IncreaseStoreManager,
}, },
{ {
path: "/shop/increase/manager/staff", path: '/shop/increase/manager/staff',
name: "IncreaseStaffManager", name: 'IncreaseStaffManager',
component: IncreaseStaffManager, component: IncreaseStaffManager,
}, },
{ {
path: "/shop/increase/manager/staff/batch/add", path: '/shop/increase/manager/staff/batch/add',
name: "IncreaseStaffManagerBatchAdd", name: 'IncreaseStaffManagerBatchAdd',
component: IncreaseStaffManagerBatchAdd, component: IncreaseStaffManagerBatchAdd,
}, },
{ {
path: "/shop/increase/welcome/list", path: '/shop/increase/welcome/list',
component: () => import('@/pages/shop/IncreaseWelcomeList'), component: () => import('@/pages/shop/IncreaseWelcomeList'),
}, },
{
path: '/shop/increase/welcome/edit',
component: () => import('@/pages/shop/IncreaseWelcomeEdit'),
},
], ],
}, },
{ {
path: "/table/analysis", path: '/table/analysis',
name: "TableAnalysis", name: 'TableAnalysis',
component: TableAnalysis, component: TableAnalysis,
children: [ children: [
{ {
path: "/", path: '/',
redirect: "/table/analysis/customer/add", redirect: '/table/analysis/customer/add',
}, },
{ {
path: "/table/analysis/customer/add", path: '/table/analysis/customer/add',
name: "AddCustomerTable", name: 'AddCustomerTable',
component: AddCustomerTable, component: AddCustomerTable,
}, },
{ {
path: "/table/analysis/customer/apply", path: '/table/analysis/customer/apply',
name: "ApplyCustomerTable", name: 'ApplyCustomerTable',
component: ApplyCustomerTable, component: ApplyCustomerTable,
}, },
], ],
}, },
{ {
path: "/shop/increase/configure", path: '/shop/increase/configure',
name: "IncreaseConfigure", name: 'IncreaseConfigure',
component: IncreaseConfigure, component: IncreaseConfigure,
children: [ children: [
{ {
path: "/", path: '/',
redirect: "/shop/increase/configure/welcome", redirect: '/shop/increase/configure/welcome',
}, },
{ {
path: "/shop/increase/configure/group", path: '/shop/increase/configure/group',
name: "IncreaseGroupSendConfigure", name: 'IncreaseGroupSendConfigure',
component: IncreaseGroupSendConfigure, component: IncreaseGroupSendConfigure,
}, },
{ {
path: "/shop/increase/configure/welcome", path: '/shop/increase/configure/welcome',
name: "IncreaseWelcomeConfigure", name: 'IncreaseWelcomeConfigure',
component: IncreaseWelcomeConfigure, component: IncreaseWelcomeConfigure,
}, },
{ {
path: "/shop/increase/configure/group/add", path: '/shop/increase/configure/group/add',
name: "IncreaseGroupSendConfigureAdd", name: 'IncreaseGroupSendConfigureAdd',
component: IncreaseGroupSendConfigureAdd, component: IncreaseGroupSendConfigureAdd,
}, },
], ],
}, },
{ {
path: "/shop/increase/data", path: '/shop/increase/data',
name: "IncreaseData", name: 'IncreaseData',
component: IncreaseData, component: IncreaseData,
children: [ children: [
{ {
path: "/", path: '/',
redirect: "/shop/increase/data/region", redirect: '/shop/increase/data/region',
}, },
{ {
path: "/shop/increase/data/region", path: '/shop/increase/data/region',
name: "IncreaseDataCompany", name: 'IncreaseDataCompany',
component: IncreaseDataCompany, component: IncreaseDataCompany,
}, },
{ {
path: "/shop/increase/data/store", path: '/shop/increase/data/store',
name: "IncreaseDataStore", name: 'IncreaseDataStore',
component: IncreaseDataStore, component: IncreaseDataStore,
}, },
{ {
path: "/shop/increase/data/staff", path: '/shop/increase/data/staff',
name: "IncreaseDataStaff", name: 'IncreaseDataStaff',
component: IncreaseDataStaff, component: IncreaseDataStaff,
}, },
], ],
@ -228,42 +232,42 @@ const router = new Router({
path: '/recruit/promoter/list', path: '/recruit/promoter/list',
component: () => import('@/pages/recruit/PromoterList'), component: () => import('@/pages/recruit/PromoterList'),
}, },
] ],
}, },
{ {
path: "/customer/view", path: '/customer/view',
name: "CustomerView", name: 'CustomerView',
component: CustomerView, component: CustomerView,
}, },
{ {
path: "/zero/extend/detail", path: '/zero/extend/detail',
name: "ZeroExtendDetail", name: 'ZeroExtendDetail',
component: ZeroExtendDetail, component: ZeroExtendDetail,
}, },
{ {
path: "/customer/data/detail", path: '/customer/data/detail',
name: "CustomerDetail", name: 'CustomerDetail',
component: CustomerDetail, component: CustomerDetail,
}, },
{ {
path: "/no/permission", path: '/no/permission',
name: "NoPermission", name: 'NoPermission',
component: NoPermission, component: NoPermission,
}, },
], ],
}, },
{ {
path: "/customer/view/home", path: '/customer/view/home',
name: "CustomerViewHome", name: 'CustomerViewHome',
component: CustomerViewHome, component: CustomerViewHome,
}, },
], ],
}); })
/* /*
* 跳转前的处理事件 * 跳转前的处理事件
* */ * */
router.beforeEach(function(to, from, next) { router.beforeEach(function(to, from, next) {
next(); next()
}); })
export default router; export default router

@ -0,0 +1,10 @@
import http from '../CommonHttp'
import axios from 'axios'
export function getList(params, call) {
return http.get('/retail/company', params).then(call)
}
export default {
getList,
}
Loading…
Cancel
Save