Quellcode durchsuchen

客户等级设置,设置默认首页,营销管理

MS-QJVSRANLTYEO\Administrator vor 4 Jahren
Ursprung
Commit
47e724cdb1

+ 127 - 127
Yijia-SaaS/yijia-ui/src/router/index.js

@@ -1,127 +1,127 @@
-import Vue from 'vue'
-import Router from 'vue-router'
-
-Vue.use(Router)
-
-/* Layout */
-import Layout from '@/layout'
-
-/**
- * Note: 路由配置项
- *
- * hidden: true                   // 当设置 true 的时候该路由不会再侧边栏出现 如401,login等页面,或者如一些编辑页面/edit/1
- * alwaysShow: true               // 当你一个路由下面的 children 声明的路由大于1个时,自动会变成嵌套的模式--如组件页面
- *                                // 只有一个时,会将那个子路由当做根路由显示在侧边栏--如引导页面
- *                                // 若你想不管路由下面的 children 声明的个数都显示你的根路由
- *                                // 你可以设置 alwaysShow: true,这样它就会忽略之前定义的规则,一直显示根路由
- * redirect: noRedirect           // 当设置 noRedirect 的时候该路由在面包屑导航中不可被点击
- * name:'router-name'             // 设定路由的名字,一定要填写不然使用<keep-alive>时会出现各种问题
- * meta : {
-    noCache: true                // 如果设置为true,则不会被 <keep-alive> 缓存(默认 false)
-    title: 'title'               // 设置该路由在侧边栏和面包屑中展示的名字
-    icon: 'svg-name'             // 设置该路由的图标,对应路径src/assets/icons/svg
-    breadcrumb: false            // 如果设置为false,则不会在breadcrumb面包屑中显示
-  }
- */
-
-// 公共路由
-export const constantRoutes = [
-  {
-    path: '/redirect',
-    component: Layout,
-    hidden: true,
-    children: [
-      {
-        path: '/redirect/:path(.*)',
-        component: (resolve) => require(['@/views/redirect'], resolve)
-      }
-    ]
-  },
-  {
-    path: '/login',
-    component: (resolve) => require(['@/views/login'], resolve),
-    hidden: true
-  },
-  {
-    path: '/404',
-    component: (resolve) => require(['@/views/error/404'], resolve),
-    hidden: true
-  },
-  {
-    path: '/401',
-    component: (resolve) => require(['@/views/error/401'], resolve),
-    hidden: true
-  },
-  {
-    path: '',
-    component: Layout,
-    redirect: 'index',
-    children: [
-      {
-        path: 'index',
-        component: (resolve) => require(['@/views/index'], resolve),
-        name: '首页',
-        meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true }
-      }
-    ]
-  },
-  {
-    path: '/user',
-    component: Layout,
-    hidden: true,
-    redirect: 'noredirect',
-    children: [
-      {
-        path: 'profile',
-        component: (resolve) => require(['@/views/system/user/profile/index'], resolve),
-        name: 'Profile',
-        meta: { title: '个人中心', icon: 'user' }
-      }
-    ]
-  },
-  {
-    path: '/dict',
-    component: Layout,
-    hidden: true,
-    children: [
-      {
-        path: 'type/data/:dictId(\\d+)',
-        component: (resolve) => require(['@/views/system/dict/data'], resolve),
-        name: 'Data',
-        meta: { title: '字典数据', icon: '' }
-      }
-    ]
-  },
-  {
-    path: '/job',
-    component: Layout,
-    hidden: true,
-    children: [
-      {
-        path: 'log',
-        component: (resolve) => require(['@/views/monitor/job/log'], resolve),
-        name: 'JobLog',
-        meta: { title: '调度日志' }
-      }
-    ]
-  },
-  {
-    path: '/gen',
-    component: Layout,
-    hidden: true,
-    children: [
-      {
-        path: 'edit/:tableId(\\d+)',
-        component: (resolve) => require(['@/views/tool/gen/editTable'], resolve),
-        name: 'GenEdit',
-        meta: { title: '修改生成配置' }
-      }
-    ]
-  }
-]
-
-export default new Router({
-  mode: 'history', // 去掉url中的#
-  scrollBehavior: () => ({ y: 0 }),
-  routes: constantRoutes
-})
+import Vue from 'vue'
+import Router from 'vue-router'
+
+Vue.use(Router)
+
+/* Layout */
+import Layout from '@/layout'
+
+/**
+ * Note: 路由配置项
+ *
+ * hidden: true                   // 当设置 true 的时候该路由不会再侧边栏出现 如401,login等页面,或者如一些编辑页面/edit/1
+ * alwaysShow: true               // 当你一个路由下面的 children 声明的路由大于1个时,自动会变成嵌套的模式--如组件页面
+ *                                // 只有一个时,会将那个子路由当做根路由显示在侧边栏--如引导页面
+ *                                // 若你想不管路由下面的 children 声明的个数都显示你的根路由
+ *                                // 你可以设置 alwaysShow: true,这样它就会忽略之前定义的规则,一直显示根路由
+ * redirect: noRedirect           // 当设置 noRedirect 的时候该路由在面包屑导航中不可被点击
+ * name:'router-name'             // 设定路由的名字,一定要填写不然使用<keep-alive>时会出现各种问题
+ * meta : {
+    noCache: true                // 如果设置为true,则不会被 <keep-alive> 缓存(默认 false)
+    title: 'title'               // 设置该路由在侧边栏和面包屑中展示的名字
+    icon: 'svg-name'             // 设置该路由的图标,对应路径src/assets/icons/svg
+    breadcrumb: false            // 如果设置为false,则不会在breadcrumb面包屑中显示
+  }
+ */
+
+// 公共路由
+export const constantRoutes = [
+  {
+    path: '/redirect',
+    component: Layout,
+    hidden: true,
+    children: [
+      {
+        path: '/redirect/:path(.*)',
+        component: (resolve) => require(['@/views/redirect'], resolve)
+      }
+    ]
+  },
+  {
+    path: '/login',
+    component: (resolve) => require(['@/views/login'], resolve),
+    hidden: true
+  },
+  {
+    path: '/404',
+    component: (resolve) => require(['@/views/error/404'], resolve),
+    hidden: true
+  },
+  {
+    path: '/401',
+    component: (resolve) => require(['@/views/error/401'], resolve),
+    hidden: true
+  },
+  {
+    path: '',
+    component: Layout,
+    redirect: 'index',
+    children: [
+      {
+        path: 'index',
+        component: (resolve) => require(['@/views/dataSource/saleReport'], resolve),
+        name: '首页',
+        meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true }
+      }
+    ]
+  },
+  {
+    path: '/user',
+    component: Layout,
+    hidden: true,
+    redirect: 'noredirect',
+    children: [
+      {
+        path: 'profile',
+        component: (resolve) => require(['@/views/system/user/profile/index'], resolve),
+        name: 'Profile',
+        meta: { title: '个人中心', icon: 'user' }
+      }
+    ]
+  },
+  {
+    path: '/dict',
+    component: Layout,
+    hidden: true,
+    children: [
+      {
+        path: 'type/data/:dictId(\\d+)',
+        component: (resolve) => require(['@/views/system/dict/data'], resolve),
+        name: 'Data',
+        meta: { title: '字典数据', icon: '' }
+      }
+    ]
+  },
+  {
+    path: '/job',
+    component: Layout,
+    hidden: true,
+    children: [
+      {
+        path: 'log',
+        component: (resolve) => require(['@/views/monitor/job/log'], resolve),
+        name: 'JobLog',
+        meta: { title: '调度日志' }
+      }
+    ]
+  },
+  {
+    path: '/gen',
+    component: Layout,
+    hidden: true,
+    children: [
+      {
+        path: 'edit/:tableId(\\d+)',
+        component: (resolve) => require(['@/views/tool/gen/editTable'], resolve),
+        name: 'GenEdit',
+        meta: { title: '修改生成配置' }
+      }
+    ]
+  }
+]
+
+export default new Router({
+  mode: 'history', // 去掉url中的#
+  scrollBehavior: () => ({ y: 0 }),
+  routes: constantRoutes
+})

