Blame view

src/views/jsbwcx/index.vue 8.66 KB
任超 committed
1 2 3
<template>
  <!-- 接收报文查询 -->
  <div class="reportLog from-clues">
任超 committed
4
    <!-- 头部搜索 -->
任超 committed
5 6
    <div class="from-clues-header">
      <el-form ref="ruleForm" :model="form" label-width="100px">
7 8 9
        <el-form-item>
          <Breadcrumb />
        </el-form-item>
10
        <el-row class="mb-5">
任超 committed
11
          <el-col :span="6">
田浩浩 committed
12 13
            <el-form-item label="行政区" prop="qxdm">
              <el-select v-model="form.qxdm" class="width100" clearable placeholder="行政区">
田浩浩 committed
14
                <el-option v-for="item in dicData['A20']" :key="item.DCODE" :label="item.DNAME" :value="item.DCODE">
田浩浩 committed
15
                </el-option>
任超 committed
16 17 18 19
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="6">
任超 committed
20
            <el-form-item label="接收日期" prop="receiveStartTime">
任超 committed
21
              <el-date-picker type="date" class="width100" placeholder="开始日期" :picker-options="pickerOptionsStart"
22
                clearable v-model="form.receiveStartTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
任超 committed
23 24 25
            </el-form-item>
          </el-col>
          <el-col :span="6">
任超 committed
26
            <el-form-item label="至" prop="receiveEndTime" label-width="35px">
任超 committed
27
              <el-date-picker type="date" class="width100" placeholder="结束日期" :picker-options="pickerOptionsEnd"
28
                clearable v-model="form.receiveEndTime" value-format="yyyy-MM-dd HH:mm:ss"
任超 committed
29
                @change="endTimeChange"></el-date-picker>
任超 committed
30 31 32 33
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="不动产单元号" prop="bdcdyh">
34
              <el-input v-model.trim="form.bdcdyh" clearable class="width100" placeholder="不动产单元号"></el-input>
任超 committed
35 36 37
            </el-form-item>
          </el-col>
        </el-row>
任超 committed
38
        <el-row class="mt-10">
任超 committed
39
          <el-col :span="6">
yangwei committed
40 41
            <el-form-item label="业务流水号" prop="ywh">
              <el-input v-model.trim="form.ywh" clearable class="width100" placeholder="业务流水号"></el-input>
田浩浩 committed
42 43 44 45
            </el-form-item>
          </el-col>
          <el-col :span="3">
            <el-form-item label="权利类型" prop="qllx">
田浩浩 committed
46
              <el-select v-model="form.qllx" class="width100" clearable placeholder="权利类型">
田浩浩 committed
47
                <el-option v-for="item in dicData['A8']" :key="item.DCODE" :label="item.DNAME" :value="item.DCODE">
任超 committed
48 49 50 51
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
田浩浩 committed
52 53
          <el-col :span="3">
            <el-form-item label="登记类型" prop="djlx">
田浩浩 committed
54
              <el-select v-model="form.djlx" class="width100" clearable placeholder="登记类型">
田浩浩 committed
55 56 57 58 59 60
                <el-option v-for="item in dicData['A21']" :key="item.DCODE" :label="item.DNAME" :value="item.DCODE">
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="3">
任超 committed
61 62
            <el-form-item label="检查结果" prop="jcjg">
              <el-select v-model="form.jcjg" class="width100" clearable placeholder="检查结果">
田浩浩 committed
63
                <el-option v-for="item in dicData['sysSjsbCkeck']" :key="item.DCODE" :label="item.DNAME"
田浩浩 committed
64
                  :value="item.DCODE">
任超 committed
65 66
                </el-option>
              </el-select>
田浩浩 committed
67

任超 committed
68 69
            </el-form-item>
          </el-col>
田浩浩 committed
70
          <el-col :span="3">
