Blame view

src/views/ywbl/dbx/dbx.vue 6.36 KB
1
<template>
任超 committed
2 3
  <div class="from-clues">
    <div class="from-clues-header">
任超 committed
4
      <el-form :model="queryForm" ref="queryForm" @submit.native.prevent label-width="80px">
任超 committed
5 6 7
        <el-row>
          <el-col :span="5">
            <el-form-item label="业务来源">
任超 committed
8 9
              <el-select v-model="queryForm.ywly" class="width100" filterable
                @change="handleSelect('ywly', 'ywlymc', 'ywly')" clearable placeholder="请选择业务来源">
liangyifan committed
10
                <el-option v-for="item in dictData['ywly']" :key="item.dcode" :label="item.dname" :value="item.dcode">
任超 committed
11 12 13 14 15 16
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="5">
            <el-form-item label="权利类型">
任超 committed
17 18
              <el-select v-model="queryForm.qllx" class="width100" @change="handleSelect('A8', 'qllxmc', 'qllx')"
                filterable clearable placeholder="请选择权利类型">
liangyifan committed
19
                <el-option v-for="item in dictData['A8']" :key="item.dcode" :label="item.dname" :value="item.dcode">
任超 committed
20 21 22 23 24 25
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="5">
            <el-form-item label="登记类型">
任超 committed
26 27
              <el-select v-model="queryForm.djlx" class="width100" @change="handleSelect('A21', 'djlxmc', 'djlx')"
                filterable clearable placeholder="请选择登记类型">
liangyifan committed
28
                <el-option v-for="item in dictData['A21']" :key="item.dcode" :label="item.dname" :value="item.dcode">
任超 committed
29 30 31 32 33 34
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="5">
            <el-form-item label="业务号">
任超 committed
35
              <el-input placeholder="请输入业务号" v-model="queryForm.ywh" @clear="queryClick" clearable class="width100">
任超 committed
36 37 38
              </el-input>
            </el-form-item>
          </el-col>
jiaozeping@pashanhoo.com committed
39

40
          <el-col :span="4" class="btnColRight">
任超 committed
41
            <el-form-item>
任超 committed
42 43
              <el-button type="primary" native-type="submit" @click="queryClick">查询</el-button>
              <el-button @click="moreQueryClick">高级查询</el-button>
任超 committed
44 45 46
            </el-form-item>
          </el-col>
        </el-row>
任超 committed
47
        <el-row class="advanced-search">
任超 committed
48
          <span>搜索条件:</span>
任超 committed
49
          <ul>
任超 committed
50 51
            <li v-for="(item, index) in searchList" :key="index">
              {{ item.name }}:{{ item.value }}
任超 committed
52
              <i class="el-icon-circle-close" @click="handelItem(item, index)"></i>
任超 committed
53
            </li>
任超 committed
54
          </ul>
任超 committed
55
          <el-button class="clean-btn" type="text" v-if="searchList.length > 0" @click.native="hanldeCleanAll">清除全部
任超 committed
56
          </el-button>
任超 committed
57
        </el-row>
任超 committed
58
      </el-form>
59
    </div>
任超 committed
60
    <div class="from-clues-content">
任超 committed
61
      <lb-table :page-size="pageData.size" class="loadingtext" @sort-change="handleSort"
任超 committed
62
        :current-page.sync="pageData.currentPage" :heightNum="295" :total="tableData.total"
任超 committed
63 64
        @size-change="handleSizeChange" @p-current-change="handleCurrentChange" :column="tableData.columns"
        :data="tableData.data">
任超 committed
65 66
      </lb-table>
    </div>
任超 committed
67
    <searchBox v-model="isSearch" @getSearch="getSearch" />
任超 committed
68
  </div>