+ 32 - 2
Yijia-SaaS/yijia-ui/src/views/customer/setting/index.vue

@@ -35,6 +35,25 @@
     <!-- 添加或修改客户优惠等级设置对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="90px">
+        <el-form-item label="油站名称"  prop="stationId">
+          <el-select v-model="form.stationId"
+                     placeholder="请选择油站"
+                     clearable
+                     size="small"
+                     @change="onInstitutionChang"
+          >
+            <el-option
+              v-for="item in stationOptions"
+              :key="item.stationId"
+              :label="item.stationName"
+              :value="item.stationId"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+
+        <el-form-item label="油站名称" v-show="false" prop="stationName" >
+          <el-input v-model="form.stationName" placeholder="请输入油站名称" />
+        </el-form-item>
         <el-form-item label="油品名称" prop="oilName">
           <el-select v-model="form.oilName" placeholder="油品名称" clearable size="small">
             <el-option
@@ -54,7 +73,7 @@
         <el-form-item label="会员条件" prop="discountWay">
           <el-input v-model="form.memberCondit" placeholder="请输入优惠方式" />
         </el-form-item>
-        <el-form-item label="汽油优惠/L" prop="gasoilDiscountLitre">
+        <el-form-item label="优惠/L" prop="gasoilDiscountLitre">
           <el-input v-model="form.gasoilDiscountLitre" placeholder="请输入汽油优惠/L" />
         </el-form-item>
 <!--        <el-form-item label="柴油优惠/L" prop="dieseloilDiscountLitre">-->