任超 committed
71 72
            <el-form-item label="入库结果" prop="rkjg">
              <el-select v-model="form.rkjg" class="width100" clearable placeholder="入库结果">
田浩浩 committed
73
                <el-option v-for="item in dicData['sysSjsbStorage']" :key="item.DCODE" :label="item.DNAME"
田浩浩 committed
74
                  :value="item.DCODE">
任超 committed
75 76 77 78
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
任超 committed
79
          <!-- 按钮操作 -->
任超 committed
80 81
          <el-col :span="6" class="btnColRight">
            <el-form-item>
yangwei committed
82
              <btn nativeType="cz" @click="resetForm">重置</btn>
任超 committed
83
              <btn nativeType="cx" @click="handleSearch">查询</btn>
84
              <btn nativeType="cx">存量导入</btn>
任超 committed
85 86 87 88 89
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </div>
任超 committed
90
    <!-- 列表区域 -->
任超 committed
91
    <div class="from-clues-content">
田浩浩 committed
92
      <lb-table ref="table" :page-size="pageData.size" :current-page.sync="pageData.current" :total="tableData.total"
任超 committed
93 94
        @size-change="handleSizeChange" @p-current-change="handleCurrentChange" :column="tableData.columns"
        :data="tableData.data">
任超 committed
95 96
      </lb-table>
    </div>
任超 committed
97
    <!-- 编辑 -->
任超 committed
98
    <dataDetails ref="editLog" :title="title" :visiableXml="true" />
任超 committed
99 100 101 102
  </div>
</template>

