kongdeqiang
2023-06-08 23cade0714cf5728fe46583415ed0dd744f98695
src/components/page/ticket/index.vue
@@ -1,5 +1,5 @@
<template>
  <div class="mod-config">
  <div class="mod-config" style="padding: 10px 10px 0px 10px;">
      <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
        <el-form-item label="车牌号">
          <el-input v-model="searchForm.carNo" clearable></el-input>
@@ -126,6 +126,7 @@
                  label="操作">
            <template slot-scope="scope">
              <el-button  type="text" size="small" icon="el-icon-view" @click="addOrUpdateHandle(scope.row.id)">处决书</el-button>
              <el-button  type="text" size="small" icon="el-icon-view" @click="addOrUpdateHandle2(scope.row)">送达回证</el-button>
              <el-button  type="text" size="small" icon="el-icon-view" @click="pictureHandle(scope.row)">图像证据</el-button>
              <el-button  type="text" size="small" icon="el-pay6zhifu" @click="jiaofeiHandle(scope.row.id)">现场缴费</el-button>
            </template>
@@ -137,6 +138,7 @@
      <!-- 弹窗, 新增 / 修改 -->
      <table-form v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></table-form>
      <table-form2 v-if="addOrUpdateVisible2" ref="addOrUpdate2" @refreshDataList="getDataList"></table-form2>
      <!--图像证据-->
      <pictureForm v-if="pictureFormVisiable" ref="pictureForm"></pictureForm>
  </div>
@@ -144,6 +146,7 @@
<script>
  import TableForm from './ticket-form'
  import TableForm2 from './ticket-form2'
  import pictureForm from './picture-form'
  export default {
    data () {
@@ -168,11 +171,13 @@
        totalPage: 0,
        dataListLoading: false,
        addOrUpdateVisible: false,
        addOrUpdateVisible2: false,
        pictureFormVisiable:false, //图像证据弹框
      }
    },
    components: {
      TableForm,
      TableForm2,
      pictureForm
    },
    created () {
@@ -193,17 +198,17 @@
        this.dataListLoading = false
      },
      findAllViolation(){
        this.$byutil.postData(this, this.$systemconfig.basePath+'/ffzf/violationType/findAll', this.formData, res => {
        this.$byutil.postData(this, this.$systemconfig.basePath+'/ffzf/violationtype/findAll', this.formData, res => {
          this.table1 = res.data;
        })
      },
      onPageSizeChange(val) {
        this.pageData.pageSize = val;
        this.loadData();
        this.getDataList();
      },
      onCurrentPageChange(val) {
        this.pageData.page = val;
        this.loadData();
        this.getDataList();
      },
      pictureHandle(data) {
         console.log(data,'data=====')
@@ -225,10 +230,26 @@
          this.$refs.addOrUpdate.init(id)
        })
      },
      // 新增 / 修改
      addOrUpdateHandle2 (row) {
        if(row.personName != null){
          this.addOrUpdateVisible2 = true
          this.$nextTick(() => {
            this.$refs.addOrUpdate2.init(id)
          })
        }else {
          this.$message.error("处决书还未填写!")
        }
      },
      //现场缴费
      jiaofeiHandle(id){
        this.$byutil.postData(this, this.$systemconfig.basePath+'/ffzf/ticket/jiaofei', {id:id}, res => {
          this.getDataList()
            if(res.code===0){
              this.$message.success(res.msg)
            }else {
              this.$message.error(res.msg)
            }
        })
      },
    }