فهرست منبع

修改全局组织机构下拉

MS-QJVSRANLTYEO\Administrator 4 سال پیش
والد
کامیت
1f8cc5d126
29فایلهای تغییر یافته به همراه228 افزوده شده و 162 حذف شده
  1. 3 2
      Yijia-SaaS/yijia-ui/src/api/station/gun.js
  2. 7 0
      Yijia-SaaS/yijia-ui/src/api/system/dept.js
  3. 60 20
      Yijia-SaaS/yijia-ui/src/components/SelectDept/index.vue
  4. 4 3
      Yijia-SaaS/yijia-ui/src/layout/components/Navbar.vue
  5. 1 1
      Yijia-SaaS/yijia-ui/src/store/getters.js
  6. 2 0
      Yijia-SaaS/yijia-ui/src/store/index.js
  7. 3 2
      Yijia-SaaS/yijia-ui/src/views/customer/manage/index.vue
  8. 5 0
      Yijia-SaaS/yijia-ui/src/views/customer/setting/index.vue
  9. 14 4
      Yijia-SaaS/yijia-ui/src/views/dataSource/dayReport.vue
  10. 14 5
      Yijia-SaaS/yijia-ui/src/views/dataSource/saleReport.vue
  11. 10 14
      Yijia-SaaS/yijia-ui/src/views/integral/order/index.vue
  12. 1 0
      Yijia-SaaS/yijia-ui/src/views/integral/points/index.vue
  13. 1 0
      Yijia-SaaS/yijia-ui/src/views/integral/record/index.vue
  14. 1 0
      Yijia-SaaS/yijia-ui/src/views/integral/rule/index1.vue
  15. 1 1
      Yijia-SaaS/yijia-ui/src/views/integral/rule/ruledetail.vue
  16. 25 15
      Yijia-SaaS/yijia-ui/src/views/integral/ruledetail/index.vue
  17. 11 11
      Yijia-SaaS/yijia-ui/src/views/integral/wares/index.vue
  18. 2 1
      Yijia-SaaS/yijia-ui/src/views/market/coupon/index.vue
  19. 3 0
      Yijia-SaaS/yijia-ui/src/views/market/plan/index.vue
  20. 1 0
      Yijia-SaaS/yijia-ui/src/views/station/adjust/index.vue
  21. 7 19
      Yijia-SaaS/yijia-ui/src/views/station/gun/index.vue
  22. 12 7
      Yijia-SaaS/yijia-ui/src/views/station/info/index.vue
  23. 1 4
      Yijia-SaaS/yijia-ui/src/views/station/manage/index.vue
  24. 2 15
      Yijia-SaaS/yijia-ui/src/views/station/order/index.vue
  25. 3 2
      Yijia-SaaS/yijia-ui/src/views/station/order/notOil.vue
  26. 21 10
      Yijia-SaaS/yijia-ui/src/views/station/pay/index.vue
  27. 8 24
      Yijia-SaaS/yijia-ui/src/views/station/personnel/index.vue
  28. 1 0
      Yijia-SaaS/yijia-ui/src/views/station/price/index.vue
  29. 4 2
      Yijia-SaaS/yijia-ui/src/views/station/summary/index.vue

+ 3 - 2
Yijia-SaaS/yijia-ui/src/api/station/gun.js

@@ -16,10 +16,11 @@ export function selectGun() {
 }
 
 // 查询油站信息列表
-export function stationinfo() {
+export function stationinfo(query) {
   return request({
     url: '/station/info/selectStationInfo',
-    method: 'get'
+    method: 'get',
+    params: query
   })
 }
 

+ 7 - 0
Yijia-SaaS/yijia-ui/src/api/system/dept.js

@@ -41,6 +41,13 @@ export function treeselect() {
   })
 }
 
