index.vue 7.55 KB
<!--
 * @Description:
 * @Autor: renchao
 * @LastEditTime: 2024-03-19 17:30:22
-->
<template>
  <div class='sfxx slxx'>
    <el-form
      :model="ruleForm"
      ref="ruleForm"
      v-Loading="loading"
      :label-position="flag ? 'top' : ''"
      :inline="flag"
      label-width="100px">
      <div class="slxx_con" :class="flag ? 'formMarginBot0' : ''">
        <div class="slxx_title title-block">
          基本信息
          <div class="triangle"></div>
        </div>
        <el-row :gutter="10">
          <el-col :span="8">
            <el-form-item label="业务号:">
              <el-input v-model="ruleForm.ywh"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="申请登记类型:">
              <el-input v-model="ruleForm.sqdjlx"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="联系人:">
              <el-input v-model="ruleForm.lxr"></el-input>
            </el-form-item>
          </el-col>
        </el-row>

        <el-row :gutter="10">
          <el-col :span="8">
            <el-form-item label="联系人电话:">
              <el-input v-model="ruleForm.lxdh"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="缴费人:">
              <el-input v-model="ruleForm.jfr"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="缴费单号:">
              <el-input v-model="ruleForm.jfdh"></el-input>
            </el-form-item>
          </el-col>
        </el-row>

        <el-row :gutter="10">
          <el-col :span="8">
            <el-form-item label="应收金额:">
              <el-input v-model="ruleForm.ysje"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="实收金额:">
              <el-input v-model="ruleForm.ssje"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="8">
            <el-form-item label="备注:">
              <el-input v-model="ruleForm.bz"></el-input>
            </el-form-item>
          </el-col>
        </el-row>

        <div class="slxx_title title-block">
          收费明细
          <el-button type="primary" @click="hanldeAdd" style="float:right;margin-top:-5px">增加</el-button>
        </div>
        <el-table :data="tableDatasf.data" border :height="210">
          <el-table-column v-for="item in tableDatasf.columns" :key="item.index" :prop="item.prop" :label="item.label" align="center">
          </el-table-column>
          <el-table-column label="操作" width="50">
            <template slot-scope="scope">
              <el-button type="text" @click="handleDelete(scope.row)">删除</el-button>
            </template>
          </el-table-column>
        </el-table>
        <div class="slxx_title title-block">
          计费明细
          <div class="triangle"></div>
        </div>
        <el-table :data="tableDatajf.data" border :height="210">
          <el-table-column v-for="item in tableDatajf.columns" :key="item.index" :prop="item.prop" :label="item.label" align="center">
          </el-table-column>
        </el-table>
        <div class="slxx_title title-block">
          票据
          <div class="triangle"></div>
        </div>
        <div style="height:250px">
          <img src="../../../../image/pj.jpg" alt="" style="height:100%">
        </div>
      </div>
    </el-form>
  </div>
</template>
<script>
  import { mapGetters } from "vuex";
  import { getSfmxList, deleteSfmx } from "@/api/sfxx.js";
  export default {
    components: {},
    data () {
      return {
        ruleForm: {
          ywh: '',
          sqdjlx: '',
          lxr: '',
          lxdh: '',
          jfr: '',
          jfdh: '',
          ysje: '',
          ssje: '',
          bz: ''
        },
        tableDatasf: {
          columns: [
            {
              prop: "sfdw",
              label: "收费单位",
            },
            {
              label: '是否额外收费',
              align: 'center',
              render: (h, scope) => {
                return (
                  <div>
                    {scope.row.sfewsf == '1' ? <span></span> : <span>否</span>}
                  </div>
                )
              }
            },
            {
              prop: "sfry",
              label: "收费人员",
            },
            {
              prop: "sfkmmc",
              label: "收费科目名称",
            },
            {
              prop: "sjffr",
              label: "实际付费人",
            },
            {
              prop: "ssje",
              label: "实收金额",
            },
            {
              prop: "ysje",
              label: "应收金额",
            }
          ],
          data: [],
        },
        tableDatajf: {
          columns: [
            {
              prop: "sfdw",
              label: "计费单位",
            },
            {
              label: '是否额外收费',
              align: 'center',
              render: (h, scope) => {
                return (
                  <div>
                    {scope.row.sfewsf == '1' ? <span></span> : <span>否</span>}
                  </div>
                )
              }
            },
            {
              prop: "sfry",
              label: "收费人员",
            },
            {
              prop: "sfkmmc",
              label: "收费科目名称",
            },
            {
              prop: "sjffr",
              label: "实际付费人",
            },
            {
              prop: "ssje",
              label: "实收金额",
            },
            {
              prop: "ysje",
              label: "应收金额",
            }
          ],
          data: [],
        }
      }
    },
    computed: {
      ...mapGetters(["workFresh"]),
    },
    watch: {
      workFresh: {
        handler (newVal, oldVal) {
          if (newVal) this.getList();
        },
      },
    },
    mounted () {
      this.getList()
    },
    methods: {
      getList () {
        let bsmBusiness = this.$route.query.bsmBusiness ? this.$route.query.bsmBusiness : window.currentSelect.bsmBusiness
        getSfmxList(bsmBusiness).then(res => {
          this.tableData.data = res.result
        })
      },
      hanldeAdd () {
        let bsmBusiness = this.$route.query.bsmBusiness ? this.$route.query.bsmBusiness : window.currentSelect.bsmBusiness
        this.$popupDialog('新增', 'workflow/main/sfxx/xzsf', { bsmBusiness: bsmBusiness }, '50%', true)
      },
      handleDelete (row) {
        let that = this
        this.$confirm('此操作将永久删除该 是否继续?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          deleteSfmx(row.bsmSf).then(res => {
            if (res.code == 200) {
              that.$message({
                message: '删除成功!',
                type: 'success'
              })
              that.getList()
            } else {
              that.$message({
                type: 'info',
                message: res.message
              })
            }
          })
        }).catch(() => {
          this.$message({
            type: 'info',
            message: '已取消删除'
          })
        })

      }
    }
  }
</script>
<style scoped lang='scss'>
  @import "~@/styles/public.scss";
  @import "~@/styles/slxx/slxx.scss";
</style>