Browse Source

修改班结信息,优惠劵信息

MS-QJVSRANLTYEO\Administrator 4 years ago
parent
commit
09ea56e070

+ 7 - 0
Yijia-SaaS/yijia-ui/src/api/station/structure.js

@@ -96,6 +96,13 @@ export function getAgeClassStructure(query) {
     params: query
   })
 }
+export function getPayOrderInfoMin(query) {
+  return request({
+    url: '/station/order/getPayOrderInfoMin',
+    method: 'get',
+    params: query
+  })
+}
 //初始化数据班结数据,根据员工汇总
 export function selectPersonnelStructure(query) {
   return request({

+ 81 - 81
Yijia-SaaS/yijia-ui/src/components/Breadcrumb/index.vue

@@ -1,81 +1,81 @@
-<template>
-  <el-breadcrumb class="app-breadcrumb" separator="/">
-    <transition-group name="breadcrumb">
-      <el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
-        <span v-if="item.redirect==='noRedirect'||index==levelList.length-1" class="no-redirect">{{ item.meta.title }}</span>
-        <a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a>
-      </el-breadcrumb-item>
-    </transition-group>
-  </el-breadcrumb>
-</template>
-
-<script>
-import pathToRegexp from 'path-to-regexp'
-
-export default {
-  data() {
-    return {
-      levelList: null
-    }
-  },
-  watch: {
-    $route(route) {
-      // if you go to the redirect page, do not update the breadcrumbs
-      if (route.path.startsWith('/redirect/')) {
-        return
-      }
-      this.getBreadcrumb()
-    }
-  },
-  created() {
-    this.getBreadcrumb()
-  },
-  methods: {
-    getBreadcrumb() {
-      // only show routes with meta.title
-      let matched = this.$route.matched.filter(item => item.meta && item.meta.title)
-      const first = matched[0]
-
-      if (!this.isDashboard(first)) {
-        matched = [{ path: '/index', meta: { title: '首页' }}].concat(matched)
-      }
-
-      this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)
-    },
-    isDashboard(route) {
-      const name = route && route.name
-      if (!name) {
-        return false
-      }
-      return name.trim() === '首页'
-    },
-    pathCompile(path) {
-      const { params } = this.$route
-      var toPath = pathToRegexp.compile(path)
-      return toPath(params)
-    },
-    handleLink(item) {
-      const { redirect, path } = item
-      if (redirect) {
-        this.$router.push(redirect)
-        return
-      }
-      this.$router.push(this.pathCompile(path))
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-.app-breadcrumb.el-breadcrumb {
-  display: inline-block;
-  font-size: 14px;
-  line-height: 50px;
-  margin-left: 8px;
-
-  .no-redirect {
-    color: #97a8be;
-    cursor: text;
-  }
-}
-</style>
+<template>
+  <el-breadcrumb class="app-breadcrumb" separator="/">
+    <transition-group name="breadcrumb">
+      <el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
+        <span v-if="item.redirect==='noRedirect'||index==levelList.length-1" class="no-redirect">{{ item.meta.title }}</span>
+        <a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a>
+      </el-breadcrumb-item>
+    </transition-group>
+  </el-breadcrumb>
+</template>
+
+<script>
+import pathToRegexp from 'path-to-regexp'
+
+export default {
+  data() {
+    return {
+      levelList: null
+    }
+  },
+  watch: {
+    $route(route) {
+      // if you go to the redirect page, do not update the breadcrumbs
+      if (route.path.startsWith('/redirect/')) {
+        return
+      }
+      this.getBreadcrumb()
+    }
+  },
+  created() {
+    this.getBreadcrumb()
+  },
+  methods: {
+    getBreadcrumb() {
+      // only show routes with meta.title
+      let matched = this.$route.matched.filter(item => item.meta && item.meta.title)
+      const first = matched[0]
+
+      if (!this.isDashboard(first)) {
+        matched = [{ path: '/dataSource/saleReport', meta: { title: '首页' }}].concat(matched)
+      }
+
+      this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)
+    },
+    isDashboard(route) {
+      const name = route && route.name
+      if (!name) {
+        return false
+      }
+      return name.trim() === '首页'
+    },
+    pathCompile(path) {
+      const { params } = this.$route
+      var toPath = pathToRegexp.compile(path)
+      return toPath(params)
+    },
+    handleLink(item) {
+      const { redirect, path } = item
+      if (redirect) {
+        this.$router.push(redirect)
+        return
+      }
+      this.$router.push(this.pathCompile(path))
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.app-breadcrumb.el-breadcrumb {
+  display: inline-block;
+  font-size: 14px;
+  line-height: 50px;
+  margin-left: 8px;
+
+  .no-redirect {
+    color: #97a8be;
+    cursor: text;
+  }
+}
+</style>

+ 8 - 7
Yijia-SaaS/yijia-ui/src/views/dataSource/dayReport.vue

@@ -101,13 +101,13 @@
           <el-table-column label="油品" align="center" prop="oilName" />
           <el-table-column label="油枪号" align="center" prop="oilGun" />
           <el-table-column label="销量(L)" align="center" prop="orderLiters" />
-          <el-table-column label="额(元)" align="center" prop="receivableAmt" />
-          <el-table-column label="优惠" align="center" prop="discountAmt" v-if="false" />
-          <el-table-column label="优惠卷" align="center" prop="discountCouponAmt" />
-          <el-table-column label="实收" align="center" prop="amt" />
+          <el-table-column label="应收金额(元)" align="center" prop="receivableAmt" />
+          <el-table-column label="实收金额(元)" align="center" prop="amt" />
+          <el-table-column label="优惠金额(元)" align="center" prop="discountAmt"  />
+          <el-table-column label="优惠劵" align="center" prop="discountCouponAmt" v-if="false"/>
           <el-table-column label="会员支付" align="center" prop="menberAmt" v-if="false" />
-          <el-table-column label="微信支付" align="center" prop="wxAmt" />
-          <el-table-column label="支付宝支付" align="center" prop="zfbAmt" />
+          <el-table-column label="微信支付" align="center" prop="wxAmt" v-if="false" />
+          <el-table-column label="支付宝支付" align="center" prop="zfbAmt"v-if="false" />
           <el-table-column label="会员充值" align="center" prop v-if="false" />
           <el-table-column label="积分消费" align="center" prop v-if="false" />
         </el-table>
@@ -188,7 +188,8 @@ export default {
         stationName: null,
         beginTime: null,
         endTime: null,
-        payDate: null
+        payDate: null,
+        status:"1"
       },
       // 查询参数
       queryInfo: {

+ 40 - 8
Yijia-SaaS/yijia-ui/src/views/dataSource/saleReport.vue

@@ -280,14 +280,46 @@ export default {
       });
       listViewData(this.queryParams).then(response => {
         if(response.hasOwnProperty('data')){
-          this.form.wxAmt = response.data.wxAmt;
-          this.form.zfbAmt = response.data.zfbAmt;
-          this.form.xjAmt = response.data.xjAmt;
-          this.form.didiAppAmt = response.data.didiAppAmt;
-          this.form.tyAppAmt = response.data.tyAppAmt;
-          this.form.otherAmt = response.data.otherAmt;
-          this.form.memberAmt = response.data.memberAmt;
-          this.form.posAmt = response.data.posAmt;
+          if(response.data.wxAmt){
+            this.form.wxAmt = response.data.wxAmt;
+          }else{
+            this.form.wxAmt = 0;
+          }
+          if(response.data.zfbAmt){
+            this.form.zfbAmt = response.data.zfbAmt;
+          }else{
+            this.form.zfbAmt = 0;
+          }
+          if(response.data.xjAmt){
+            this.form.xjAmt = response.data.xjAmt;
+          }else{
+            this.form.xjAmt = 0;
+          }
+          if(response.data.didiAppAmt){
+            this.form.didiAppAmt = response.data.didiAppAmt;
+          }else{
+            this.form.didiAppAmt = 0;
+          }
+          if(response.data.tyAppAmt){
+            this.form.tyAppAmt = response.data.tyAppAmt;
+          }else{
+            this.form.tyAppAmt = 0;
+          }
+          if(response.data.otherAmt){
+            this.form.otherAmt = response.data.otherAmt;
+          }else{
+            this.form.otherAmt = 0;
+          }
+          if(response.data.memberAmt){
+            this.form.memberAmt = response.data.memberAmt;
+          }else{
+            this.form.memberAmt = 0;
+          }
+          if(response.data.posAmt){
+            this.form.posAmt = response.data.posAmt;
+          }else{
+            this.form.posAmt = 0;
+          }
         }
       });
     },

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

@@ -19,10 +19,10 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="优惠名称" prop="couponName">
+      <el-form-item label="优惠名称" prop="couponName">
         <el-input
           v-model="queryParams.couponName"
-          placeholder="请输入优惠名称"
+          placeholder="请输入优惠名称"
           clearable
           size="small"
           @keyup.enter.native="handleQuery"
@@ -130,7 +130,7 @@
       <el-table-column label="有效期" align="center" prop="couponId" />
       <el-table-column label="油站编码" align="center" prop="stationNo" />
       <el-table-column label="油站名称" align="center" prop="stationName" />
-      <el-table-column label="优惠名称" align="center" prop="couponName" />
+      <el-table-column label="优惠名称" align="center" prop="couponName" />
       <el-table-column label="优惠劵规则" align="center" prop="couponRule" />
       <el-table-column label="优惠类型" align="center" prop="couponType" />
       <el-table-column label="优惠金额" align="center" prop="couponAmt" />
@@ -178,8 +178,8 @@
         <el-form-item label="油站名称" prop="stationName">
           <el-input v-model="form.stationName" placeholder="请输入油站名称" />
         </el-form-item>
-        <el-form-item label="优惠名称" prop="couponName">
-          <el-input v-model="form.couponName" placeholder="请输入优惠名称" />
+        <el-form-item label="优惠名称" prop="couponName">
+          <el-input v-model="form.couponName" placeholder="请输入优惠名称" />
         </el-form-item>
         <el-form-item label="优惠劵规则" prop="couponRule">
           <el-input v-model="form.couponRule" placeholder="请输入优惠劵规则" />

+ 11 - 7
Yijia-SaaS/yijia-ui/src/views/station/order/index.vue

@@ -93,7 +93,9 @@
       <el-table-column label="油品名称" align="center" prop="oilName" />
       <el-table-column label="油品价格" align="center" prop="oilPirce" />
       <el-table-column label="加油升数" align="center" prop="orderLiters" />
-      <el-table-column label="金额" align="center" prop="amt" />
+      <el-table-column label="应付金额" align="center" prop="receivableAmt" />
+      <el-table-column label="实付金额" align="center" prop="amt" />
+      <el-table-column label="优惠金额" align="center" prop="discountAmt" />
       <el-table-column label="消费者" width="120" align="center" prop="consumer" />
       <el-table-column label="加油员" width="120" align="center" prop="oilPersonnel" />
       <el-table-column label="加油枪号" align="center" prop="oilGun" />
@@ -152,7 +154,6 @@
         //字典
         payTypeOptions:[],
         payWayOptions:[],
-        payStatusOptions:[],
         //下拉油站
         stationOptions:[],
         // 弹出层标题
@@ -203,9 +204,6 @@
       this.getDicts("pay_way").then(response => {
         this.payWayOptions = response.data;
       });
-      this.getDicts("pay_status").then(response => {
-        this.payStatusOptions = response.data;
-      });
       stationinfo().then(response => {
         this.stationOptions = response.rows;
       });
@@ -215,8 +213,14 @@
     },
     methods: {
       payTypeFotmat(row, column){
-        if(row.payType === 'sxf'){
-          return '随行付'
+        if(row.payType === 'wx'){
+          return '微信支付'
+        }else if(row.payType === 'zfb'){
+          return '支付宝'
+        }else if(row.payType === 'xj'){
+          return '现金'
+        }else if(row.payType === 'POS'){
+          return 'POS机支付'
         }
       },
       payWayFotmat(row, column){

+ 45 - 2
Yijia-SaaS/yijia-ui/src/views/station/pay/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-      <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="110px">
+      <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="120px">
           <el-form-item label="支付模板"  prop="payMode">
             <el-upload
               action="http://localhost:8080/common/upload"
@@ -12,6 +12,25 @@
 <!--              </div>-->
             </el-upload>
           </el-form-item>
+        <el-form-item label="油站名称" prop="stationId" >
+          <el-select
+            v-model="ruleForm.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="personnelName">
+          <el-input v-model="ruleForm.stationName" placeholder="请输入油站名称" />
+        </el-form-item>
           <el-form-item label="支付页面形象照" >
             <el-radio-group v-model="ruleForm.imagePhotosFlag">
               <el-radio
@@ -47,16 +66,26 @@
               >{{dict.dictLabel}}</el-radio>
             </el-radio-group>
           </el-form-item>
+          <el-form-item label="小票打印模板" >
+            <el-radio-group v-model="ruleForm.printSetting">
+              <el-radio
+                v-for="dict in printSettingOptions"
+                :key="dict.dictValue"
+                :label="dict.dictValue"
+              >{{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>
-        <el-button @click="cancel">取 消</el-button>
+<!--        <el-button @click="cancel">取 消</el-button>-->
       </div>
   </div>
 </template>
 
 <script>
 import {addPay, updatePay,getStationPay} from "@/api/station/pay";
+import {stationinfo} from "@/api/station/gun";
 export default {
   name: "Pay",
   data() {
@@ -64,7 +93,9 @@ export default {
       // 遮罩层
       imagePhotosFlagOptions:[],
       wsPrintFlagOptions:[],
+      printSettingOptions:[],
       cardEnabledFlagOptions:[],
+      stationOptions:[],
       ruleForm:{
       },
       // 表单校验
@@ -77,14 +108,26 @@ export default {
     this.getDicts("image_photos_flag").then(response => {
       this.imagePhotosFlagOptions = response.data;
     });
+    stationinfo().then(response => {
+      this.stationOptions = response.rows;
+    });
     this.getDicts("ws_print_flag").then(response => {
       this.wsPrintFlagOptions = response.data;
     });
+    this.getDicts("print_setting_flag").then(response => {
+      this.printSettingOptions = response.data;
+    });
     this.getDicts("card_enabled_flag").then(response => {
       this.cardEnabledFlagOptions = response.data;
     });
   },
   methods: {
+    onInstitutionChang(e){
+      let obj = {};
+      obj = this.stationOptions.find((item)=>{//这里的userList就是上面遍历的数据源
+        return item.stationId === e;//筛选出匹配数据
+      })
+    },
     /** 进入信息 */
     look() {
       getStationPay().then(response => {

+ 11 - 3
Yijia-SaaS/yijia-ui/src/views/station/structure/index.vue

@@ -35,7 +35,7 @@
       <el-table-column label="支付宝笔数" align="center" prop="zfbNum" />
       <el-table-column label="现金笔数" align="center" prop="xjNum" />
       <el-table-column label="优惠" align="center" prop="discountAmt" />
-      <el-table-column label="优惠" align="center" prop="discountCouponAmt" />
+      <el-table-column label="优惠" align="center" prop="discountCouponAmt" />
       <el-table-column label="微信金额" align="center" prop="wxAmt" />
       <el-table-column label="支付宝金额" align="center" prop="zfbAmt" />
       <el-table-column label="现金金额" align="center" prop="xjAmt" />
@@ -53,7 +53,7 @@
 </template>
 
 <script>
-import { listPersonnelPayStructure,listClass,getAgeClassStructure,listPersonnelStructure,listOilStructure, addStructure,selectPersonnelStructure,selectPersonnelPayStructure,selectOilStructure} from "@/api/station/structure";
+import { listPersonnelPayStructure,listClass,getAgeClassStructure,listPersonnelStructure,listOilStructure, addStructure,getPayOrderInfoMin,selectPersonnelStructure,selectPersonnelPayStructure,selectOilStructure} from "@/api/station/structure";
 
 export default {
   name: "Structure",
@@ -105,9 +105,17 @@ export default {
       getAgeClassStructure().then(response => {
         if(response.hasOwnProperty('data')){
           this.opo.classStartDate = response.data.classStructureDate;
+        }else{
+          //查询第一比订单的创建时间
+          getPayOrderInfoMin().then(response1 => {{
+            console.log("response1",response1);
+            this.opo.classStartDate = response1.data.createdDate;
+          }});
         }
+        console.log("$store",this.$store);
+        console.log("state",this.$store.state);
+        console.log("user",this.$store.state.user);
         this.opo.classStructureMan =this.$store.state.user.name;
-        this.loading = false;
       });
       this.initPersonnelStructure();
       this.initOilStructure();