licp
2024-07-15 f265469d0504f7888fab731a6b9cb295e26f7adf
src/components/view/b1-expenses.vue
@@ -74,6 +74,7 @@
          <el-button size="small" @click="refresh()">重 置</el-button>
          <el-button size="small" type="primary" @click="refreshTable()">查 询</el-button>
        </div>
        <div class="search_thing" style="padding-left: 70px;">总价:{{total}}</div>
      </div>
      <div class="table">
        <ValueTable ref="ValueTable" :url="$api.insOrder.costStatistics" :componentData="componentData" :key="upIndex"
@@ -185,7 +186,8 @@
        upIndex: 0,
        claimVisible: false,
        dates: [],
        index2: 0
        index2: 0,
        total: 0
      }
    },
    mounted() {
@@ -195,6 +197,17 @@
      this.getPower()
    },
    methods: {
      getTotal(){
        this.$axios.post(this.$api.insOrder.costStatistics2, {
          entity:this.componentData.entity
        }, {
          headers: {
            'Content-Type': 'application/json'
          }
        }).then(res => {
          this.total = res.data.total
        })
      },
      getDates(){
        //当前月第一天
        var y = new Date().getFullYear(); //获取年份
@@ -215,11 +228,13 @@
      },
      refreshTable() {
        this.$refs['ValueTable'].selectList()
        this.getTotal()
      },
      refresh() {
        this.componentData.entity = this.HaveJson(this.entityCopy)
        this.componentData.init = true
        this.getDates()
        this.getTotal()
        this.upIndex++
      },
      handleWeave() {
@@ -255,6 +270,7 @@
        }
        this.componentData.entity.dates = JSON.stringify(val)
        this.$refs['ValueTable'].selectList()
        this.getTotal()
      }
    }
  }