<template>
  <div style="flex:1;" class="flex">
    <criteria-paged :model="model" v-ref:paged>
      <criteria partial='criteria' @condition-changed='$parent.selfSearch'
                v-ref:cri>
        <div novalidate class="auto form-horizontal select-overspread container-fluid auto" partial>
          <div class="row" v-show="$parent.$parent.criteriaShow">
            <div class="col-sm-2 form-group form-fix-width" >
              <label class="font_normal_body _zoom4"  >卡号</label>
              <input  type="text" class="form-control _zoom6" v-numfilter v-model="model.f_card_id"
                      condition="f_card_id = '{}' " placeholder="卡号">
            </div>
            <div class="col-sm-2 form-group form-fix-width" >
              <label class="font_normal_body _zoom4" >流水号</label>
              <input  type="text" class="form-control _zoom6" v-model="model.f_serial_id"
                      condition="f_serial_id = '{}' " placeholder="流水号">
            </div>
            <div class="col-sm-2 form-group form-fix-width" >
              <label class="font_normal_body _zoom4">扫码<br/>订单号</label>
              <input  type="text" class="form-control _zoom6" v-model="model.f_openpl_out_trade_no"
                      condition="f_openpl_out_trade_no = '{}' " placeholder="扫码订单号">
            </div>
            <div class="col-sm-2 form-group form-fix-width" >
              <label class="font_normal_body _zoom4" >用户姓名</label>
              <input  type="text" class="form-control _zoom6" v-model="model.f_user_name"
                      condition="f_user_name like '%{}%'" placeholder="用户姓名">
            </div>
            <div class="col-sm-2 form-group form-fix-width" >
              <label class="font_normal_body _zoom4"  >用户电话</label>
              <input  type="text" class="form-control _zoom6" v-model="model.f_user_phone"
                      condition="f_user_phone like '%{}%'" placeholder="用户电话">
            </div>
            <div class="col-sm-2 form-group form-fix-width" >
              <label class="font_normal_body _zoom4" >小区</label>
              <input type="text" class="form-control _zoom6" v-model="model.f_residential_area"
                     condition="f_residential_area like '%{}%'" placeholder="小区"/>
            </div>
            <div class="col-sm-2 form-group form-fix-width" >
              <label class="font_normal_body _zoom4" >用户地址</label>
              <input  type="text" class="form-control _zoom6" v-model="model.f_address"
                      condition="f_address like '%{}%'" placeholder='用户地址'>
            </div>
            <div class="col-sm-2 form-group form-fix-width" >
              <label class="font_normal_body _zoom4" >收费类型</label>
              <v-select :value.sync="model.f_type"
                        v-model="model.f_type"
                        multiple
                        :options='$parent.$parent.chargetype' placeholder='请选择'
                        condition="f_type in {}"
              ></v-select>
            </div>
            <div class="col-sm-2 form-group form-fix-width" >
              <label class="font_normal_body _zoom4" >用户类型</label>
              <v-select :value.sync="model.f_user_type"
                        :options='$parent.$parent.usertypes' placeholder='请选择' v-model="model.f_user_type"
                        condition="f_user_type = '{}'"
                        close-on-select></v-select>
            </div>
            <div class="col-sm-2 form-group form-fix-width" >
              <label class="font_normal_body _zoom4" >用气性质</label>
              <v-select :value.sync="model.f_gasproperties" v-model="model.f_gasproperties"
                        :options='$parent.$parent.gasproperties' placeholder='请选择'
                        condition="f_gasproperties = '{}'"
                        close-on-select></v-select>
            </div>
            <div class="col-sm-2 form-group form-fix-width" >
              <label class="font_normal_body _zoom4" >用气设备</label>
              <v-select :value.sync="model.f_devices_type"
                        v-model="model.f_devices_type"
                        multiple
                        :options='$parent.$parent.devicesties' placeholder='请选择'
                        condition="f_devices_type in {}"
              ></v-select>
            </div>
            <div class="col-sm-2 form-group form-fix-width" >
              <label class="font_normal_body _zoom4" >气价名称</label>
              <v-select :value.sync="model.f_price_name"
                        v-model="model.f_price_name"
                        :options='$parent.$parent.pricenames' placeholder='请选择'
                        condition="f_price_name = '{}'"
                        close-on-select></v-select>
            </div>
            <div class="col-sm-2 form-group form-fix-width" >
              <label class="font_normal_body _zoom4" >付款方式</label>
              <v-select :value.sync="model.f_payment"
                        v-model="model.f_payment"
                        multiple
                        :options='$parent.$parent.payments' placeholder='请选择'
                        condition="f_payment in {}"
              ></v-select></div>
            <div class="col-sm-2 form-group form-fix-width" >
              <label class="font_normal_body _zoom4" >打印格式</label>
              <v-select :value.sync="model.f_bill_style"
                        v-model="model.f_bill_style"
                        multiple
                        :options='$parent.$parent.printstyle' placeholder='请选择'
                        condition="f_bill_style in {}"
              ></v-select>
            </div>
            <div class="col-sm-2 form-group form-fix-width" >
              <label class="font_normal_body _zoom4" >气表类型</label>
              <v-select :value.sync="model.f_meter_type"
                        :options='$parent.$parent.metertypes' placeholder='请选择' v-model="model.f_meter_type"
                        condition="f_meter_type = '{}'"
                        close-on-select></v-select>
            </div>
            <div class="col-sm-2 form-group form-fix-width" >
              <label class="font_normal_body _zoom4" >气表品牌</label>
              <v-select :value.sync="model.f_meter_brand"
                        v-model="model.f_meter_brand"
                        :options='$parent.$parent.meterbrands' placeholder='请选择'
                        condition="f_meter_brand = '{}'"
                        close-on-select></v-select>
            </div>
            <div class="col-sm-2 form-group form-fix-width" >
              <label class="font_normal_body _zoom4" >气表状态</label>
              <v-select :value.sync="model.f_table_state"
                        v-model="model.f_table_state"
                        :options='$parent.$parent.tablestate' placeholder='请选择'
                        condition="f_table_state in {}"
                        close-on-select></v-select>
            </div>
            <div class="col-sm-2 form-group form-fix-width" >
              <label class="font_normal_body _zoom4" >收费状态</label>
              <v-select :value.sync="model.f_state"
                        v-model="model.f_state"
                        :options='$parent.$parent.charge_state' placeholder='请选择'
                        condition="f_state = '{}'"
                        close-on-select></v-select>
            </div>
            <div class="col-sm-2 form-group form-fix-width" >
              <label class="font_normal_body _zoom4" >购气量<br/>大于</label>
              <input type="number" class="form-control _zoom6"
                     v-model="model.buggasmax"
                     condition="f_pregas > {}" placeholder="购气量大于">
            </div>
            <div class="col-sm-2 form-group form-fix-width" >
              <label class="font_normal_body _zoom4" >购气量<br/>小于</label>
              <input type="number" class="form-control _zoom6"
                     v-model="model.buggasmin"
                     condition="f_pregas < {}" placeholder="购气量小于">
            </div>
            <div class="col-sm-2 form-group form-fix-width" >
              <label for="startDate" class="font_normal_body _zoom4" >建档开始</label>
              <datepicker id="startDate1" placeholder="建档开始日期"
                          class="_zoom6"
                          v-model="model.startDate1"
                          :value.sync="model.startDate1"
                          :format="'yyyy-MM-dd'"
                          :show-reset-button="true"
                          condition="f_createfile_date >= to_date('{} 00:00:00','yyyy-mm-dd hh24:mi:ss')">
              </datepicker>
            </div>
            <div class="col-sm-2 form-group form-fix-width" >
              <label for="endDate" class="font_normal_body _zoom4" >建档结束</label>
              <datepicker id="endDate1" placeholder="建档结束日期"  class="_zoom6"
                          v-model="model.endDate1"
                          :value.sync="model.endDate1"
                          :format="'yyyy-MM-dd'"
                          :show-reset-button="true"
                          condition="f_createfile_date <= to_date('{} 23:59:59','yyyy-mm-dd hh24:mi:ss')">
              </datepicker>
            </div>
            <div class="col-sm-2 form-group form-fix-width" >
              <label for="startDate" class="font_normal_body _zoom4" >开始日期</label>
              <datepicker id="startDate" placeholder="开始日期"  class="_zoom6"
                          v-model="model.startDate"
                          :value.sync="model.startDate"
                          :format="'yyyy-MM-dd'"
                          :show-reset-button="true"
                          condition="f_operate_date >= to_date('{} 00:00:00','yyyy-mm-dd hh24:mi:ss')">
              </datepicker>
            </div>
            <div class="col-sm-2 form-group form-fix-width" >
              <label for="endDate" class="font_normal_body _zoom4" >结束日期</label>
              <datepicker id="endDate" placeholder="结束日期"  class="_zoom6"
                          v-model="model.endDate"
                          :value.sync="model.endDate"
                          :format="'yyyy-MM-dd'"
                          :show-reset-button="true"
                          condition="f_operate_date <= to_date('{} 23:59:59','yyyy-mm-dd hh24:mi:ss')">
              </datepicker>
            </div>
            <div class="col-sm-2 form-group form-fix-width" >
              <label class="font_normal_body _zoom4" >是否开票</label>
              <v-select :value.sync="model.is_bill"
                        v-model="model.is_bill"
                        :options='$parent.$parent.billstates' placeholder='请选择'
                        condition="is_bill = '{}'"
                        close-on-select></v-select>
            </div>
            <div class="col-sm-2 form-group form-fix-width" >
              <label class="font_normal_body _zoom4" >发票编号</label>
              <input  type="text" class="form-control _zoom6" v-model="model.bill_num"

                      condition="bill_num = '{}'" placeholder="发票编号">
            </div>
            <div class="col-sm-2 form-group form-fix-width" >
              <label class="font_normal_body _zoom4" >售气单位</label>
              <v-select :value.sync="model.f_filiale"
                        v-model="model.f_filiale"
                        :options='$parent.$parent.filialelist' placeholder='请选择'
                        condition="f_filiale = '{}'"
                        close-on-select></v-select>
            </div>
            <div class="col-sm-2 form-group form-fix-width" >
              <label class="font_normal_body _zoom4" >售气部门</label>
              <v-select :value.sync="model.f_outlets"
                        v-model="model.f_outlets"
                        :options='$parent.$parent.selldep' placeholder='请选择'
                        condition="f_outlets = '{}'"
                        close-on-select></v-select>
            </div>
            <div class="col-sm-2 form-group form-fix-width" >
              <label class="font_normal_body _zoom4" >售气站点</label>
              <input  type="text" class="form-control _zoom6" v-model="model.op_spot"

                      condition="op_spot = '{}'" placeholder="售气站点">
            </div>
            <div class="col-sm-2 form-group form-fix-width" >
              <label class="font_normal_body _zoom4" >人员编号</label>
              <input  type="text" class="form-control _zoom6" v-model="model.op_id"

                      condition="op_id = '{}'" placeholder="操作员编号">
            </div>
          </div>
          <div class="row">
            <div  style="float:right" :class="{'_btnclitested':!$parent.$parent.criteriaShow}">
              <button class="btn btn-success" @click="search()">查询</button>
              <button class="btn btn-default" @click="$parent.$parent.clear()">清空</button>
              <!--<button class="btn btn-default" @click="$parent.$parent.stamp()">打印</button>-->

              <export-excel :data="$parent.$parent.getCondition"
                            :field="$parent.$parent.getfield"
                            sqlurl="rs/logic/exportfile" sql-name="chargeQuery" template-name='收费查询导出'  :choose-col="true"></export-excel>

              <print-data :model="$parent.model" :field="$parent.$parent.getfield" :defaultfield="$parent.$parent.defaultfield" print-name="收费查询" :sumsmodel="$parent.$parent.sumsmodel" ></print-data>
              <div
                :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
                @click="$parent.$parent.hidden()" class="button_spacing" style="float: right"></div>
            </div>
          </div>
        </div>
      </criteria>

      <data-grid  :model="model" partial='list' v-ref:grid >
        <template partial='head'>
          <tr>
            <th><nobr>卡号</nobr></th>
            <th><nobr>流水号</nobr></th>
            <th><nobr>旧流水号</nobr></th>
            <th><nobr>收费日期</nobr></th>
            <th><nobr>操作员</nobr></th>
            <th><nobr>售气单位</nobr></th>
            <th><nobr>售气部门</nobr></th>
            <th><nobr>售气站点</nobr></th>
            <th><nobr>操作员编号</nobr></th>
            <th><nobr>收费类型</nobr></th>
            <th><nobr>状态</nobr></th>
            <th><nobr>购气次数</nobr></th>
            <th><nobr>气量</nobr></th>
            <th><nobr>金额</nobr></th>
            <th><nobr>价钱</nobr></th>
            <th><nobr>气量【1】</nobr></th>
            <th><nobr>金额【1】</nobr></th>
            <th><nobr>单价【1】</nobr></th>
            <th><nobr>气量【2】</nobr></th>
            <th><nobr>金额【2】</nobr></th>
            <th><nobr>单价【2】</nobr></th>
            <th><nobr>气量【3】</nobr></th>
            <th><nobr>金额【3】</nobr></th>
            <th><nobr>单价【3】</nobr></th>
            <th><nobr>付款方式</nobr></th>
            <th><nobr>打印格式</nobr></th>
            <th><nobr>支付方式</nobr></th>
            <th><nobr>订单号</nobr></th>
            <th><nobr>用户类型</nobr></th>
            <th><nobr>用气性质</nobr></th>
            <th><nobr>用气设备</nobr></th>
            <th><nobr>是否开票</nobr></th>
            <th><nobr>发票编号</nobr></th>
          </tr>
        </template>
        <template partial='body'>
          <td style="text-align: center;"><nobr>
            <span @click="$parent.$parent.$parent.dealmsg(row)"><a>{{row.f_card_id}}</a></span></nobr>
          </td>
          <td style="text-align: center;"><nobr>{{row.f_serial_id}}</nobr></td>
          <td style="text-align: center;"><nobr>{{row.f_serial_id_old}}</nobr></td>
          <td style="text-align: center;"><nobr>{{row.f_operate_date}}</nobr></td>
          <td style="text-align: center;"><nobr>{{row.f_operator}}</nobr></td>
          <td style="text-align: center;"><nobr>{{row.f_filiale}}</nobr></td>
          <td style="text-align: center;"><nobr>{{row.f_outlets}}</nobr></td>
          <td style="text-align: center;"><nobr>{{row.op_spot}}</nobr></td>
          <td style="text-align: center;"><nobr>{{row.op_id}}</nobr></td>
          <td style="text-align: center;"><nobr>{{row.f_type}}</nobr></td>
          <td style="text-align: center;"><nobr>{{row.f_state}}</nobr></td>
          <td style="text-align: center;"><nobr>{{row.f_times}}</nobr></td>
          <td style="text-align: center;"><nobr>{{row.f_pregas}}</nobr></td>
          <td style="text-align: center;"><nobr>{{row.f_preamount}}</nobr></td>
          <td style="text-align: center;"><nobr>{{row.gdprice}}</nobr></td>
          <td style="text-align: center;"><nobr>{{row.gas1}}</nobr></td>
          <td style="text-align: center;"><nobr>{{row.money1}}</nobr></td>
          <td style="text-align: center;"><nobr>{{row.price1}}</nobr></td>
          <td style="text-align: center;"><nobr>{{row.gas2}}</nobr></td>
          <td style="text-align: center;"><nobr>{{row.money2}}</nobr></td>
          <td style="text-align: center;"><nobr>{{row.price2}}</nobr></td>
          <td style="text-align: center;"><nobr>{{row.gas3}}</nobr></td>
          <td style="text-align: center;"><nobr>{{row.money3}}</nobr></td>
          <td style="text-align: center;"><nobr>{{row.price3}}</nobr></td>
          <td style="text-align: center;"><nobr>{{row.f_payment}}</nobr></td>
          <td style="text-align: center;"><nobr>{{row.f_bill_style}}</nobr></td>
          <td style="text-align: center;"><nobr>{{row.f_pay_pass}}</nobr></td>
          <td style="text-align: center;"><nobr>{{row.f_openpl_out_trade_no}}</nobr></td>
          <td style="text-align: center;"><nobr>{{row.f_user_type}}</nobr></td>
          <td style="text-align: center;"><nobr>{{row.f_gasproperties}}</nobr></td>
          <td style="text-align: center;"><nobr>{{row.f_devices_type}}</nobr></td>
          <td style="text-align: center;"><nobr>{{row.is_bill}}</nobr></td>
          <td style="text-align: center;"><nobr>{{row.bill_num}}</nobr></td>
        </template>
        <template partial='foot'></template>
      </data-grid>

    </criteria-paged>

    <table class="table-hover">
      <tr class="table-bordered">
        <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">汇总信息</td>
        <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">气量合计:&emsp;{{sumsmodel.f_pregas}}</td>
        <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">金额合计:&emsp;{{sumsmodel.f_preamount}}</td>
        <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">1阶气量:&emsp;{{sumsmodel.gas1}}</td>
        <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">1阶金额:&emsp;{{sumsmodel.money1}}</td>
        <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">2阶气量:&emsp;{{sumsmodel.gas2}}</td>
        <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">2阶金额:&emsp;{{sumsmodel.money2}}</td>
        <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">3阶气量:&emsp;{{sumsmodel.gas3}}</td>
        <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">3阶金额:&emsp;{{sumsmodel.money3}}</td>
      </tr>
    </table>

  </div>
