Ver código fonte

油品调价记录完成

Joe 4 anos atrás
pai
commit
83792e2fe2

+ 3 - 3
src/views/station/adjustment.vue → src/views/station/adjustment/adjust.vue

@@ -104,12 +104,12 @@
     <el-dialog
       title="油品调价"
       :visible.sync="updataOpen"
-      width="500px"
+      width="400px"
       append-to-body
     >
       <el-form ref="updataForm" :model="updataForm" :rules="updataRules"  label-width="80px">
         
-        <el-form-item label="油品" prop="oilName" width="50px">
+        <el-form-item label="油品" prop="oilName" width="80px">
           {{updataForm.oilName}}
         </el-form-item>
         <el-form-item label="调整价格" prop="oilAdjustPrice">
@@ -166,7 +166,7 @@ import { getDept } from "@/api/system/dept";
 import { stationinfo } from "@/api/station/gun";
 import { queryOilType } from "@/utils/oil"
 export default {
-  name: "adjustment",
+  name: "adjust",
   data() {
     const validateOilPrice = (rule, value, callback) => {
       // 判断是不是非油品

+ 36 - 0
src/views/station/adjustment/index.vue

@@ -0,0 +1,36 @@
+<template>
+  <div class="tabZujian">
+    <el-tabs v-model="activeName" >
+      <el-tab-pane label="油站信息" name="adjust" key="adjust">
+        <adjust/>
+      </el-tab-pane>
+      <el-tab-pane label="支付配置" name="record" key="record">
+        <record/>
+      </el-tab-pane>
+    </el-tabs>
+  </div>
+</template>
+<script>
+  import adjust from './adjust'
+  import record from './record'
+  export default {
+    name: 'adjustment',
+    components:{
+      adjust,
+      record
+    },
+    data() {
+      return {
+        activeName: 'adjust'
+      };
+    },
+    methods: {
+    }
+  };
+</script>
+<style>
+  .tabZujian {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
+</style>

+ 122 - 0
src/views/station/adjustment/record.vue

@@ -0,0 +1,122 @@
+<template>
+  <div class="app-container">
+    <el-table :data="adjustList">
+      <el-table-column
+        label="调价自增主键id"
+        v-if="false"
+        align="center"
+        prop="adjustPriceId"
+      />
+      <el-table-column label="油品名称" align="center" prop="oilName" />
+      <el-table-column label="调整价格" align="center" prop="oilAdjustPrice" />
+      <!--
+      <el-table-column
+        label="生效状态"
+        align="center"
+        prop="takeEffectStatus"
+        :formatter="statusFormat"
+      />
+      -->
+      <el-table-column
+        label="生效状态"
+        align="center"
+        prop="deviceStatus"
+      >
+        <template slot-scope="scope">
+          {{scope.row.takeEffectStatus == "1" ? "立即生效":"定时生效"}}
+        </template>
+      </el-table-column>
+
+      <el-table-column
+        label="生效时间"
+        align="center"
+        prop="takeEffectDate"
+        width="180"
+      />
+      <el-table-column
+        label="调价时间"
+        align="center"
+        prop="adjustDate"
+        width="180"
+      />
+      <el-table-column
+        label="油站id"
+        v-if="false"
+        align="center"
+        prop="stationId"
+      />
+      <el-table-column label="油站名称" align="center" prop="stationName" />
+      <el-table-column label="操作员" align="center" prop="operator" />
+    </el-table>
+
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+  </div>
+</template>
+
+<script>
+import { listAdjust } from "@/api/station/adjust";
+import { stationinfo } from "@/api/station/gun";
+
+export default {
+  name: "Adjust",
+  data() {
+    return {
+      // 总条数
+      total: 0,
+      // 油品调价信息表格数据
+      adjustList: [],
+      takeEffectStatusOptions: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        oilName: null,
+        oilAdjustPrice: null,
+        takeEffectStatus: null,
+        takeEffectDate: null,
+        adjustDate: null,
+        stationId: null,
+        stationName: null,
+        operator: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {},
+    };
+  },
+  created() {
+    this.getList();
+    this.getDicts("take_effect_status").then((response) => {
+      this.takeEffectStatusOptions = response.data;
+    });
+  },
+  methods: {
+    /** 查询油品调价信息列表 */
+    getList() {
+      this.queryParams.stationId = this.deptId;
+      listAdjust(this.queryParams).then((response) => {
+        this.adjustList = response.rows;
+        this.total = response.total;
+      });
+    },
+    // 菜单状态字典翻译
+    statusFormat(row, column) {
+      return this.selectDictLabel(
+        this.takeEffectStatusOptions,
+        row.takeEffectStatus
+      );
+    },
+  },
+};
+</script>