src/components/view/b1-expenses.vue
@@ -49,7 +49,7 @@
    <div style="width: 100%;height: 100%;">
      <div>
        <el-row class="title">
          <el-col :span="12" style="padding-left: 20px;">费用统计</el-col>
          <el-col :span="12" style="padding-left: 20px;text-align: left;">费用统计</el-col>
          <el-col :span="12" style="text-align: right;">
            <el-button size="small" type="primary">OA推送</el-button>
          </el-col>
@@ -66,14 +66,15 @@
          </div>
        </div>
        <div class="search_thing">
          <div class="search_label">委托人:</div>
          <div class="search_label">委托单位:</div>
          <div class="search_input"><el-input size="small" placeholder="请输入" clearable
              v-model="componentData.entity.name" @keyup.enter.native="refreshTable()"></el-input></div>
              v-model="componentData.entity.company" @keyup.enter.native="refreshTable()"></el-input></div>
        </div>
        <div class="search_thing" style="padding-left: 30px;">
          <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"
@@ -102,7 +103,7 @@
      return {
        componentData: {
          entity: {
            name: null,
            company: null,
            dates: null,
            orderBy: {
              field: 'id,ins_sample_id',
@@ -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()
      }
    }
  }