<template>
  <div class="app-container">

    <div class = "search-bx"  >
        <div class="search">
          <el-row :gutter="0">

              <el-button v-if="isBusinesstravelAdd" class="success" icon="el-icon-plus" @click="form_add">新增</el-button>


          </el-row>
        </div>

    </div>


    <div class="table"  >
      <el-table :key="tableObj.tableKey" v-loading="tableObj.listLoading" element-loading-text="给我一点时间" :data="tableObj.list" border fit highlight-current-row style="width: 100%;" :row-style="rowStyle" :cell-style="cellStyle" class="elTable table-fixed">
        <!-- <el-table-column type="selection" align="center" width="50" /> -->
        <el-table-column label="序号" align="center" type="index" width="50px"  fixed="left">
          <template slot-scope="scope">
            <span>{{ scope.$index + (tableObj.pageNum-1) * tableObj.pageSize + 1 }}</span>
          </template>
        </el-table-column>
        <el-table-column label="项目" min-width="120px" align="center" show-overflow-tooltip fixed="left">
          <template slot-scope="scope">
            <span  style = "color:#409EFF; cursor: pointer;" @click="form_see(scope.row)">{{ scope.row.travelCode  }}</span>
          </template>
        </el-table-column>
        <el-table-column label="问题总数量" min-width="110px" align="center"  fixed="left">
          <template slot-scope="scope">
            <span>{{ scope.row.statusName }}</span>
          </template>
        </el-table-column>
        <el-table-column label="待处理" min-width="90px" align="center"  fixed="left">
          <template slot-scope="scope">
            <span>{{ scope.row.employeeName }}</span>
          </template>
        </el-table-column>
        <el-table-column label="已处理" min-width="90px" align="center"  >
          <template slot-scope="scope">
            <span>{{ scope.row.reason }}</span>
          </template>
        </el-table-column>
        <el-table-column label="日期" min-width="110px" align="center">
          <template slot-scope="scope">
            <span>{{ scope.row.planBeginDate  }}</span>
          </template>
        </el-table-column>

        <el-table-column label="备注" min-width="120px" align="center" show-overflow-tooltip>
          <template slot-scope="scope">
            <span>{{ scope.row.remark }}</span>
          </template>
        </el-table-column>

        <el-table-column label="操作" align="center"  :width="autoWidth"  v-if="autoWidth !== 0"    class-name="small-padding fixed-width" fixed="right">
          <template slot-scope="{row}">


            <el-button class="miniSuccess" @click="form_edit(row)"  v-if="isBusinesstravelAdd ">编辑</el-button>
            <el-button class="miniDanger" @click="form_delete(row)" v-if="isBusinesstravelAdd  ">删除</el-button>


          </template>
        </el-table-column>
      </el-table>

      <!-- <el-row :gutter="0">
        <el-col :span="6" :offset="12" style="color:#f00">
          列表服务总金额：{{tableSumMoney}}
        </el-col>
      </el-row> -->

      <pagination v-show="tableObj.total>=0" :total="tableObj.total" :page.sync="tableObj.getdataListParm.offset" :limit.sync="tableObj.getdataListParm.pagecount" @pagination="get_table_data" />
    </div>

    <!-- 新增/编辑 -->
    <el-dialog :title="textMap[create.dialogStatus]" :visible.sync="create.dialogFormVisible" :close-on-click-modal="false" width="50%">
      <div class="app-add">
        <el-form ref="temp" :rules="create.rules" :model="create.temp" label-position="right" label-width="150px" style="width: 80%;margin:0 auto 50px">

          <el-form-item label="项目名称" prop="adress"  >
            <el-input ref="adress" v-model="create.temp.adress"   class="filter-item" style="width: 100%;"  :disabled="create.dialogStatus=='see'"   />
          </el-form-item>


           <el-form-item label="日期：" prop="serviceCost">
            <el-input ref="serviceCost" v-model="create.temp.serviceCost"  placeholder="请输入"   class="filter-item" style="width: 100%;"  disabled  />
          </el-form-item>


          <el-form-item label="备注：" prop="remark">
            <el-input ref="remark" v-model="create.temp.remark" type="textarea" :autosize="{ minRows: 4, maxRows: 8} "  :rows="8" placeholder="请输入备注，最多200个字" maxlength="200" class="filter-item" style="width: 100%;" :disabled="create.dialogStatus=='see'" />
          </el-form-item>


        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button class="cancelClose" @click="create.dialogFormVisible = false;get_table_data()">关闭</el-button>
          <el-button v-if="create.dialogStatus==='create' || create.dialogStatus==='update'" class="success" :disabled="isokDisable" @click="create.dialogStatus==='create'?add_dialog_save():form_edit_save()">确认</el-button>
        </div>
      </div>
    </el-dialog>


  </div>