@@ -192,7 +211,7 @@
 
 <script>
 import { listSetting, getGrouthRuleList, addGrouthRule, editGrouthRule, delGrouthRule, getSetting, delSetting, addSetting, updateSetting, exportSetting } from "@/api/customer/setting";
-
+import {stationinfo} from "@/api/station/gun";
 export default {
   name: "Setting",
   data() {
@@ -216,6 +235,7 @@ export default {
       DTsettingList: [],
       //下拉油品名称
       oilNameOptions:[],
+      stationOptions:[],
       // 弹出层标题
       title: "",
       // 是否显示弹出层
@@ -280,6 +300,9 @@ export default {
     this.getDicts("oil_name").then(response => {
       this.oilNameOptions = response.data;
     });
+    stationinfo().then(response => {
+      this.stationOptions = response.rows;
+    });
   },
   methods: {
     /** 查询客户优惠等级设置列表 */
@@ -303,6 +326,13 @@ export default {
 
       });
     },
+    onInstitutionChang(e){
+      let obj = {};
+      obj = this.stationOptions.find((item)=>{//这里的userList就是上面遍历的数据源
+        return item.stationId === e;//筛选出匹配数据
+      })
+      this.form.stationNanme=obj.stationName;
+    },
     // 取消按钮
     cancel() {
       this.open = false;

+ 38 - 15
Yijia-SaaS/yijia-ui/src/views/market/plan/index.vue

@@ -9,11 +9,11 @@
     </el-form>
     <el-table v-loading="loading" :data="planList" >
       <el-table-column label="id" align="center" prop="id" v-if="false" />
-      <el-table-column label="等级名称" align="center" prop="grade" />
+      <el-table-column label="方案名称" align="center" prop="grade" />
+      <el-table-column label="油品名称" align="center" prop="oilName" />
       <el-table-column label="优惠条件" align="center" prop="discountTerm" />
       <el-table-column label="优惠条件金额" v-if="false" align="center" prop="discountAmt" />
-      <el-table-column label="汽油优惠金额" align="center" prop="gasoilDiscountAmt" />
-      <el-table-column label="柴油优惠金额" align="center" prop="dieseloilDiscountAmt" />
+      <el-table-column label="优惠金额" align="center" prop="gasoilDiscountAmt" />
       <el-table-column label="会员优惠是否叠加" align="center" prop="vipDiscountyPlus" :formatter="vipDiscountyPlusFotmat" />
       <el-table-column label="可否叠加劵" align="center" prop="couponPlus" :formatter="couponPlusFotmat"
       />
@@ -40,21 +40,28 @@
     <!-- 添加或修改客户优惠等级设置对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="130px">
-        <el-form-item label="等级名称" prop="grade">
+        <el-form-item label="方案名称" prop="grade">
           <el-input v-model="form.grade" placeholder="请输入等级名称" />
         </el-form-item>
+        <el-form-item label="油品名称" prop="oilName">
+          <el-select v-model="form.oilName" placeholder="油品名称" clearable size="small">
+            <el-option
+              v-for="dict in oilNameOptions"
+              :key="dict.dictLabel"
+              :label="dict.dictLabel"
+              :value="dict.dictLabel"
+            />
+          </el-select>
+        </el-form-item>
         <el-form-item label="优惠条件" prop="discountTerm">
           <el-input v-model="form.discountTerm" placeholder="请输入优惠条件" />
         </el-form-item>
         <el-form-item v-show="false" label="优惠条件金额" prop="discountAmt">
           <el-input v-model="form.discountAmt" placeholder="请输入优惠条件金额" />
         </el-form-item>
-        <el-form-item label="汽油优惠金额" prop="gasoilDiscountAmt">
+        <el-form-item label="优惠金额" prop="gasoilDiscountAmt">
           <el-input v-model="form.gasoilDiscountAmt" placeholder="请输入汽油优惠金额" />
         </el-form-item>
-        <el-form-item label="柴油优惠金额" prop="dieseloilDiscountAmt">
-          <el-input v-model="form.dieseloilDiscountAmt" placeholder="请输入柴油优惠金额" />
-        </el-form-item>
         <el-form-item label="会员优惠是否叠加" prop="vipDiscountyPlus">
           <el-radio-group v-model="form.vipDiscountyPlus">
             <el-radio
@@ -91,11 +98,12 @@
     </el-form>
     <el-table v-loading="loading" :data="DTplanList" >
       <el-table-column label="id" align="center" prop="id" v-if="false" />
-      <el-table-column label="等级名称" align="center" prop="grade" />
+      <el-table-column label="方案名称" align="center" prop="grade" />
+      <el-table-column label="油品名称" align="center" prop="oilName" />
       <el-table-column label="优惠条件" align="center" prop="discountTerm" />
       <el-table-column label="优惠条件金额" v-if="false" align="center" prop="discountAmt" />
-      <el-table-column label="汽油优惠金额" align="center" prop="gasoilDiscountAmt" />
-      <el-table-column label="柴油优惠金额" align="center" prop="dieseloilDiscountAmt" />
+      <el-table-column label="优惠金额" align="center" prop="gasoilDiscountAmt" />
+<!--      <el-table-column label="柴油优惠金额" align="center" prop="dieseloilDiscountAmt" />-->
       <el-table-column label="会员优惠是否叠加" align="center" prop="vipDiscountyPlus" :formatter="vipDiscountyPlusFotmat" />
       <el-table-column label="可否叠加劵" align="center" prop="couponPlus" :formatter="couponPlusFotmat" />
       <el-table-column label="优惠方案类型" v-if="false" align="center" prop="discountPlanType" />
@@ -121,21 +129,31 @@
     <!-- 添加或修改动态客户优惠等级设置对话框 -->
     <el-dialog :title="title" :visible.sync="opendt" width="500px" append-to-body>
       <el-form ref="dtform" :model="dtform" :rules="dtrules" label-width="130px">
-        <el-form-item label="等级名称" prop="grade">
+        <el-form-item label="方案名称" prop="grade">
           <el-input v-model="dtform.grade" placeholder="请输入等级名称" />
         </el-form-item>
+        <el-form-item label="油品名称" prop="oilName">
+          <el-select v-model="dtform.oilName" placeholder="油品名称" clearable size="small">
+            <el-option
+              v-for="dict in oilNameOptions"
+              :key="dict.dictLabel"
+              :label="dict.dictLabel"
+              :value="dict.dictLabel"
+            />
+          </el-select>
+        </el-form-item>
         <el-form-item label="优惠条件" prop="discountTerm">
           <el-input v-model="dtform.discountTerm" placeholder="请输入优惠条件" />
         </el-form-item>
         <el-form-item label="优惠条件金额" v-show="false" prop="discountAmt">
           <el-input v-model="dtform.discountAmt" placeholder="请输入优惠条件金额" />
         </el-form-item>
-        <el-form-item label="汽油优惠金额" prop="gasoilDiscountAmt">
+        <el-form-item label="优惠金额" prop="gasoilDiscountAmt">
           <el-input v-model="dtform.gasoilDiscountAmt" placeholder="请输入汽油优惠金额" />
         </el-form-item>
-        <el-form-item label="柴油优惠金额" prop="dieseloilDiscountAmt">
+<!--        <el-form-item label="柴油优惠金额" prop="dieseloilDiscountAmt">
           <el-input v-model="dtform.dieseloilDiscountAmt" placeholder="请输入柴油优惠金额" />
-        </el-form-item>
+        </el-form-item>-->
         <el-form-item label="会员优惠是否叠加"  prop="vipDiscountyPlus">
           <el-radio-group v-model="dtform.vipDiscountyPlus">
             <el-radio
@@ -192,6 +210,7 @@
         DTplanList: [],
         couponPlusOptions:[],
         vipDiscountyPlusOptions:[],
+        oilNameOptions:[],
         // 弹出层标题
         title: "",
         // 是否显示弹出层
@@ -251,6 +270,10 @@
       this.getDicts("vip_discounty_plus").then(response => {
         this.vipDiscountyPlusOptions = response.data;
       });
+      //油品名称
+      this.getDicts("oil_name").then(response => {
+        this.oilNameOptions = response.data;
+      });
     },
     methods: {
       /** 查询客户优惠等级设置列表 */

+ 1 - 0
Yijia-SaaS/yijia-ui/src/views/station/price/index.vue

@@ -354,6 +354,7 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const oilPriceIds = row.oilPriceId || this.ids;
+
       this.$confirm('是否确认删除油品价格编号为"' + oilPriceIds + '"的数据项?', "警告", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",