+// 查询部门下拉树结构
+export function userdepttree() {
+  return request({
+    url: '/system/dept/userdepttree',
+    method: 'get'
+  })
+}
 // 根据角色ID查询部门树结构
 export function roleDeptTreeselect(roleId) {
   return request({

+ 60 - 20
Yijia-SaaS/yijia-ui/src/components/SelectDept/index.vue

@@ -1,31 +1,71 @@
 <template>
-  <el-select
-    v-model="stationId"
-    placeholder="请选择油站"
-    clearable
-    size="small"
-  >
-    <el-option
-      v-for="item in stationOptions"
-      :key="item.deptId"
-      :label="item.deptName"
-      :value="item.deptId"
-    ></el-option>
-  </el-select>
+    <treeselect style="width:180px;height:28px;position:relative; display: inline-block;" v-model="value" :options="options" />
 </template>
-<script>
-import selectDept from 'SelectDept'
 
+<script>
+import { userdepttree } from "@/api/system/dept";
+import Treeselect from "@riophae/vue-treeselect";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 export default {
-  name: "index",
+  components: { Treeselect },
   data() {
     return {
-      search: '',
+      value: null,
       options: [],
-      searchPool: [],
+      num:0
     }
   },
+  watch: {
+    // 监听deptId
+    'value': 'currDeptChange'
+  },
+   created() {
+    this.getTreeselect();
+  },
+  methods: {
+    /** 查询部门下拉树结构 */
+    getTreeselect() {
+      userdepttree().then(response => {
+        this.options = response.data;
+        if(response.data!=null && response.data.length>0){
+          this.value=response.data[0].id;
+          this.$store.selectDeptName= response.data[0].label;
+          this.$store.selectDeptId= response.data[0].id;
+        }
+      });
+    },
+    currDeptChange(val) {
+      if (val) {
+        this.$store.selectDeptId= val;
+        console.log("this.$refs.tag",this.$refs.tag);
+        console.log("this.$refs",this.$refs);
+         console.log("this.num1",this.num);
+        if(this.num>0){
+          console.log("this.num2",this.num);
+          //this.$router.go(2);
+         // location.reload();
+        }
+        this.num=this.num+1;
+      }
+    },
+  }
 }
 </script>
-
-
+<style lang="scss">
+    .vue-treeselect__control{
+      height: 20px;
+      line-height: 26px;
+      font-size: 12px;
+      text-indent: 4px;
+    }
+    .vue-treeselect__menu-container {
+      position: absolute;
+      left: 0;
+      width: 100%;
+      overflow: visible;
+      transition: 0s;
+    }
+    .vue-treeselect__menu{
+      font-size: 12px;
+    }
+</style>

+ 4 - 3
Yijia-SaaS/yijia-ui/src/layout/components/Navbar.vue

@@ -6,7 +6,7 @@
 
     <div class="right-menu">
      <template>
-<!--       <selectDept id="select_dept" />-->
+        <select-dept id="select-dept" class="right-menu-item"/>
         <search id="header-search" class="right-menu-item" />
         <screenfull id="screenfull" class="right-menu-item hover-effect" />
         <el-tooltip content="布局大小" effect="dark" placement="bottom">
@@ -42,6 +42,7 @@ import Hamburger from '@/components/Hamburger'
 import Screenfull from '@/components/Screenfull'
 import SizeSelect from '@/components/SizeSelect'
 import Search from '@/components/HeaderSearch'
+import SelectDept from '@/components/SelectDept'
 import RuoYiGit from '@/components/RuoYi/Git'
 import RuoYiDoc from '@/components/RuoYi/Doc'
 
@@ -49,7 +50,6 @@ import RuoYiDoc from '@/components/RuoYi/Doc'
 export default {
   data() {
     return {
-      stationOptions:[]
     }
   },
   components: {
@@ -58,6 +58,7 @@ export default {
     Screenfull,
     SizeSelect,
     Search,
+    SelectDept,
     RuoYiGit,
     RuoYiDoc
   },
@@ -101,7 +102,7 @@ export default {
 <style lang="scss" scoped>
 .navbar {
   height: 50px;
-  overflow: hidden;
+  overflow: visible ;
   position: relative;
   background: #fff;
   box-shadow: 0 1px 4px rgba(0,21,41,.08);

+ 1 - 1
Yijia-SaaS/yijia-ui/src/store/getters.js

@@ -11,6 +11,6 @@ const getters = {
   roles: state => state.user.roles,
   permissions: state => state.user.permissions,
   permission_routes: state => state.permission.routes,
-  sidebarRouters:state => state.permission.sidebarRouters
+  sidebarRouters:state => state.permission.sidebarRouters,
 }
 export default getters

+ 2 - 0
Yijia-SaaS/yijia-ui/src/store/index.js

@@ -2,6 +2,7 @@ import Vue from 'vue'
 import Vuex from 'vuex'
 import app from './modules/app'
 import user from './modules/user'
+import selectDept from './modules/selectDept'
 import tagsView from './modules/tagsView'
 import permission from './modules/permission'
 import settings from './modules/settings'
@@ -13,6 +14,7 @@ const store = new Vuex.Store({
   modules: {
     app,
     user,
+    selectDept,
     tagsView,
     permission,
     settings

+ 3 - 2
Yijia-SaaS/yijia-ui/src/views/customer/manage/index.vue

@@ -66,7 +66,7 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="油站名称" prop="stationId">
+      <!-- <el-form-item label="油站名称" prop="stationId">
         <el-select
           v-model="queryParams.stationId"
           placeholder="请选择油站"
@@ -80,7 +80,7 @@
             :value="item.deptId"
           ></el-option>
         </el-select>
-      </el-form-item>
+      </el-form-item> -->
 
       <el-form-item>
         <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
@@ -344,6 +344,7 @@ export default {
     /** 查询客户管理列表 */
     getList() {
       this.loading = true;
+      this.queryParams.stationId= this.$store.selectDeptId;
       listManage(this.queryParams).then(response => {
         this.manageList = response.rows;
         this.total = response.total;

+ 5 - 0
Yijia-SaaS/yijia-ui/src/views/customer/setting/index.vue

@@ -263,6 +263,7 @@ export default {
         grouthValueName: null,
         grouthValueConsume: null,
         grouthValue: null,
+        stationId:null,
         // gasoilConsume: null,
         // gasoilGrowthValue: null,
         // dieseloilConsume: null,
@@ -282,6 +283,7 @@ export default {
         grouthValueName: null,
         grouthValueConsume: null,
         grouthValue: null,
+        stationId:null,
         // gasoilConsume: null,
         // gasoilGrowthValue: null,
         // dieseloilConsume: null,
@@ -318,6 +320,7 @@ export default {
     getList() {
       this.queryParams.gradeType="1";
       this.loading = true;
+      this.queryParams.stationId= this.$store.selectDeptId;
       listSetting(this.queryParams).then(response => {
         this.settingList = response.rows;
         this.total = response.total;
@@ -328,6 +331,7 @@ export default {
     getList2() {
       this.selectParams.gradeType="3";
       this.loading = true;
+      this.selectParams.stationId= this.$store.selectDeptId;
       listSetting(this.selectParams).then(response => {
         this.DTsettingList = response.rows;
         this.total = response.total;
@@ -366,6 +370,7 @@ export default {
         grouthValueConsume: null,
         grouthValue: null,
         oilName:null,
+        stationId:null,
         // gasoilConsume: null,
         // gasoilGrowthValue: null,
         // dieseloilConsume: null,

+ 14 - 4
Yijia-SaaS/yijia-ui/src/views/dataSource/dayReport.vue

@@ -184,7 +184,7 @@ export default {
       // 查询参数
       queryParams: {
         createdDate: null,
-        stationNo: null,
+        stationId:null,
         stationName: null,
         beginTime: null,
         endTime: null,
@@ -199,7 +199,9 @@ export default {
         status: null,
         createdDate: null,
         beginTime: null,
-        endTime: null
+        endTime: null,
+        orderType: null,
+        stationId:null
       },
       //日报数据
       dayReportList: [],
@@ -218,6 +220,7 @@ export default {
     this.$nextTick(() => {
       this.queryParams.beginTime = this.getMonthDate();
       this.queryParams.endTime = this.getEndFormatDate(new Date());
+      this.queryParams.stationId=this.$store.selectDeptId;
       setTimeout(() => {
         this.initChart();
       }, 1000);
@@ -229,6 +232,7 @@ export default {
     this.reset();
     this.queryParams.beginTime = this.getMonthDate();
     this.queryParams.endTime = this.getEndFormatDate(new Date());
+    this.queryParams.stationId=this.$store.selectDeptId;
     this.getDatas();
   },
   methods: {
@@ -472,7 +476,6 @@ export default {
     getList() {
       listSum(this.queryParams).then(response => {
         if (response.hasOwnProperty('data')) {
-          console.log("response---=:",response);
           this.form.zongAmt = response.data.amt;
           this.form.zongliters = response.data.orderLiters;
         }
@@ -502,6 +505,7 @@ export default {
       this.reset();
       this.queryParams.beginTime = this.getNowFormatDate(new Date());
       this.queryParams.endTime = this.getEndFormatDate(new Date());
+      this.queryParams.stationId=this.$store.selectDeptId;
       this.getList();
     },
     //昨天的数据
@@ -509,6 +513,7 @@ export default {
       this.reset();
       this.queryParams.beginTime = this.getFormatDate(new Date());
       this.queryParams.endTime = this.getNowFormatDate(new Date());
+      this.queryParams.stationId=this.$store.selectDeptId;
       this.getList();
     },
     //本周的数据
@@ -516,6 +521,7 @@ export default {
       this.reset();
       this.queryParams.beginTime = this.getDates();
       this.queryParams.endTime = this.getEndFormatDate(new Date());
+      this.queryParams.stationId=this.$store.selectDeptId;
       //this.initChart();
       this.getDatas();
       this.getList();
@@ -526,6 +532,7 @@ export default {
       this.reset();
       this.queryParams.beginTime = this.getMonthDate();
       this.queryParams.endTime = this.getEndFormatDate(new Date());
+      this.queryParams.stationId=this.$store.selectDeptId;
       this.getDatas();
       this.getList();
     },
@@ -535,6 +542,7 @@ export default {
       this.reset();
       this.queryParams.beginTime = this.dateRangeCreatedDate[0];
       this.queryParams.endTime = this.dateRangeCreatedDate[1];
+      this.queryParams.stationId=this.$store.selectDeptId;
       this.getDatas();
       this.getList();
     },
@@ -624,7 +632,7 @@ export default {
     reset() {
       this.queryParams = {
         createdDate: null,
-        stationNo: null,
+        stationId: null,
         stationName: null,
         beginTime:null,
         endTime:null
@@ -651,6 +659,8 @@ export default {
       this.queryInfo.status = "1";
       this.queryInfo.pageNum=row.page;
       this.queryInfo.pageSize =row.limit;
+      this.queryInfo.orderType = "1";
+      this.queryInfo.stationId=this.$store.selectDeptId;
       getDetails(this.queryInfo).then(response => {
         this.dayReportDetailsList = response.rows;
         this.total1 = response.total;

+ 14 - 5
Yijia-SaaS/yijia-ui/src/views/dataSource/saleReport.vue

@@ -225,7 +225,7 @@ export default {
       // 查询参数
       queryParams: {
         createdDate: null,
-        stationNo: null,
+        stationId: null,
         stationName: null,
         beginTime:null,
         endTime:null
@@ -245,7 +245,8 @@ export default {
         tyAppAmt:0,
         otherAmt:0,
         memberAmt:0,
-        posAmt:0
+        posAmt:0,
+        
       },
       // 表单校验
       rules: {
@@ -263,7 +264,6 @@ export default {
           this.form.zongAmt = response.data.amt;
           this.form.zongliters = response.data.orderLiters;
         }
-
       });
       listOilType(this.queryParams).then(response => {
         if(response.hasOwnProperty('rows')){
@@ -328,6 +328,7 @@ export default {
       this.reset();
       this.queryParams.beginTime=this.getNowFormatDate(new Date());
       this.queryParams.endTime =this.getEndFormatDate(new Date());
+      this.queryParams.stationId=this.$store.selectDeptId;
       this.getList();
     },
     //昨天的数据
@@ -335,6 +336,7 @@ export default {
       this.reset();
       this.queryParams.beginTime=this.getFormatDate(new Date());
       this.queryParams.endTime =this.getNowFormatDate(new Date());
+      this.queryParams.stationId=this.$store.selectDeptId;
       this.getList();
     },
     //本周的数据
@@ -342,6 +344,7 @@ export default {
       this.reset();
       this.queryParams.beginTime=this.getDates();
       this.queryParams.endTime =this.getEndFormatDate(new Date());
+       this.queryParams.stationId=this.$store.selectDeptId;
       this.getList();
     },
     //本月数据
@@ -349,6 +352,7 @@ export default {
       this.reset();
       this.queryParams.beginTime=this.getMonthDate();
       this.queryParams.endTime =this.getEndFormatDate(new Date());
+      this.queryParams.stationId=this.$store.selectDeptId;
       this.getList();
     },
     //按照指定日期
@@ -356,6 +360,9 @@ export default {
       this.reset();
       this.queryParams.beginTime =this.dateRangeCreatedDate[0];
       this.queryParams.endTime = this.dateRangeCreatedDate[1];
+      console.log("selectDeptId",this.$store.selectDeptId);
+      this.queryParams.stationId=this.$store.selectDeptId;
+      console.log("stationId",this.queryParams.stationId);
       this.getList();
     },
     //今天
@@ -436,8 +443,10 @@ export default {
     reset() {
       this.queryParams = {
         createdDate: null,
-        stationNo: null,
-        stationName: null
+        stationId: null,
+        stationName: null,
+        beginTime:null,
+        endTime:null
       };
       this.form = {
           zongAmt:0,

+ 10 - 14
Yijia-SaaS/yijia-ui/src/views/integral/order/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="90px">
       <el-form-item label="积分订单号" prop="integralOrderNo">
         <el-input
           v-model="queryParams.integralOrderNo"
@@ -58,19 +58,7 @@
           <span>{{ parseTime(scope.row.exchangeTime, '{y}-{m}-{d}') }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="订单状态" align="center" prop="status" />
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
-        <template slot-scope="scope">
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-edit"
-            @click="detail(scope.row)"
-            v-hasPermi="['integral:order:edit']"
-          >订单明细</el-button>
-
-        </template>
-      </el-table-column>
+      <el-table-column label="订单状态" align="center" prop="status" :formatter="statusFormat" />
     </el-table>
 
     <pagination
@@ -133,9 +121,17 @@ export default {
     this.getList();
   },
   methods: {
+    statusFormat(row, column){
+      if(row.status === '1'){
+        return '已兑换'
+      }else if(row.status === '2'){
+        return '兑换中'
+      }
+    },
     /** 查询积分消费订单列表 */
     getList() {
       this.loading = true;
+      this.queryParams.stationId= this.$store.selectDeptId;
       listOrder(this.queryParams).then(response => {
         this.orderList = response.rows;
         this.total = response.total;

+ 1 - 0
Yijia-SaaS/yijia-ui/src/views/integral/points/index.vue

@@ -155,6 +155,7 @@ export default {
     /** 查询用户积分列表 */
     getList() {
       this.loading = true;
+      this.queryParams.stationId= this.$store.selectDeptId;
       listPoints(this.queryParams).then(response => {
         this.pointsList = response.rows;
         this.total = response.total;

+ 1 - 0
Yijia-SaaS/yijia-ui/src/views/integral/record/index.vue

@@ -120,6 +120,7 @@ export default {
     /** 查询客户积分记录列表 */
     getList() {
       this.loading = true;
+      this.queryParams.stationId= this.$store.selectDeptId;
       listRecord(this.queryParams).then(response => {
         this.recordList = response.rows;
         this.total = response.total;

+ 1 - 0
Yijia-SaaS/yijia-ui/src/views/integral/rule/index1.vue

@@ -150,6 +150,7 @@ export default {
     /** 查询规则设置列表 */
     getList() {
       this.loading = true;
+      this.queryParams.stationId= this.$store.selectDeptId;
       listRule(this.queryParams).then(response => {
         this.ruleList = response.rows;
         this.total = response.total;

+ 1 - 1
Yijia-SaaS/yijia-ui/src/views/integral/rule/ruledetail.vue

@@ -29,7 +29,7 @@
           >{{dict.dictLabel}}</el-radio>
         </el-radio-group>
       </el-form-item>
-      <div  v-for="(item, index) in lists" >
+      <div  v-for="(item, index) in lists" :key="index">
         <el-row style="margin-left: 120px;">
           <!-- <el-input v-if="item.type=='text'" type='text'  v-model="myForm[item.prop]"></el-input>-->
           <span>满</span>

+ 25 - 15
Yijia-SaaS/yijia-ui/src/views/integral/ruledetail/index.vue

@@ -33,7 +33,7 @@
           >
             <el-form-item>
               <span>规则类型</span>
-              <el-select v-model="item.ruleType" placeholder="请选择油品" clearable size="small" @change="changeType" >
+              <el-select v-model="item.ruleType" placeholder="请选择油品" clearable size="small"  >
                 <el-option
                   v-for="item in ruleTypeOptions"
                   :key="item.dictValue"
@@ -46,7 +46,7 @@
               <span v-if="item.ruleType=='1'">L</span>
               <span v-else>元</span>
               <span>起累计 </span>
-              <el-select v-model="item.oilName" placeholder="请选择油品" clearable size="small" @change="changeType(index)" >
+              <el-select v-model="item.oilName" placeholder="请选择油品" clearable size="small" @change="oilNameChang(index)" >
                 <el-option
                   v-for="item in oilNameOptions"
                   :key="item.oilName"
@@ -183,8 +183,8 @@
       <el-form-item label="积分轮播图">
         <el-upload
           class="avatar-uploader"
-          action="http://localhost:8080/common/upload"
-          :headers=headers
+          :action="addressUrl"
+          :headers="headers"
           multiple
           list-type="picture-card"
           :limit='5'
@@ -239,7 +239,6 @@ name: "ruleDetail",
       deleteImgFileList: [], //存已被删除了的图片的id
       dialogImageUrl: '',
       dialogVisible: false,
-      
       // 是否显示弹出层
       open: false,
       // 查询参数
@@ -260,7 +259,8 @@ name: "ruleDetail",
       // 表单校验
       rules: {
       },
-      headers: { Authorization: "Bearer " + getToken() }
+      headers: { Authorization: "Bearer " + getToken() },
+      addressUrl: location.protocol+"//"+location.host+ process.env.VUE_APP_BASE_API+"/common/upload"
     };
   },
   created() {
@@ -329,10 +329,10 @@ name: "ruleDetail",
       //获取等级名称和id
       console.log(e);
     },
-    onInstitutionChang(e){
+    onInstitutionChang(){
       let obj = {};
       obj = this.stationOptions.find((item)=>{//这里的userList就是上面遍历的数据源
-        return item.deptId === e;//筛选出匹配数据
+        return item.deptId === this.form.stationId;//筛选出匹配数据
       })
       this.queryreset();
       this.form.stationName=obj.deptName;
@@ -343,15 +343,20 @@ name: "ruleDetail",
     },
     oilNameChang(e){
       let obj = {};
+      console.log("oilNameOptions:",this.oilNameOptions);
+        console.log("e:",this.form.itemsDetail[e].oilName);
       obj = this.oilNameOptions.find((item)=>{//这里的userList就是上面遍历的数据源
-        return item.oilName === e;//筛选出匹配数据
+        return item.oilName === this.form.itemsDetail[e].oilName;//筛选出匹配数据
       })
       this.queryreset();
       //获取油站名称
       this.queryParams.stationId = this.form.stationId;
       this.queryParams.oilName=obj.oilName;
+      console.log("stationId", this.form.stationId);
+      console.log("oilname",obj.oilName);
       gradeList(this.queryParams).then(response => {
         this.gradeOptions = response.rows;
+          console.log("gradeOptions", this.gradeOptions );
       });
     },
 
@@ -361,11 +366,16 @@ name: "ruleDetail",
       this.dialogVisible = true;
     },
     handleRemove(file, fileList) {
-      if (file.id) {
-        this.deleteImgFileList.push(file.id)
+      if(fileList!=null && fileList.length>0){
+        this.form.imgFileList=[];
+        for (let i = 0; i < fileList.length; i++) {
+          let fileName = fileList[i].name;
+          let imgurl = fileList[i].url;
+          this.form.imgFileList.push({name:fileName,url:imgurl});
+        }
+      }else{
+         this.form.imgFileList = fileList;
       }
-      this.form.imgFileList = fileList;
-      //this.hideUpload = fileList.length >= this.limit
     },
     beforeAvatarUpload(file) {
       const isType = file.type === 'image/jpeg' || 'image/png';
@@ -380,7 +390,8 @@ name: "ruleDetail",
     },
    //上传成功
     handlepaymentSuccess(response,file, fileList){
-        this.form.imgFileList.push({name:file.name,url:response.url});
+        let imgurl=location.protocol+"//"+location.host+process.env.VUE_APP_BASE_API+response.fileName;
+        this.form.imgFileList.push({name:file.name,url:imgurl});
     },
     /** 提交按钮 */
     submitForm() {
@@ -402,7 +413,6 @@ name: "ruleDetail",
             if(this.form.datePicker != null){
               this.form.datePicker =this.form.datePicker.toString();
             }
-            console.log("notOilList",this.form.notOilList);
             if(this.form.notOilList!=null&&this.form.notOilList.length>0||this.form.notOilList[0].hasOwnProperty(saleAmt)){
                 if(this.form.notOilList[0].saleAmt==""||this.form.notOilList[0].saleAmt=="0" ||this.form.notOilList[0].saleAmt=="undefined"){
                   this.form.notOilList=[];

+ 11 - 11
Yijia-SaaS/yijia-ui/src/views/integral/wares/index.vue

@@ -20,7 +20,7 @@
 
     <el-table v-loading="loading" :data="waresList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="商品id" align="center" prop="id" />
+      <el-table-column label="商品id" align="center" prop="id"  v-if="false" />
       <el-table-column label="商品类别" align="center" prop="waresType"  v-if="false" />
       <el-table-column label="商品名称" align="center" prop="waresName" />
       <el-table-column label="消费积分" align="center" prop="saleIntegral" />
@@ -83,9 +83,9 @@
 <!--          <el-input v-model="form.waresPic" placeholder="请输入商品图片" />-->
           <el-upload
             class="avatar-uploader"
-            action="http://localhost:8080/common/upload"
+            :action="addressUrl"
+            :headers="headers"
             :show-file-list="false"
-            :headers=headers
             :on-success="handleAvatarSuccess"
             :before-upload="beforeAvatarUpload">
             <img v-if="form.waresPic" :src="form.waresPic" style="width:150px;height: 150px;" class="avatar">
@@ -171,14 +171,17 @@ export default {
         waresDetail: null,
         waresStatus: null,
         createName: null,
-        updateName: null
+        updateName: null,
+        stationId: null
       },
       // 表单参数
       form: {},
       // 表单校验
       rules: {
       },
-      headers: { Authorization: "Bearer " + getToken() }
+      headers: { Authorization: "Bearer " + getToken() },
+      addressUrl: location.protocol+"//"+location.host+ process.env.VUE_APP_BASE_API+"/common/upload"
+  
     };
   },
   created() {
@@ -205,6 +208,7 @@ export default {
     /** 查询【请填写功能名称】列表 */
     getList() {
       this.loading = true;
+      this.queryParams.stationId= this.$store.selectDeptId;
       listWares(this.queryParams).then(response => {
         this.waresList = response.rows;
         this.total = response.total;
@@ -334,13 +338,9 @@ export default {
         })
     },
     // 文件上传成功处理++ =
-    handleFileSuccess(response, file, fileList) {
-      this.upload.isUploading = false;
-      this.form.filePath = response.url;
-      this.msgSuccess(response.msg);
-    },
     handleAvatarSuccess(res, file) {
-      this.form.waresPic = res.url;
+      let imgurl=location.protocol+"//"+location.host+process.env.VUE_APP_BASE_API+res .fileName;
+      this.form.waresPic = imgurl;
     },
     beforeAvatarUpload(file) {
       const isJPG = file.type === 'image/jpeg';

+ 2 - 1
Yijia-SaaS/yijia-ui/src/views/market/coupon/index.vue

@@ -244,7 +244,7 @@ export default {
       queryParams: {
         pageNum: 1,
         pageSize: 10,
-        stationNo: null,
+        stationId: null,
         stationName: null,
         couponName: null,
         couponRule: null,
@@ -268,6 +268,7 @@ export default {
     /** 查询优惠劵管理列表 */
     getList() {
       this.loading = true;
+      this.queryParams.stationId= this.$store.selectDeptId;
       listCoupon(this.queryParams).then(response => {
         this.couponList = response.rows;
         this.total = response.total;

+ 3 - 0
Yijia-SaaS/yijia-ui/src/views/market/plan/index.vue

@@ -495,6 +495,7 @@
       /** 查询客户优惠等级设置列表 */
       getList() {
         this.queryParams.discountPlanType="1";
+        this.queryParams.stationId= this.$store.selectDeptId;
         this.loading = true;
         listPlan(this.queryParams).then(response => {
           this.planList = response.rows;
@@ -504,6 +505,7 @@
       },
       getList2() {
         this.selectParams.discountPlanType="2";
+        this.selectParams.stationId= this.$store.selectDeptId;
         this.loading = true;
         listPlan(this.selectParams).then(response => {
           this.DTplanList = response.rows;
@@ -514,6 +516,7 @@
       },
       getList3() {
         this.zjParams.discountPlanType="3";
+        this.zjParams.stationId= this.$store.selectDeptId;
         this.loading = true;
         listPlan(this.zjParams).then(response => {
           if(response.hasOwnProperty('rows')){

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

@@ -87,6 +87,7 @@ export default {
     /** 查询油品调价信息列表 */
     getList() {
       this.loading = true;
+      this.queryParams.stationId= this.$store.selectDeptId;
       listAdjust(this.queryParams).then(response => {
         this.adjustList = response.rows;
         this.total = response.total;

+ 7 - 19
Yijia-SaaS/yijia-ui/src/views/station/gun/index.vue

@@ -1,24 +1,8 @@
 <template>
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="油站名称" prop="stationId">
-          <el-select
-            v-model="queryParams.stationId"
-            placeholder="请选择油站"
-            clearable
-            size="small"
-          >
-          <el-option
-            v-for="item in stationOptions"
-            :key="item.deptId"
-            :label="item.deptName"
-            :value="item.deptId"
-          ></el-option>
-        </el-select>
-      </el-form-item>
-      <el-form-item>
+      <el-form-item style="float:right;">
         <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
         <el-button icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['station:gun:add']">新增</el-button>
         <el-button icon="el-icon-delete" size="mini" @click="handleDelete" :disabled="multiple" v-hasPermi="['station:gun:remove']">删除</el-button>
       </el-form-item>
@@ -121,7 +105,6 @@
             >{{dict.dictLabel}}</el-radio>
           </el-radio-group>
         </el-form-item>
-
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>
@@ -172,6 +155,9 @@ export default {
         date: null,
         status: null
       },
+      query:{
+        deptId: null
+      },
       // 表单参数
       form: {},
       // 表单校验
@@ -181,7 +167,8 @@ export default {
   },
   created() {
     this.getList();
-    stationinfo().then(response => {
+    this.query.deptId =this.$store.selectDeptId;
+    stationinfo(this.query).then(response => {
       this.stationOptions = response.rows;
     });
     this.getDicts("station_gun_status").then(response => {
@@ -198,6 +185,7 @@ export default {
     /** 查询油枪管理列表 */
     getList() {
       this.loading = true;
+      this.queryParams.stationId=this.$store.selectDeptId;
       listGun(this.queryParams).then(response => {
         this.gunList = response.rows;
         this.total = response.total;

+ 12 - 7
Yijia-SaaS/yijia-ui/src/views/station/info/index.vue

@@ -40,9 +40,9 @@
         <el-form-item label="油站形象照" prop="stationPic">
           <el-upload
             class="avatar-uploader"
-            action="http://localhost:8080/common/upload"
+            :action="addressUrl"
             :show-file-list="false"
-            :headers=headers
+            :headers="headers"
             :on-success="handleAvatarSuccess"
             :before-upload="beforeAvatarUpload">
             <img v-if="form.stationPic" :src="form.stationPic" style="width:150px;height: 150px;" class="avatar">
@@ -126,13 +126,14 @@ export default {
         stationName: null,
         deptAddress: null,
         oilGunNum: null,
-        contacts: null,
+        contacts: null, 
         phone: null,
         stationGroupName: null,
         stationPic: null,
         stationLongitude: null,
         stationLatitude: null,
-        mno: null
+        mno: null,
+        deptId:null
       },
       // 表单参数
       form: {},
@@ -140,7 +141,8 @@ export default {
       rules: {
       },
       imageUrl: '',
-      headers: { Authorization: "Bearer " + getToken() }
+      headers: { Authorization: "Bearer " + getToken() },
+      addressUrl: location.protocol+"//"+location.host+ process.env.VUE_APP_BASE_API+"/common/upload"
     };
   },
   created() {
@@ -152,6 +154,7 @@ export default {
     /** 查询油站信息列表 */
     getList() {
       this.loading = true;
+      this.queryParams.deptId= this.$store.selectDeptId;
       listInfo(this.queryParams).then(response => {
         this.infoList = response.rows;
         this.total = response.total;
@@ -188,7 +191,8 @@ export default {
         stationPic: null,
         stationLongitude: null,
         stationLatitude: null,
-        mno: null
+        mno: null,
+        deptId:null
       };
       this.resetForm("form");
     },
@@ -277,7 +281,8 @@ export default {
 // 文件上传成功处理++ =
     handleFileSuccess(response, file, fileList) {
       this.upload.isUploading = false;
-      this.form.filePath = response.url;
+      let imgurl=location.protocol+"//"+location.host+process.env.VUE_APP_BASE_API+response.fileName;
+      this.form.filePath = imgurl;
       this.msgSuccess(response.msg);
     },
     handleAvatarSuccess(res, file) {

+ 1 - 4
Yijia-SaaS/yijia-ui/src/views/station/manage/index.vue

@@ -218,10 +218,6 @@ export default {
     this.getDicts("device_type").then(response => {
       this.deviceTypeOptions = response.data;
     });
-    // //获取油枪
-    // selectGun().then(response => {
-    //   this.checkList = response.rows;
-    // });
     stationinfo().then(response => {
       this.stationOptions = response.rows;
     });
@@ -230,6 +226,7 @@ export default {
     /** 查询油站设备管理列表 */
     getList() {
       this.loading = true;
+      this.queryParams.stationId = this.$store.selectDeptId;
       listManage(this.queryParams).then(response => {
         this.manageList = response.rows;
         this.total = response.total;

+ 2 - 15
Yijia-SaaS/yijia-ui/src/views/station/order/index.vue

@@ -57,21 +57,7 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="油站名称" prop="stationId">
-        <el-select
-          v-model="queryParams.stationId"
-          placeholder="请选择油站"
-          clearable
-          size="small"
-        >
-          <el-option
-            v-for="item in stationOptions"
-            :key="item.deptId"
-            :label="item.deptName"
-            :value="item.deptId"
-          ></el-option>
-        </el-select>
-      </el-form-item>
+      
       <el-form-item label="创建时间" prop="createdDate">
         <el-date-picker style="width: 350px"
                         v-model="dateRangeCreatedDate" size="mini" value-format="yyyy-MM-dd HH:mm:ss"
@@ -249,6 +235,7 @@
       /** 查询订单支付列表 */
       getList() {
         this.loading = true;
+        this.queryParams.stationId= this.$store.selectDeptId;
         listOrder(this.addDateRange(this.queryParams, this.dateRangeCreatedDate)).then(response => {
           this.orderList = response.rows;
           this.total = response.total;

+ 3 - 2
Yijia-SaaS/yijia-ui/src/views/station/order/notOil.vue

@@ -20,7 +20,7 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="油站名称" prop="stationId">
+      <!-- <el-form-item label="油站名称" prop="stationId">
         <el-select
           v-model="queryParams.stationId"
           placeholder="请选择油站"
@@ -33,7 +33,7 @@
             :label="item.deptName"
             :value="item.deptId"
           ></el-option>
-        </el-select>
+        </el-select> -->
       </el-form-item>
       <el-form-item label="创建时间" prop="createdDate">
         <el-date-picker style="width: 350px"
@@ -210,6 +210,7 @@
       /** 查询订单支付列表 */
       getList() {
         this.loading = true;
+        this.queryParams.stationId= this.$store.selectDeptId;
         listOrder(this.addDateRange(this.queryParams, this.dateRangeCreatedDate)).then(response => {
           this.orderList = response.rows;
           this.total = response.total;

+ 21 - 10
Yijia-SaaS/yijia-ui/src/views/station/pay/index.vue

@@ -4,8 +4,8 @@
       <el-form-item label="支付模板"  prop="payMode">
         <el-upload
           class="avatar-uploader"
-          action="http://localhost:8080/common/upload"
-          :headers=headers
+          :action="addressUrl"
+          :headers="headers"
           multiple
           list-type="picture-card"
           :limit='5'
@@ -13,7 +13,8 @@
           accept="image/gif,image/jpeg,image/png,image/jpg,image/bmp"
           :before-upload="beforeAvatarUpload"
           :on-remove="handleRemove"
-          :on-success="handlepaymentSuccess">
+          :on-success="handlepaymentSuccess"
+          :auto-upload="true">
           <i class="el-icon-plus"></i>
           <div class="el-upload__tip" slot="tip">只能上传jpg/png文件,最多上传5张且单张图片不超过1M</div>
         </el-upload>
@@ -49,6 +50,10 @@
           >{{dict.dictLabel}}</el-radio>
         </el-radio-group>
       </el-form-item>
+      
+      <el-form-item label="公告信息" v-show="false" prop="notice" >
+          <el-input v-model="ruleForm.notice" placeholder="请输入公告信息" />
+        </el-form-item>
       <el-form-item label="电子会员卡">
         <el-radio-group v-model="ruleForm.cardEnabledFlag">
           <el-radio
@@ -135,7 +140,8 @@ export default {
       // 表单校验
       rules: {
       },
-      headers: { Authorization: "Bearer " + getToken() }
+      headers: { Authorization: "Bearer " + getToken() },
+      addressUrl: location.protocol+"//"+location.host+ process.env.VUE_APP_BASE_API+"/common/upload"
     };
   },
   created() {
@@ -165,10 +171,16 @@ export default {
   },
   methods: {
     handleRemove(file, fileList) {
-      if (file.id) {
-        this.deleteImgFileList.push(file.id)
+      if(fileList!=null && fileList.length>0){
+        this.ruleForm.imgFileList=[];
+        for (let i = 0; i < fileList.length; i++) {
+          let fileName = fileList[i].name;
+          let imgurl = fileList[i].url;
+          this.ruleForm.imgFileList.push({name:fileName,url:imgurl});
+        }
+      }else{
+         this.ruleForm.imgFileList = fileList;
       }
-      //this.ruleForm.imgFileList = fileList;
     },
     beforeAvatarUpload(file) {
       const isType = file.type === 'image/jpeg' || 'image/png';
@@ -183,8 +195,8 @@ export default {
     },
      //上传成功
     handlepaymentSuccess(response,file, fileList){
-        console.log("上传图片:",file);
-        this.ruleForm.imgFileList.push({name:file.name,url:response.url});
+        let imgurl=location.protocol+"//"+location.host+process.env.VUE_APP_BASE_API+response.fileName;
+        this.ruleForm.imgFileList.push({name:file.name,url:imgurl});
     },
     onInstitutionChang(e){
       let obj = {};
@@ -196,7 +208,6 @@ export default {
     /** 进入信息 */
     look() {
       getStationPay().then(response => {
-        console.log("response,response:",response.data);
         this.ruleForm = response.data;
         if(response.data.imgFileList==null){
           this.ruleForm.imgFileList=[];

+ 8 - 24
Yijia-SaaS/yijia-ui/src/views/station/personnel/index.vue

@@ -1,25 +1,8 @@
 <template slot="header" slot-scope="scope">
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-
-      <el-form-item label="油站名称" prop="stationId" >
-        <el-select
-          v-model="queryParams.stationId"
-          placeholder="请选择油站"
-          clearable
-          size="small"
-        >
-          <el-option
-            v-for="item in stationOptions"
-            :key="item.deptId"
-            :label="item.deptName"
-            :value="item.deptId"
-          ></el-option>
-        </el-select>
-      </el-form-item>
-      <el-form-item>
+      <el-form-item style="float:right;">
         <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
         <el-button icon="el-icon-plus" size="mini" @click="handleAdd">添加</el-button>
       </el-form-item>
     </el-form>
@@ -47,7 +30,6 @@
         </template>
       </el-table-column>
     </el-table>
-
     <pagination
       v-show="total>0"
       :total="total"
@@ -154,6 +136,9 @@ export default {
       queryInfo: {
         stationId: null
       },
+      query:{
+        deptId: null
+      },
       // 表单参数
       form: {},
       // 表单校验
@@ -163,19 +148,18 @@ export default {
   },
   created() {
     this.getList();
-    stationinfo().then(response => {
+    this.query.deptId =this.$store.selectDeptId;
+    stationinfo(this.query).then(response => {
       this.stationOptions = response.rows;
     });
-    // //获取油枪 目前获取所有的,因为不能根据当前用户来确定当前油站
-    // selectGun().then(response => {
-    //   this.checkList = response.rows;
-    // });
   },
   methods: {
     /** 查询油站员工信息列表 */
     getList() {
       this.loading = true;
+      this.queryParams.stationId=this.$store.selectDeptId;
       listPersonnel(this.queryParams).then(response => {
+        this.queryParams.stationId=null;
         this.personnelList = response.rows;
         this.total = response.total;
         this.loading = false;

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

@@ -213,6 +213,7 @@ export default {
     /** 查询油品价格列表 */
     getList() {
       this.loading = true;
+      this.queryParams.stationId= this.$store.selectDeptId;
       listPrice(this.queryParams).then(response => {
         this.priceList = response.rows;
         this.total = response.total;

+ 4 - 2
Yijia-SaaS/yijia-ui/src/views/station/summary/index.vue

@@ -19,7 +19,7 @@
                         end-placeholder="结束日期">
         </el-date-picker>
       </el-form-item>
-      <el-form-item label="油站名称" prop="stationId">
+      <!-- <el-form-item label="油站名称" prop="stationId">
         <el-select
           v-model="queryParams.stationId"
           placeholder="请选择油站"
@@ -33,7 +33,7 @@
             :value="item.stationId"
           ></el-option>
         </el-select>
-      </el-form-item>
+      </el-form-item> -->
       <el-form-item label="班结人" prop="classesMan">
         <el-input
           v-model="queryParams.classesMan"
@@ -211,6 +211,7 @@ export default {
     /** 查询【请填写功能名称】列表 */
     getList() {
       this.loading = true;
+      this.queryParams.stationId=this.$store.selectDeptId;
       listSummary(this.addDateRange(this.queryParams, this.dateRangeCreatedDate)).then(response => {
         this.summaryList = response.rows;
         this.total = response.total;
@@ -261,6 +262,7 @@ export default {
     handleExport(row) {
       const classesNo = row.classesNo;
       this.queryParam.classStructureNo=classesNo;
+      this.queryParam.stationId=this.$store.selectDeptId;
       const queryParams = this.queryParam;
       this.$confirm('是否确认导出所有班结数据项?', "警告", {
         confirmButtonText: "确定",