<script>
任超 committed
103 104
// 接收报文查询
// 引入表格头部数据
田浩浩 committed
105
import data from "./data";
任超 committed
106
// 引入table混入方法
田浩浩 committed
107
import tableMixin from "@/mixins/tableMixin.js";
108
import { getReceiveDataReportPage } from "@/api/dataReport.js";
任超 committed
109
// 引入详情弹框
110
import dataDetails from "@/components/EditDialog";
yangwei committed
111
//引入日期处理方法
任超 committed
112
import { timeFormat } from "@/utils/operation";
任超 committed
113
export default {
任超 committed
114
  name: "jsbwcx",
任超 committed
115
  mixins: [tableMixin],
任超 committed
116 117 118 119
  // 注册组件
  components: {
    dataDetails,
  },
任超 committed
120
  data () {
任超 committed
121 122 123
    return {
      pickerOptionsStart: {
        disabledDate: (time) => {
任超 committed
124 125 126
          let endDateVal = this.form.receiveEndTime;
          if (endDateVal) {
            return (
yangwei committed
127
              time.getTime() >=
任超 committed
128
              new Date(endDateVal).getTime()
任超 committed
129
            );
任超 committed
130
          }
田浩浩 committed
131
        },
任超 committed
132 133 134
      },
      pickerOptionsEnd: {
        disabledDate: (time) => {
任超 committed
135 136 137 138
          let beginDateVal = this.form.receiveStartTime;
          if (beginDateVal) {
            return (
              time.getTime() <
yangwei committed
139
              new Date(beginDateVal).getTime()
任超 committed
140
            );
任超 committed
141
          }
田浩浩 committed
142
        },
任超 committed
143
      },
任超 committed
144
      // 表格数据
任超 committed
145
      form: {
田浩浩 committed
146 147 148
        qxdm: "", // 行政区
        receiveStartTime: "", // 开始日期
        receiveEndTime: "", // 结束日期
田浩浩 committed
149
        bdcdyh: "", // 不动产单元号
田浩浩 committed
150 151 152
        ywh: "", // 业务号
        qllx: "", // 权利类型
        djlx: "", // 登记类型
田浩浩 committed
153 154
        jcjg: "", // 检查结果
        rkjg: "", //入库结果
任超 committed
155
        currentPage: 1
任超 committed
156
      },
任超 committed
157
      // 校验规则
任超 committed
158
      rules: {
田浩浩 committed
159
        pcode: [{ required: true, message: "请选择行政区", trigger: "change" }],
任超 committed
160
        startTime: [
田浩浩 committed
161
          { required: true, message: "请选择开始日期", trigger: "change" },
任超 committed
162 163
        ],
        endTime: [
田浩浩 committed
164
          { required: true, message: "请选择结束日期", trigger: "change" },
任超 committed
165 166
        ],
        bdcdyh: [
田浩浩 committed
167
          { required: true, message: "不动产单元号", trigger: "change" },
任超 committed
168
        ],
田浩浩 committed
169 170 171
        ywmc: [{ required: true, message: "业务名称", trigger: "change" }],
        jcjg: [{ required: true, message: "检查结果", trigger: "change" }],
        rkjg: [{ required: true, message: "入库结果", trigger: "change" }],
任超 committed
172
      },
任超 committed
173
      // 表格数据
任超 committed
174
      tableData: {
任超 committed
175
        // 表格头部
田浩浩 committed
176
        columns: [
任超 committed
177
          {
田浩浩 committed
178 179 180 181
            label: "序号",
            type: "index",
            width: "50",
            index: this.indexMethod,
任超 committed
182
          }
田浩浩 committed
183 184 185 186 187
        ]
          .concat(data.columns())
          .concat([
            {
              label: "操作",
188
              width: "90",
田浩浩 committed
189 190 191 192 193 194 195 196 197 198 199 200
              render: (h, scope) => {
                return (
                  <div>
                    <el-button
                      type="primary"
                      onClick={() => {
                        this.handleEdit(scope.row);
                      }}
                    >
                      详情
                    </el-button>
                  </div>
任超 committed
201 202 203
                )
              }
            }
田浩浩 committed
204
          ]),
任超 committed
205
        // 表格列表数据
任超 committed
206
        total: 0,
任超 committed
207
        data: [],
任超 committed
208
      },
任超 committed
209
      // 分页
任超 committed
210 211
      pageData: {
        total: 0,
任超 committed
212
        pageSize: 10,
任超 committed
213
        current: 1
任超 committed
214
      },
田浩浩 committed
215
      title: "",
田浩浩 committed
216
    };
任超 committed
217 218
  },
  methods: {
yangwei committed
219
    //截止日期变化
任超 committed
220 221
    endTimeChange (val) {
      this.form.receiveEndTime = timeFormat(new Date(val), true)
yangwei committed
222
    },
田浩浩 committed
223
    // 初始化数据
任超 committed
224 225
    queryClick () {
      getReceiveDataReportPage({ ...this.form, ...this.formData }).then(
田浩浩 committed
226 227
        (res) => {
          if (res.code === 200) {
任超 committed
228
            let { total, records, current } = res.result;
田浩浩 committed
229 230
            this.tableData.total = total;
            this.tableData.data = records ? records : [];
任超 committed
231
            this.pageData.current = current
田浩浩 committed
232
          }
田浩浩 committed
233
        }
任超 committed
234
      )
田浩浩 committed
235
    },
任超 committed
236
    // 重置
任超 committed
237
    resetForm () {
任超 committed
238
      this.$refs.ruleForm.resetFields();
任超 committed
239
      this.form.currentPage = 1
田浩浩 committed
240
      this.queryClick();
任超 committed
241
    },
任超 committed
242 243
    featchData () {
      this.queryClick();
任超 committed
244 245 246 247
    },
    // 结果
    handleResult (row) {
      this.$popupDialog('响应结果', 'views/jsbwcx/components/result', row)
任超 committed
248 249 250
    }
  }
}
任超 committed
251 252
</script>
<style scoped lang="scss">
任超 committed
253
// 引入表单整体样式
任超 committed
254
@import "~@/styles/public.scss";
任超 committed
255
// 引入当前css
任超 committed
256 257 258
@import "./index.scss";
</style>