</template>

<script>
  import { PagedList } from 'vue-client'
  import defaultPrint from '../config/DefaultPrint'
  import exportConfig from '../config/exportConfig'

  let readySomething = async function (self) {
    console.log('收费查询获取默认配置', self.config)
    self.defaultfield = [...self.defaultfield, ...self.config.defaultPrint]
    self.$refs.paged.$refs.cri.model.startDate = self.$login.toStandardDateString()
    self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString()
    self.$refs.paged.$refs.cri.model.f_state = ['有效']
    await self.$MagLoadParams.loadParam(self.$login.f)
    self.initParams()
    /* await self.$refs.paged.$refs.cri.search()
     self.sumsmodel = self.$refs.paged.$refs.grid.model.sums*/
  }
  export default {
    data() {
      return {
        config: {
          defaultPrint: ['f_userinfo_code', 'f_address', 'f_pregas', 'f_preamount']
        },
        showinfo: false,
        data: {},
        model: new PagedList('rs/sql/chargeQuery', 20,{
          startDate: 'this.model.startDate',
          endDate:  'this.model.endDate'
        },{
          f_pregas: 0,f_preamount: 0,f_delaypay:0,f_collection: 0,
          gas1:0,money1:0,
          gas2:0,money2:0,
          gas3:0,money3:0
        }),
        criteriaShow: true,
        filialeNameStr: null,
        filialeCodeStr: this.$login.f.f_orgids,
        userid: this.$login.f.id,
        source:`tool.getFullTree(this.getRights().where(row.getType() != $zone$).where(row.getType() != $role$))`,
        modelval: [],
        printshow: false,
        all: false,
        fields: {},
        thead: '',
        tfoot: '',
        // 下拉框
        meterbrands: [],
        pricenames: [],
        usertypes: this.$appdata.getParam('用户类型') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')] : [],
        metertypes: this.$appdata.getParam('气表类型') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('气表类型')] : [],
        tablestate: this.$appdata.getParam('表状态') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('表状态')] : [],
        devicesties: this.$appdata.getParam('设备类型') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('设备类型')] : [],
        chargetype: this.$appdata.getParam('收费类型') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('收费类型')] : [],
        payments: this.$appdata.getParam('付款方式查询') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('付款方式查询')] : [],
        printstyle: this.$appdata.getParam('打印格式') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('打印格式')] : [],
        charge_state: this.$appdata.getParam('收费状态') ? [{label: '全部', value: ''},...this.$appdata.getParam('收费状态')] : [],
        filialelist: this.$appdata.getParam('售气单位') ? [{label: '全部', value: ''},...this.$appdata.getParam('售气单位')] : [],
        billstates:  [{label: '全部', value: ''},{label: '是', value: '是'}],
        //合计数据
        defaultfield: [],
        sumsmodel: {}
      }
    },
    ready(){
      readySomething(this).then(() => {
        this.$emit('ready')
      }).catch((error) => {
        this.$emit('error', error)
      })
    },
    methods: {
      initParams () {
        // 初始化气表品牌
        let brandArr = []
        this.$MagGetSaleParam.getGasbrand().forEach((item) => {
          let temp = {}
          temp.label = item.label
          temp.value = item.value.f_meter_brand
          brandArr.push(temp)
        })
        this.meterbrands = [{label: '全部', value: ''}, ...brandArr]
        // 初始化气价信息
        console.log('初始化气价。。', this.$MagGetSaleParam.getPrice())
        let priceArr = []
        this.$MagGetSaleParam.getPrice().forEach((item) => {
          let temp = {}
          temp.label = item.label
          temp.value = item.value.f_price_name
          priceArr.push(temp)
        })
        this.pricenames = [{label: '全部', value: ''}, ...priceArr]
      },
      selfSearch (args) {
        this.model.search(args.condition, args.model)
        this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
      },
      clear(){
        Object.keys(this.$refs.paged.$refs.cri.model).forEach((key) => {
          this.$refs.paged.$refs.cri.model[key] = []
        })
      },
      dealmsg (val) {
        console.log('---------------dealmsg')
        val.model = this.model.model
        this.$dispatch('deal-msg',val)
      },
      show(){
        this.criteriaShow = true
      },
      hidden(){
        this.criteriaShow = !this.criteriaShow
      },
      stamp () {
        this.all = false
        //默认选择要打印的列
        this.modelval = defaultPrint.config
        this.fields = this.getfield
        console.log('所有打印字段',this.fields)
        this.printshow = true
        this.put()
      },
      put () {
        // 对Modelval进行排序
        this.sortModelval()
        this.thead = `<tr><th colspan=${this.modelval.length}>收费查询统计报表</th></tr><tr>`
        for (let key of this.modelval) {
          this.thead += '<th>' + this.fields[key] + '</th>'
        }
        this.thead += '</tr>'
      },
      print () {
        this.$refs.print.PrintAsFile()
        this.printshow = false
      },
      close () {
        this.printshow = false
        this.all = false
      },
      // 对选择的列进行排序
      sortModelval () {
        let sortModel = []
        Object.keys(this.fields).forEach((key) => {
          if (this.modelval.includes(key)) {
            sortModel.push(key)
          }
        })
        this.modelval = sortModel
        console.log('选择的打印的字段', this.modelval)
      }
    },
    watch:{
      'all' (val) {
        if (val) {
          this.modelval = this.bodyData
        } else {
          this.modelval = defaultPrint.config
          this.put()
        }
      },
      'modelval.length' () {
        this.put()
      },
    },
    computed:{
      getCondition(){
        return {
          condition: `${this.$refs.paged.$refs.cri.condition} `,
          startDate: this.$refs.paged.$refs.cri.model.startDate,
          endDate:  this.$refs.paged.$refs.cri.model.endDate
        }
      },
      getfield(){
        return exportConfig.chargeConfig
      },
      selldep () {
        let rs = []
        if(this.$refs.paged.$refs.cri.model.f_filiale){
          this.$refs.paged.$refs.cri.model.f_outlets = ''
          return [{label: '全部', value: ''}, ...this.$appdata.getParam(this.$refs.paged.$refs.cri.model.f_filiale) ]
        }
        else {
          return [{label: '全部', value: ''}]
        }
      },
      gasproperties () {
        let rs = []
        if (this.$refs.paged.$refs.cri.model.f_user_type.length === 1) {
          rs = this.$appdata.getParam(this.$refs.paged.$refs.cri.model.f_user_type[0])
        }
        return [{label: '全部', value: ''}, ...rs]
      },
    }
  }
</script>
