819527061@qq.com
2025-01-08 1618162f712fc414702bce924ff367397ff8ec1d
src/components/page/ticket/index.vue
@@ -60,18 +60,17 @@
            </template>
          </el-table-column>
          <el-table-column
              prop="createTime"
              header-align="center"
              align="center"
              label="处罚时间">
          </el-table-column>
          <el-table-column
            prop="carType"
            width="90px"
            header-align="center"
            align="center"
            label="车辆类型">
          </el-table-column>
          <el-table-column
            prop="color"
            width="90px"
            header-align="center"
            align="center"
            label="车辆颜色">
          </el-table-column>
            <el-table-column
                    prop="address"
@@ -86,7 +85,6 @@
                    align="center"
                    label="应缴金额">
            </el-table-column>
            <el-table-column
                    prop="payStatus"
                    width="100px"
@@ -120,14 +118,17 @@
            label="备注">
          </el-table-column>
          <el-table-column
              width="300px"
                  fixed="right"
                  header-align="center"
                  align="center"
                  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-document" @click="addOrUpdateHandle(scope.row.id)">处决书</el-button>
              <el-button  type="text" size="small" icon="el-icon-document-checked" @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>
              <el-button  v-if="items==2" type="text" size="small" icon="el-icon-delete" @click="onDelete(scope.row.id)">撤销</el-button>
<!--              <el-button  type="text" size="small" icon="el-pay6zhifu" @click="jiaofeiHandle(scope.row.id)">现场缴费</el-button>-->
            </template>
          </el-table-column>
        </el-table>
@@ -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,7 +146,9 @@
<script>
  import TableForm from './ticket-form'
  import TableForm2 from './ticket-form2'
  import pictureForm from './picture-form'
  import {mapState} from 'vuex'
  export default {
    data () {
      return {
@@ -168,11 +172,13 @@
        totalPage: 0,
        dataListLoading: false,
        addOrUpdateVisible: false,
        addOrUpdateVisible2: false,
        pictureFormVisiable:false, //图像证据弹框
      }
    },
    components: {
      TableForm,
      TableForm2,
      pictureForm
    },
    created () {
@@ -181,7 +187,9 @@
      this.tableHeight = window.innerHeight - 255
    },
    computed: {
      ...mapState({
        items:'roles'
      }),
    },
    methods: {
      // 获取数据列表
@@ -193,7 +201,7 @@
        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;
        })
      },
@@ -225,10 +233,34 @@
          this.$refs.addOrUpdate.init(id)
        })
      },
      // 新增 / 修改
      addOrUpdateHandle2 (row) {
        if(row.personName != null && row.personName != ''){
          this.addOrUpdateVisible2 = true
          this.$nextTick(() => {
            this.$refs.addOrUpdate2.init(row.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)
            }
        })
      },
      //删除
      onDelete(id) {
        this.$byutil.deleteData(this,this.$systemconfig.basePath+'/ffzf/ticket/delete',{id:id}, res => {
          this.$message({message: '撤销成功', type: 'success'});
          this.getDataList();
        })
      },
    }