69 70
</template>
<script>
任超 committed
71
import { mapGetters } from 'vuex'
任超 committed
72 73 74 75
import searchBox from '../components/search.vue'
import table from "@/utils/mixin/table"
import searchMin from "../components/mixin/index"
import { datas, sendThis } from "./dbxdata"
任超 committed
76
import { searchTaskToDo, deleteFlow, claimTask } from "@/api/ywbl"
77 78
export default {
  name: "dbx",
任超 committed
79
  components: { searchBox },
任超 committed
80
  mixins: [table, searchMin],
liangyifan committed
81
  computed: {
任超 committed
82
    ...mapGetters(['dictData', 'transfer'])
liangyifan committed
83
  },
任超 committed
84
  data () {
85 86 87 88 89 90 91
    return {
      queryForm: {
        ywly: "",
        qllx: "",
        djlx: "",
        ywh: "",
      },
任超 committed
92 93 94 95 96 97
      searchForm: {
        ywlymc: '',
        qllxmc: '',
        djlxmc: '',
        ywh: ''
      },
任超 committed
98
      tableData: {
liangyifan committed
99
        total: 0,
任超 committed
100
        columns: datas.columns(),
liangyifan committed
101
        data: [],
任超 committed
102
      }
任超 committed
103
    }
任超 committed
104
  },
liangyifan committed
105 106
  mounted () {
    sendThis(this);
任超 committed
107
    this.queryClick()
liangyifan committed
108
  },
任超 committed
109 110 111 112 113 114 115
  watch: {
    queryForm: {
      handler (newName, oldName) {
      },
      immediate: true
    }
  },
任超 committed
116
  methods: {
liangyifan committed
117
    // 列表渲染接口
任超 committed
118 119
    queryClick () {
      this.$startLoading()
任超 committed
120
      this.searchForm.ywh = this.queryForm.ywh
任超 committed
121
      this.iterationData()
任超 committed
122
      searchTaskToDo({ ...this.queryForm, ...this.pageData }).then(res => {
任超 committed
123
        this.$endLoading()
liangyifan committed
124 125
        if (res.code === 200) {
          let { total, records } = res.result
任超 committed
126
          records.forEach(item => {
任超 committed
127 128 129 130
            item.qlrmc = item.qlrmc.join(',')
            item.ywh = item.ywh.join(',')
            item.zl = item.zl.join(',')
            item.fromstepdate = item.fromstepdate[0]
任超 committed
131 132
            item.qlrmcStr = item.qlrmc ? String(item.qlrmc) : ''
            item.ywrmcStr = item.ywrmc ? String(item.ywrmc) : ''
蔡俊立 committed
133
          })
任超 committed
134
          this.tableData.total = total ? total : 0
任超 committed
135
          this.tableData.data = records ? records : []
liangyifan committed
136 137 138
        }
      })
    },
任超 committed
139 140 141
    handleSort (val) {
      this.queryForm.sortField = val.prop
      this.queryForm.sortOrder = val.order == "ascending" ? 'asc' : 'desc'
任超 committed
142
      this.queryClick()
任超 committed
143
    },
liangyifan committed
144 145 146 147
    del (item) {
      let formdata = new FormData();
      formdata.append("bsmSlsq", item.bsmSlsq);
      this.$confirm('确定要删除吗, 是否继续?', '提示', {
任超 committed
148 149 150 151 152 153 154 155 156 157 158
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        deleteFlow(formdata).then(res => {
          if (res.code === 200) {
            this.handleDel()
            this.$message({
              type: 'success',
              message: '删除成功!'
            });
任超 committed
159
            this.queryClick()
任超 committed
160 161
          } else {
            this.$message.error(res.message);
任超 committed
162 163 164 165 166 167
          }
        })
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
任超 committed
168 169
        })
      })
jiaozeping@pashanhoo.com committed
170
    },
liangyifan committed
171
    ywhClick (item) {
任超 committed
172 173
      // const { href } = this.$router.resolve('/workFrame?bsmSlsq=' + item.bsmSlsq + '&bestepid=' + item.bestepid + '&bsmBusiness=' + '&sqywbm=' + item.djywbm);
      const { href } = this.$router.resolve('/workFramecs?bsmSlsq=' + item.bsmSlsq + '&bestepid=' + item.bestepid + '&bsmBusiness=' + '&sqywbm=' + item.djywbm);
任超 committed
174
      window.open(href, '_blank');
蔡俊立 committed
175
      //从待办箱进入的调取任务领取接口
任超 committed
176
      claimTask(item.bsmSlsq, item.bestepid)
任超 committed
177 178 179
    }
  }
}
180 181 182 183
</script>
<style scoped lang="scss">
@import "~@/styles/public.scss";
</style>