</template>

<script>
import { GetDataByName, PostDataByName, failproccess, ExecDataByConfig, GetDataByNames, checkButtons, calculativeWidth, wxpush  } from '@/api/common'
import Cookies from 'js-cookie'
import {  parseTime, json2excel } from '@/utils/index.js'
import Pagination from '@/components/Pagination'
import { MessageBox } from 'element-ui'
export default {
  name: 'ProblemFeed',
  components: { Pagination },
  data() {
    return {

      employeid: Cookies.get('employeid'),
      isRoleEdit: [],isBusinesstravelAdd: [],

      send_select_list: [
        { name: 'getCustomerSelect', offset: 0, pagecount: 0, parammaps: {} },
        { name: 'getDictListSelect1', offset: 0, pagecount: 0, parammaps: { "pid": "54" } },
        { name: 'getUserFuzzy', offset: 0, pagecount: 0, parammaps: { "inputvalue": "" } },

      ],

      // 下拉框 - 客户名称
      customerNameList: [],

       // 下拉框 - 集团
      groupNameList: [],


      // 下拉框 - 出差人

      empNameList: [],

      // 下拉框 - 出差单
      statusNameList: [
        { "name": "草稿", "id": "草稿" },
        { "name": "一审中", "id": "一审中" },
        { "name": "二审中", "id": "二审中" },
        { "name": "三审中", "id": "三审中" },
        { "name": "审核通过", "id": "审核通过" },
        { "name": "已撤销", "id": "已撤销" },
        { "name": "被驳回", "id": "被驳回" },
      ],


      //表格 - 列表 - 查询
      tableObj: {
        getdataListParm: {
          name: 'getBusinessTravel',
          page: 1,
          offset: 1,
          pagecount: parseInt(Cookies.get('pagecount')),
          returntype: 'Map',
          parammaps: {
            roleId: Cookies.get('g_roleId'),
            userId: Cookies.get('g_userId'),


          }
        },
        tableKey: 0,
        list: [
          {
            id:1
          }
        ],
        total: 0,
        listLoading: false,
        temp: {}
      },
      tableSumMoney:1000,

      download: {
        getdataListParm: {
          name: 'getBusinessTravel',
          page: 1,
          offset: 1,
          pagecount: 0,
          returntype: 'Map',
          parammaps: {
            roleId: Cookies.get('g_roleId'),
            userId: Cookies.get('g_userId'),


          }
        },
        tableKey: 0,
        list: [
          {
            id:1
          }
        ],
        total: 0,
        listLoading: false,
        temp: {}
      },
      // 新增/编辑
      create: {
        dialogFormVisible: false,
        dialogStatus: '',
        temp: { customerId: '', groupId: '', groupName: '', employeeId: '', inputDatetime2: "", planBeginDate: "", planSuccessDate: "",   serviceCost: '', adress: '', reason: '', adress: '',remark: '', modifyName: '', id: ''  },

        rules: {
          // customerId: [{ required: true, message: '必填', trigger: 'blur' }],
          //  groupId: [{ required: true, message: '必填', trigger: 'blur' }],
           reason: [{ required: true, message: '必填', trigger: 'blur' }],
           adress: [{ required: true, message: '必填', trigger: 'blur' }],
           inputDatetime2: [{ required: true, message: '必填', trigger: 'blur' }],
          // content: [{ type: 'string', required: true, message: '必填', trigger: 'blur' }],
        },

        // 客户名称
        getdataListParmCust: {
          name: 'getCustomerByGroupId',
          returntype: 'Map',
          parammaps: { groupId: "" }
        },
        customerNameList:[],


      },


      textMap: {
        create: '新增',
        see: '查看',
        update: '编辑'
      },
      autoWidth: 130,
      requestParam: {},
      isokDisable: false,
      selectList: [],
      rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
      cellStyle: { padding: 0 + 'px' }
    }
  },

  created() {
    this.get_table_data()
    this.get_select_list()
    this.get_auto_buttons()
  },

  methods: {
    //获取按钮权限
    get_auto_buttons() {
      const Edit = 'BusinessTravel'
      const isRoleEdit = checkButtons(JSON.parse(sessionStorage.getItem('buttons')), Edit)
      this.isRoleEdit = isRoleEdit

      const BusinesstravelAdd = 'business:businesstravel:add'
      const isBusinesstravelAdd= checkButtons(this.$store.state.user.buttons, BusinesstravelAdd)
      this.isBusinesstravelAdd = isBusinesstravelAdd

      //操作的宽度
    // var widthCount = calculativeWidth(isBusinesstravelAdd,isBusinesstravelAdd)
    // this.autoWidth = widthCount
    },
    //获取所有下拉框的内容
    get_select_list() {
      GetDataByNames(this.send_select_list).then(response => {
        this.create.customerNameList = response.data.getCustomerSelect.list
        console.log("客户名称下拉框", this.create.customerNameList)
        this.groupNameList = response.data.getDictListSelect1.list
        console.log("集团下拉框", this.groupNameList)

        this.empNameList = response.data.getUserFuzzy.list
        console.log("出差人下拉框", this.empNameList)

      })

    },
    //加载表格
    get_table_data() {
      var me = this

      this.tableObj.listLoading = true
      console.log("this.tableObj.getdataListParm======>", this.tableObj.getdataListParm)
      GetDataByName(this.tableObj.getdataListParm).then(response => {
        console.log('table数据======>', response.data.list)
        if (response.data.list !== null) {

          this.tableObj.list = response.data.list
          this.tableObj.pageNum = response.data.pageNum
          this.tableObj.pageSize = response.data.pageSize
          this.tableObj.total = response.data.total

          //计算操作栏宽度
          var btnNum = 0
              var arrList = response.data.list
              arrList.forEach(function(row){
                  var itemBtnNum = 0
                  if(me.isBusinesstravelAdd && row.isModify == '1'){
                    itemBtnNum = itemBtnNum + 1
                  }
                  if(me.isBusinesstravelAdd && row.isDel  == '1'){
                    itemBtnNum = itemBtnNum + 1
                  }
                  if(me.isBusinesstravelAdd && row.isRevoke  == '1'){
                    itemBtnNum = itemBtnNum + 1
                  }


                  console.log(itemBtnNum)
                  if(itemBtnNum > btnNum){
                    btnNum = itemBtnNum
                  }
              })
              console.log("btnNum=============",btnNum)
              me.autoWidth = btnNum * 90

        } else {
          this.tableObj.list = []
        }
        setTimeout(() => {
          this.tableObj.listLoading = false
        }, 100)
      })

      var send_price = {
        name: 'getRemoteOfPrice',
        parammaps: this.tableObj.getdataListParm.parammaps
      }

      GetDataByName(send_price).then(response => {
        console.log('table总价格数据======>', response )
        if (response.data.list !== null) {
          this.tableSumMoney = response.data.list[0].totlePrice
        } else {
          this.tableSumMoney = ""
        }
      })

    },
    form_search() {
      console.log('点击了查询')

      if (this.tableObj.getdataListParm.parammaps.inputDatetime1 !== '' && this.tableObj.getdataListParm.parammaps.inputDatetime1 !== null) {
        this.tableObj.getdataListParm.parammaps.begainCreaterDate = parseTime(this.tableObj.getdataListParm.parammaps.inputDatetime1[0], '{y}-{m}-{d}')
        this.tableObj.getdataListParm.parammaps.endCreaterDate = parseTime(this.tableObj.getdataListParm.parammaps.inputDatetime1[1], '{y}-{m}-{d}')
      } else {
        this.tableObj.getdataListParm.parammaps.inputDatetime1 = ''
        this.tableObj.getdataListParm.parammaps.begainCreaterDate = ''
        this.tableObj.getdataListParm.parammaps.endCreaterDate = ''
      }

      if (this.tableObj.getdataListParm.parammaps.inputDatetime2 !== '' && this.tableObj.getdataListParm.parammaps.inputDatetime2 !== null) {
        this.tableObj.getdataListParm.parammaps.beginPlanBeginDate = parseTime(this.tableObj.getdataListParm.parammaps.inputDatetime2[0], '{y}-{m}-{d}')
        this.tableObj.getdataListParm.parammaps.endPlanBeginDate = parseTime(this.tableObj.getdataListParm.parammaps.inputDatetime2[1], '{y}-{m}-{d}')
      } else {
        this.tableObj.getdataListParm.parammaps.inputDatetime2 = ''
        this.tableObj.getdataListParm.parammaps.beginPlanBeginDate = ''
        this.tableObj.getdataListParm.parammaps.endPlanBeginDate = ''
      }

      if (this.tableObj.getdataListParm.parammaps.inputDatetime3 !== '' && this.tableObj.getdataListParm.parammaps.inputDatetime3 !== null) {
        this.tableObj.getdataListParm.parammaps.beginPlanSuccessDate = parseTime(this.tableObj.getdataListParm.parammaps.inputDatetime3[0], '{y}-{m}-{d}')
        this.tableObj.getdataListParm.parammaps.endPlanSuccessDate = parseTime(this.tableObj.getdataListParm.parammaps.inputDatetime3[1], '{y}-{m}-{d}')
      } else {
        this.tableObj.getdataListParm.parammaps.inputDatetime3 = ''
        this.tableObj.getdataListParm.parammaps.beginPlanSuccessDate = ''
        this.tableObj.getdataListParm.parammaps.endPlanSuccessDate = ''
      }


      this.tableObj.getdataListParm.offset = 1
      this.get_table_data()
    },

    // 新增
    form_reset() {
      this.create.temp = { customerId: '',customerName: "", groupId: '', groupName: '', employeeId: '', inputDatetime2: "", planBeginDate: "", planSuccessDate: "",   serviceCost: '', adress: '', reason: '', adress: '',remark: '', modifyName: '', id: ''  }
    },
    //客户失去焦点
    customer_search_blur(item) {
      console.log("客户失去焦点")
      this.tableObj.getdataListParm.parammaps.customerId = ""
      this.tableObj.getdataListParm.parammaps.customerName = ""
      this.customerNameList = []
    },

    //模糊查询客户
    customer_search(queryString, cb) {
      console.log('模糊查询输入值', queryString)
      GetDataByName({ name: 'getCustomerNameFuzzy', page: 1, offset: 1, pagecount: 10, returntype: 'Map', parammaps: { inputvalue: queryString } }).then(response => {
        this.customerNameList = response.data.list
        console.log("客户名称下拉框", response)
        cb(response.data.list)
      })
    },

    //模糊查询客户选择
    change_customer_select(item) {
      console.log('客户名称模糊查询选中值', item)
      this.tableObj.getdataListParm.parammaps.customerId = item.id
      this.tableObj.getdataListParm.parammaps.customerName = item.name
    },

    //清空客户选择
    clear_customer_select(item) {
      document.activeElement.blur()
      this.tableObj.getdataListParm.parammaps.customerId = ""
      this.tableObj.getdataListParm.parammaps.customerName = ""
    },

    //监听 - 集团
    change_group(item) {
      console.log(item)
      console.log(this.create.temp.groupId)
      this.create.temp.groupId = item
      this.create.getdataListParmCust.parammaps.groupId = item

      this.create.temp.customerName = ""
      this.create.temp.customerId = ""
      this.create.customerNameList = []

      this.get_customer_list()
      this.$forceUpdate();

    },
    // 弹窗中的客户
    get_customer_list() {
      GetDataByName(this.create.getdataListParmCust).then(response => {
        if (response.data.list !== null) {
          this.create.customerNameList = response.data.list
          console.log('弹窗中的客户数据', response.data.list)
        } else {
          this.create.customerNameList = []
        }
      })
    },


    //监听 - 下拉中客户名称
    change_customer(item) {
      console.log(item)
      this.create.temp.customerId = item

      this.create.temp.visitId = ""
      this.create.temp.telvisitId = ""

      this.get_groupName(item)


    },

    // 获取集团名称
    get_groupName(customerId) {
      var me = this
      var send_data = {
        name: 'getgroupNameById',  returntype: 'Map',  parammaps: {  id: customerId }
      }
      GetDataByName(send_data).then(response => {

        console.log(response)
        if (response.data.list !== null) {
           me.create.temp.groupName = response.data.list[0].groupName
           me.create.temp.groupId = response.data.list[0].groupId
        } else {
           me.create.temp.groupName = ""
           me.create.temp.groupId = ""
        }
      })
    },


    //监听 - 下拉中客户对接人
    changeReceiver(item) {
      this.create.temp.receiverName = this.create.receiverNameList.find(obj => obj.id === item).name
    },


    //新增
    form_add() {
      console.log('点击了新增')
      this.form_reset()
      this.create.dialogStatus = 'create'
      this.create.dialogFormVisible = true
    },
    //新增保存
    add_dialog_save() {
      console.log('点击了新增保存')
      this.isokDisable = true
      setTimeout(() => {
        this.isokDisable = false
      }, 1000)
      this.$refs['temp'].validate(valid => {
        if (valid) {
          this.isokDisable = true
          setTimeout(() => {
            this.isokDisable = false
          }, 1000)


          this.create.temp.createrId = Cookies.get('employeid')
          this.create.temp.employeeId = Cookies.get('employeid')

          if (this.create.temp.inputDatetime2 !== '' && this.create.temp.inputDatetime2 !== null) {
            this.create.temp.planBeginDate = parseTime(this.create.temp.inputDatetime2[0], '{y}-{m}-{d}')
            this.create.temp.planSuccessDate = parseTime(this.create.temp.inputDatetime2[1], '{y}-{m}-{d}')
          } else {
            this.create.temp.inputDatetime2 = ''
            this.create.temp.planBeginDate = ''
            this.create.temp.planSuccessDate = ''
          }


          var send_data =  {
            name: 'insertBusinessTravel',
            parammaps:  this.create.temp
          }


          console.log('新增保存发送参数', send_data)


            this.$confirm('是否提交审核?', '提示', {
              confirmButtonText: '确定',
              cancelButtonText: '取消',
              type: 'warning'
            }).then(() => {

                PostDataByName(send_data).then(response => {
                    if (response.msg !== 'fail') {
                      this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
                      this.create.dialogFormVisible = false
                      this.get_table_data()

                      var rowId = response.data.LastInsertId
                       this.get_wxPush(47,'出差',rowId)

                    } else {
                      this.$notify({ title: '失败', message: '保存失败', type: 'error', duration: 2000 })
                    }
                  })

            }).catch(() => {
              this.$message({
                type: 'info',
                message: '已取消'
              });
            })


        }
      })
    },
    // 查看
    form_see(row) {


      console.log('点击了查看',row)
        // this.$router.push({ name: 'problemFeedDetail', params: { rowData: row, isHome: 'home',codeNum:1 }})

      //这里把详情放同一个页面里切换写吧。。。。不要走路由，这个页面先暂停
      // this.$router.push({path: '/backend/order', query: {selected: "2"}});

      // this.$router.push({ name: '/businessManagement/problemFeedDetail/index', query:{stage: 111}})
      // this.create.temp = Object.assign({}, row)
      // this.create.temp.inputDatetime2 = [row.planBeginDate, row.planSuccessDate]


      // this.create.temp.id = row.id
      // this.create.dialogStatus = 'see'
      // this.create.dialogFormVisible = true


    },


    // 编辑
    form_edit(row) {
      console.log('点击了编辑', row)
      this.create.temp = Object.assign({}, row)
      this.create.temp.inputDatetime2 = [row.planBeginDate, row.planSuccessDate]

      // this.create.getdataListParmCust.parammaps.groupId = row.groupId
      // this.get_customer_list()


      this.create.temp.id = row.id
      this.create.dialogStatus = 'update'
      this.create.dialogFormVisible = true
    },

    // 编辑保存
    form_edit_save() {
      this.isokDisable = true
      setTimeout(() => {
        this.isokDisable = false
      }, 1000)
      this.$refs['temp'].validate(valid => {
        if (valid) {
          this.isokDisable = true
          setTimeout(() => {
            this.isokDisable = false
          }, 1000)

          this.create.temp.createrId = Cookies.get('employeid')
          this.create.temp.employeeId = Cookies.get('employeid')

          if (this.create.temp.inputDatetime2 !== '' && this.create.temp.inputDatetime2 !== null) {
            this.create.temp.planBeginDate = parseTime(this.create.temp.inputDatetime2[0], '{y}-{m}-{d}')
            this.create.temp.planSuccessDate = parseTime(this.create.temp.inputDatetime2[1], '{y}-{m}-{d}')
          } else {
            this.create.temp.inputDatetime2 = ''
            this.create.temp.planBeginDate = ''
            this.create.temp.planSuccessDate = ''
          }


          var send_data =  {
            name: 'updateBusinessTravel',
            parammaps:  this.create.temp
          }


          console.log('编辑保存发送参数', send_data)


            this.$confirm('是否提交审核?', '提示', {
              confirmButtonText: '确定',
              cancelButtonText: '取消',
              type: 'warning'
            }).then(() => {

                PostDataByName(send_data).then(response => {
                    if (response.msg !== 'fail') {
                      this.$notify({ title: '成功', message: '保存成功', type: 'success', duration: 2000 })
                      this.create.dialogFormVisible = false
                      this.get_table_data()

                      var rowId = this.create.temp.id
                       this.get_wxPush(47,'出差',rowId)

                    } else {
                      this.$notify({ title: '失败', message: '保存失败', type: 'error', duration: 2000 })
                    }
                  })

            }).catch(() => {
              this.$message({
                type: 'info',
                message: '已取消'
              });
            })


        }
      })
    },

    // 删除
    form_delete(row) {
      MessageBox.confirm('是否确认删除此信息?', {
        confirmButtonText: '确认', cancelButtonText: '取消', type: 'warning'
      }).then(() => {

          var send_data =  {
            name: 'delBusinessTravel',
            parammaps:  {
              id: row.id
            }
          }

        PostDataByName(send_data).then(response => {
          if (response.msg === 'fail') {
            this.$notify({ title: '删除失败', message: response.data, type: 'warning', duration: 2000 })
          } else {
            this.$notify({ title: '成功', message: '删除成功', type: 'success', duration: 2000 })
            this.get_table_data()
          }
        })
      }).catch(() => {
        this.$message({ type: 'info', message: '已取消删除' })
      })
    },


    // 导出
    form_export(item) {

       this.download.getdataListParm.parammaps = this.tableObj.getdataListParm.parammaps

       GetDataByName(this.download.getdataListParm).then(response => {
         if (response.data.list !== null) {
           this.download.list = response.data.list
         } else {
           this.download.list = []
         }
         var excelDatas = [
           {
             tHeader: ['序号', '出差单编号', '出差单状态', '出差人', '出差目的', '计划开始时间', '计划结束时间', '计划费用（元）', '目的地', '客户名称', '所属集团','备注' ],
             filterVal: ['sort','travelCode','statusName','employeeName','reason','planBeginDate','planSuccessDate','serviceCost','adress','customerName','groupName','remark' ],
             tableDatas: this.download.list,
             sheetName: 'Sheet1'
           }
         ]
         json2excel(excelDatas, '出差申请', true, 'xlsx')
       })

     },

    // 导入
    form_inport() {
      console.log('点击了导入')
    },

     //微信推送
     get_wxPush(remindId,remindTypeName,rowId){
                   var send_weixin_data1 = {
                        name: 'getRemindData',
                        parammaps: {
                          "userId":Cookies.get('g_userId'),
                          "remindId":remindId,
                          "remindTypeName":remindTypeName,
                          "rowId":rowId

                        }
                      }

                      GetDataByName(send_weixin_data1).then(response => {
                        console.log('微信推送(获取参数)======>', response )
                        if (response.data.message == 'ok') {
                          var receiverStr = response.data.list[0].receivers
                          var receiverArr = receiverStr.split(',')
                          var value1 = response.data.list[0].value1
                          var value2 = response.data.list[0].value2
                          var value3 = response.data.list[0].value3
                          var value4 = response.data.list[0].value4
                          var send_weixin_data2 = {
                            "target": receiverArr,
                            "serviceId": remindId,
                            "content": [
                              { "color": "#173177","value": value1 },
                              { "color": "#173177", "value": value2 },
                              { "color": "#173177", "value": value3 },
                              { "color": "#173177","value": value4 }
                            ]
                          }


                            wxpush(send_weixin_data2).then(response => {
                              console.log('微信推送(获取参数)======>', response )
                            })
                         // this.tableSumMoney = response.data.list[0].totlePrice
                        } else {
                          // this.$notify({ title: '失败', message: '消息推送失败', type: 'error', duration: 2000 })
                        }
                      })
     },


  }
}
</script>
<style lang="scss" scoped>
.search {
  padding-top: 10px;
  clear: both;
}
.table {
  margin-top: 10px;
}
</style>
