<!--
 * @Author: zqm
 * @Date: 2021-06-25 13:41:09
 * @LastEditTime: 2022-03-29 16:33:20
 * @LastEditors: Please set LastEditors
 * @Description: 申报结果展示
 * @FilePath: \taxFormToolFramework\src\components\declareResult.vue
-->
<template>
  <div>
    <el-dialog class="tipDialog" title="申报结果" :visible.sync="resultDialog.visible" top="10%" width="60%" center :close-on-click-modal="false" :close-on-press-escape="false" :modal="false">
      <div class="resultHeader left">
        <p class="left sbxx">
          <span>客户名称：</span>
          <span class="btnMargin" v-html="currentTaxData.nsrmc"></span>
          <span>纳税人识别号：</span>
          <span class="btnMargin" v-html="currentTaxData.nsrsbh"></span>
          <span>申报期：</span>
          <span class="btnMargin" v-html="currentTaxData.nsrsbq" v-format-date></span>
        </p>
      </div>
      <el-table :data="resultDialog.bbDmList" border class="table100" :header-cell-style="headerStyle" :row-style="headerStyle" :cell-style="headerStyle">
        <el-table-column prop="bblxMc" label="税种" class="width30" header-align="center" align="left"></el-table-column>
        <el-table-column prop="sksssjq" label="所属期" align="center">
          <template slot-scope="scope">
            <span v-format-date v-html="scope.row.sksssjq"></span>至
            <span v-format-date v-html="scope.row.sksssjz"></span>
          </template>
        </el-table-column>
        <el-table-column prop="sbjg" label="申报结果" align="center">
          <template slot-scope="scope">
            <span v-if="scope.row.sbjg=='N'" style="color: #ff3d33">申报失败</span>
            <span v-else-if="scope.row.sbjg=='Y'" style="color: #4ec87c">申报成功</span>
            <span v-else>未申报</span>
          </template>
        </el-table-column>
        <el-table-column prop="tsxx" label="提示信息" align="center">
          <template slot-scope="scope">
            <el-button type="text" @click="viewDetails(scope.row.reportResult)">查看详情</el-button>
          </template>
        </el-table-column>
        <el-table-column prop="se" label="税额" align="center"></el-table-column>
        <el-table-column prop="swjgmc" label="税务机关名称" align="center"></el-table-column>
      </el-table>
    </el-dialog>
    <el-dialog class="tipDialog" :title="'《'+validation.bblxMc+'》申报校验信息'" :visible.sync="validation.visible" width="50%" center :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false">
      <el-tabs v-model='activeName' type='card' @tab-click='handleClick'>
        <el-tab-pane v-if="ycsjyFlag" label='一窗式校验' name='first'>
          <el-table :data="ycsjyTable" stripe height="280px" style="width: 100%" :header-cell-style="headerStyle" :row-style="headerStyle" :cell-style="headerStyle">
            <el-table-column prop="bdgzdm" label="比对规则编码" width="180">
            </el-table-column>
            <el-table-column prop="bdlx" :formatter="formatBdlx" label="比对项目" width="180">
            </el-table-column>
            <el-table-column prop="bdmc" label="比对名称">
            </el-table-column>
            <el-table-column prop="bdjg" :formatter="formatBdjg" label="比对结果">
            </el-table-column>
            <el-table-column prop="jkjb" :formatter="formatBdjg" label="监控级别">
              <template slot-scope='scope'>
                <span v-if="scope.row.jkjb=='1'">提示</span>
                <span v-if="scope.row.jkjb!='1'" style="color: red">强制</span>
              </template>
            </el-table-column>
            <el-table-column prop="bdnr" label="对比内容">
            </el-table-column>
            <el-table-column prop="bdjgxx" label="比对结果信息">
            </el-table-column>
          </el-table>
        </el-tab-pane>
        <el-tab-pane v-if="sbjyFlag" label='申报校验' name='second'>
          <el-table :data="sbjyTable" stripe height="280px" :header-cell-style="headerStyle" :row-style="headerStyle" :cell-style="sbjyTableCellStyle" style="width: 100%">
            <el-table-column prop="jyjg" label="检验结果" width="180">
              <template slot-scope="scope">
                <span v-if="scope.row.jyjg=='1'||scope.row.jyjg=='2'" style="color: #ff3d33">拦截校验</span>
                <span v-else-if="scope.row.jyjg=='2'" style="color: #4ec87c">提示校验</span>
                <span v-else></span>
              </template>
            </el-table-column>
            <el-table-column prop="jybs" label="检验标识" width="180">
            </el-table-column>
            <el-table-column prop="tsxx" label="提示">
            </el-table-column>
          </el-table>
        </el-tab-pane>
        <el-tab-pane v-if="jbjyFlag" label='基本校验' name='third'>
          <el-table :data="jbjyTable" stripe height="280px" :header-cell-style="headerStyle" :row-style="headerStyle" :cell-style="sbjyTableCellStyle" style="width: 100%">
            <el-table-column prop="jyjg" label="检验结果" :formatter="formatJbjyJyjg" width="180">
            </el-table-column>
            <el-table-column prop="jybs" label="检验标识" width="180">
            </el-table-column>
            <el-table-column prop="tsxx" label="提示">
            </el-table-column>
          </el-table>
        </el-tab-pane>
      </el-tabs>
      <span slot="footer" class="dialog-footer">
        <el-button size="small" type="primary" @click="continueDeclare()" v-if="nextSbBtn">继续申报</el-button>
        <el-button size="small" type="primary" @click="closeDetails">确定</el-button>
      </span>
    </el-dialog>
    <hcpDialog ref="hcpDialog" :ysyqDialog="ysyqDialog"></hcpDialog>
    <deferPayment ref="deferPayment" :listData="hjzcData"></deferPayment>
    <taxCredit ref="taxCredit"></taxCredit>
  </div>
</template>
<script>
import hcpDialog from "./commentDialog";
import deferPayment from "./deferPayment";
import taxCredit from "./taxCredit";
export default {
  name: "declareResult",
  props: {
    currentTaxData: { type: Object, default: () => ({}) },
  },
  components: {
    hcpDialog, deferPayment, taxCredit
  },
  data() {
    return {
      resultDialog: {//申报结果展示
        checkTitle: "",
        visible: false,
        bbDmList: []
      },
      activeName: 'first', // 局端校验信息所在位置
      ycsjyFlag: false, // 一窗式校验控制
      sbjyFlag: false,// 申报校验控制
      jbjyFlag: false,// 基本校验控制
      ycsjyTable: [], // 一窗式校验table
      jbjyTable: [], // 基本校验table
      sbjyTable: [], // 申报校验table
      nextSbBtn: false,//继续申报按钮
      validation: {//申报结果校验信息展示
        number: 0,
        visible: false,
        bblxMc: "",
        sksssjq: "",
        sksssjz: ""
      },
      ysyqDialog: {//好差评 一事一评 弹出框
        visible: false,
        dataList: []
      },
      hjzcData: [],
    }
  },
  methods: {
    //数据整理整合申报结果
    dataProcessing(resultData, szList) {
      if (resultData.some(item => item.result == true)) {
        this.deferPaymentFun(resultData)
      }
      this.sbResult = resultData
      this.resultDialog.bbDmList = [];
      for (var index in szList) {
        var szlbPzzlBean = szList[index];
        var bblxResult = Enumerable.From(resultData).Where(function (item, index) {
          return item.bblxDm == szlbPzzlBean.bblxDm
        }).ToArray();
        if (bblxResult.length > 0) {
          szlbPzzlBean.reportResult = this.deepClone(bblxResult[0]);
          var sbObj = {};
          if (szlbPzzlBean.bblxDm == "12101") {
            sbObj = this.handleSbjgCXS(bblxResult[0]);
          } else {
            sbObj = this.handleSbjg(bblxResult[0]);
          }
          szlbPzzlBean.sbjg = sbObj.sbjg;
          szlbPzzlBean.se = sbObj.se;
          szlbPzzlBean.tsxx = sbObj.tsxx;
          szlbPzzlBean.swjgmc = sbObj.swjgmc;
          this.resultDialog.bbDmList.push(szlbPzzlBean);
        }
      }
      if (this.resultDialog.bbDmList.length > 0) {
        this.resultDialog.visible = true;
      }
    },
    //财行税申报数据整理
    handleSbjgCXS(filterData) {
      var sbObj = {
        sbjg: "N",
        se: "--",
        tsxx: "",
        swjgmc: ""
      }
      if (filterData.result == true || filterData.result == 'true') {
        sbObj.sbjg = "Y";
        if ("sb03vo" in filterData && filterData.sb03vo != null && filterData.sb03vo != 'null') {
          if ("ssb" in filterData.sb03vo) {
            if (filterData.sb03vo.ssb.length > 0) {
              var tsxx = filterData.sb03vo.ssb[0].sbckVo.tsxx;
              if (tsxx == undefined || tsxx == 'undefined' || tsxx == 'null' || tsxx == null || tsxx == '') {
                tsxx = ""
              }
              sbObj.tsxx = tsxx;
              var swjgmc = filterData.sb03vo.ssb[0].sbckVo.swjgmc;
              if (swjgmc == undefined || swjgmc == 'undefined' || swjgmc == 'null' || swjgmc == null || swjgmc == '') {
                swjgmc = ""
              }
              sbObj.swjgmc = swjgmc;
              var se = filterData.sb03vo.ssb[0].sbckVo.se;
              if (se == undefined || se == 'undefined' || se == 'null' || se == null || se == '') {
                se = "--"
              }
              sbObj.se = se;
              if (filterData.sb03vo.ssb[0].sbckVo.sbjg == "00") {
                var seTatol = '0.00';
                if (filterData.cxssbbVo.length > 0) {
                  for (var index in filterData.cxssbbVo[0].mx) {
                    var szse = filterData.cxssbbVo[0].mx[index].se;
                    seTatol = Number(seTatol) + Number(szse);
                  }
                }
                sbObj.se = JSON.stringify(seTatol);
                sbObj.sbjg = "Y";
                var selectRowData = this.$store.state.data.openData;
                selectRowData.sbjg = "Y";
                window.opener.mlistener.returnSelectRowData = selectRowData;
                var sbButtonObj = this.recursionChild(this.$parent.$children, "declareButton")
                sbButtonObj.sbSuccess = true
              } else {
                sbObj.sbjg = "N";
              }
            }
          }
        } else if ("cxssbbVo" in filterData && filterData.cxssbbVo != null && filterData.cxssbbVo != 'null' && filterData.cxssbbVo.length > 0) {
          var tsxx = filterData.cxssbbVo[0].tsxx;
          if (tsxx == undefined || tsxx == 'undefined' || tsxx == 'null' || tsxx == null || tsxx == '') {
            tsxx = ""
          }
          if (tsxx.indexOf('成功') != -1) {
            var seTatol = '0.00';
            for (var index in filterData.cxssbbVo[0].mx) {
              var szse = filterData.cxssbbVo[0].mx[index].se;
              seTatol = Number(seTatol) + Number(szse);
            }
            sbObj.se = JSON.stringify(seTatol);
          }
          sbObj.tsxx = tsxx;
          sbObj.swjgmc = filterData.cxssbbVo[0].swjgmc
        } else if ("sb03ybr" in filterData && filterData.sb03ybr != null && filterData.sb03ybr != 'null') {
          sbObj.sbjg = "N";
          if (!["", null, undefined].includes(filterData.sb03ybr.sbbVo)) {
            var tsxx = filterData.sb03ybr.sbbVo.sbckVo.tsxx;
            if (tsxx == undefined || tsxx == 'undefined' || tsxx == 'null' || tsxx == null || tsxx == '') {
              tsxx = ""
            }
            sbObj.tsxx = tsxx;
            var swjgmc = filterData.sb03ybr.sbbVo.sbckVo.swjgmc;
            if (swjgmc == undefined || swjgmc == 'undefined' || swjgmc == 'null' || swjgmc == null || swjgmc == '') {
              swjgmc = ""
            }
            sbObj.swjgmc = swjgmc;
            var se = filterData.sb03ybr.sbbVo.sbckVo.se;
            if (se == undefined || se == 'undefined' || se == 'null' || se == null || se == '') {
              se = "--"
            }
            sbObj.se = se;
          } else {
            sbObj.tsxx = ""
            sbObj.swjgmc = ""
            sbObj.se = "--"
          }
        }
      } else {
        sbObj.sbjg = "N";
      }
      var openData = this.$store.state.data.openData;
      var zhsbPzzl = []
      zhsbPzzl.push(openData)
      for (var index in zhsbPzzl) {
        var bblxDm = zhsbPzzl[index].bblxDm;
        if (bblxDm == filterData.bblxDm) {
          zhsbPzzl[index].sbjg = sbObj.sbjg;
          zhsbPzzl[index].sbzt = sbObj.sbjg;
          zhsbPzzl[index].se = sbObj.se;
          zhsbPzzl[index].tsxx = sbObj.tsxx;
          zhsbPzzl[index].swjgmc = sbObj.swjgmc;
        }
      }
      return sbObj
    },
    //普通报表数据整理
    handleSbjg(filterData) {
      var sbObj = {
        sbjg: "N",
        se: "--",
        tsxx: "",
        swjgmc: ""
      }
      if (filterData.result == true || filterData.result == 'true') {
        if ("sb03ybr" in filterData && filterData.sb03ybr != null && filterData.sb03ybr != 'null') {
          sbObj.sbjg = "N";
          if (!["", null, undefined].includes(filterData.sb03ybr.sbbVo)) {
            var tsxx = filterData.sb03ybr.sbbVo.sbckVo.tsxx;
            if (tsxx == undefined || tsxx == 'undefined' || tsxx == 'null' || tsxx == null || tsxx == '') {
              tsxx = ""
            }
            sbObj.tsxx = tsxx;
            var swjgmc = filterData.sb03ybr.sbbVo.sbckVo.swjgmc;
            if (swjgmc == undefined || swjgmc == 'undefined' || swjgmc == 'null' || swjgmc == null || swjgmc == '') {
              swjgmc = ""
            }
            sbObj.swjgmc = swjgmc;
            var se = filterData.sb03ybr.sbbVo.sbckVo.se;
            if (se == undefined || se == 'undefined' || se == 'null' || se == null || se == '') {
              se = "--"
            }
            sbObj.se = se;
          } else {
            sbObj.tsxx = ""
            sbObj.swjgmc = ""
            sbObj.se = "--"
          }
        } else if ("sb03vo" in filterData && filterData.sb03vo != null && filterData.sb03vo != 'null') {
          if ("ssb" in filterData.sb03vo) {
            if (filterData.sb03vo.ssb.length > 0) {
              var tsxx = filterData.sb03vo.ssb[0].sbckVo.tsxx;
              if (tsxx == undefined || tsxx == 'undefined' || tsxx == 'null' || tsxx == null || tsxx == '') {
                tsxx = ""
              }
              sbObj.tsxx = tsxx;
              var swjgmc = filterData.sb03vo.ssb[0].sbckVo.swjgmc;
              if (swjgmc == undefined || swjgmc == 'undefined' || swjgmc == 'null' || swjgmc == null || swjgmc == '') {
                swjgmc = ""
              }
              sbObj.swjgmc = swjgmc;
              var se = filterData.sb03vo.ssb[0].sbckVo.se;
              if (se == undefined || se == 'undefined' || se == 'null' || se == null || se == '') {
                se = "--"
              }
              sbObj.se = se;
              if (filterData.sb03vo.ssb[0].sbckVo.sbjg == "00") {
                sbObj.sbjg = "Y";
                var selectRowData = this.$store.state.data.openData;
                selectRowData.sbjg = "Y";
                window.opener.mlistener.returnSelectRowData = selectRowData;
                //申报后的方法
                this.$parent.sbSuccessFun()
                // var sbButtonObj = this.recursionChild(this.$parent.$children, "declareButton")
                // sbButtonObj.sbSuccess = true 
              } else {
                sbObj.sbjg = "N";
              }
            }
          }
        }
      } else {
        sbObj.sbjg = "N";
      }
      var openData = this.$store.state.data.openData;
      var zhsbPzzl = []
      zhsbPzzl.push(openData)
      for (var index in zhsbPzzl) {
        var bblxDm = zhsbPzzl[index].bblxDm;
        if (bblxDm == filterData.bblxDm) {
          zhsbPzzl[index].sbjg = sbObj.sbjg;
          zhsbPzzl[index].sbzt = sbObj.sbjg;
          zhsbPzzl[index].se = sbObj.se;
          zhsbPzzl[index].tsxx = sbObj.tsxx;
          zhsbPzzl[index].swjgmc = sbObj.swjgmc;
        }
      }
      return sbObj
    },
    //样式
    sbjyTableCellStyle({ row, column, rowIndex, columnIndex }) {
      var obj = {
        padding: '0!important',
        fontSize: '14px',
        fontWeight: '100'
      }
      if (columnIndex == "0" && (row.jyjg == "1" || row.jyjg == "2")) {
        obj.color = "red";
      }
      return obj
    },
    formatJbjyJyjg(row, column) {
      switch (row.jyjg) {
        case "0":
          return '提示校验';
          break;
        case "1":
          return '拦截校验';
          break;
        case "2":
          return '拦截校验';
          break;
        case "3":
          return '';
          break;
        default:
          return '';
      }
    },
    formatBdjg(row, column) {
      if (row.bdjg == "W") {
        return '未比对';
      } else if (row.bdjg == "N") {
        return '比对不通过';
      } else if (row.bdjg == "Y") {
        return '比对通过';
      }
      return ''
    },
    formatBdlx(row, column) {
      if (row.bdlx == "1") {
        return '表表比对';
      } else if (row.bdlx == "2") {
        return '票表比对';
      } else if (row.bdlx == "3") {
        return '表税比对';
      }
      return '';
    },
    // 查看申报失败详情
    viewDetails(filterData) {
      this.validation.bblxMc = filterData.bblxMc;
      var _self = this;
      this.ycsjyTable = []
      this.jbjyTable = []
      this.sbjyTable = []
      if (filterData.result == true || filterData.result == 'true') {
        if ("sb03vo" in filterData && filterData.sb03vo != null && filterData.sb03vo != 'null') {
          /* @Author ygy @Date 13:15 2020/7/9 @Description 整理局端校验数据 -- 一窗式、基本、申报*/
          this.getycsjyTable(filterData)
          this.getjbjyTable(filterData);
          this.getsbjyTable(filterData);
          if ("ssb" in filterData.sb03vo) {
            if (filterData.sb03vo.ssb.length > 0) {
              if (filterData.sb03vo.ssb[0].sbckVo.sbjg == "00") {
                var fjsFirst = filterData.sb03vo.tsxxFlag.scsb
                var nsrlbdm = filterData.sb03vo.tsxxFlag.nsrlbdm
                var sksssjz = this.$store.state.data.openData.sksssjz
                var successTsxx = filterData.sb03vo.ssb[0].sbckVo.tsxx;
                if (successTsxx != undefined && successTsxx == 'undefined' && successTsxx != 'null' && successTsxx != null && successTsxx != '') {
                } else {
                  successTsxx = "申报成功！"
                }
                this.$alert(successTsxx, '提示', { type: 'success' });
                if (this.ycsjyTable.length > 0) {
                  this.validation.visible = true;
                } else {
                  this.validation.visible = false;
                }
              } else {
                if (this.ycsjyTable.length > 0) {
                  this.$alert('一窗式校验未通过，请核实数据是否正确！', '提示', { type: 'error' });
                } else {
                  this.$alert(filterData.sb03vo.ssb[0].sbckVo.tsxx, '提示', { type: 'warning' });
                }
              }
            }
          }
        } else if ("cxssbbVo" in filterData && filterData.cxssbbVo != null && filterData.cxssbbVo != 'null' && filterData.cxssbbVo.length > 0) {
          var tsxx = filterData.cxssbbVo[0].tsxx;
          var type = "success";
          if (tsxx == undefined || tsxx == 'undefined' || tsxx == 'null' || tsxx == null || tsxx == '') {
            tsxx = "申报失败！"
            type = "error"
          }
          this.$alert(tsxx, '提示', { confirmButtonText: '确定', type: type });
        } else if ("sb03ybr" in filterData && filterData.sb03ybr != null && filterData.sb03ybr != 'null') {
          /* @Author ygy @Date 13:15 2020/7/9 @Description 整理局端校验数据 -- 一窗式、基本、申报*/
          this.getycsjyTable(filterData)
          this.getjbjyTable(filterData);
          this.getsbjyTable(filterData);
          if (this.ycsjyTable.length > 0) {
            this.$alert('一窗式校验未通过，请核实数据是否正确！', '提示', { type: 'error' });
          }
        }
      } else {
        this.$alert(filterData.errorMessage, '提示', { type: 'error' });
      }
    },
    // 获取一窗式校验table
    getycsjyTable(rows) {
      if (rows.sb03vo) { // 如果是申报03Vo 去找一窗式校验
        if ("ssb" in rows.sb03vo) {
          if (rows.sb03vo.ssb != null && rows.sb03vo.ssb != 'null') {
            if ("ycsjy" in rows.sb03vo.ssb[0]) {
              if (rows.sb03vo.ssb[0].ycsjy.sfcbs == 'Y') {
                if (rows.sb03vo.ssb[0].ycsjy.mx.length > 0) {
                  this.validation.visible = true;
                  this.loading = false
                  this.ycsjyFlag = true;
                  this.activeName = "first";
                  this.ycsjyTable = rows.sb03vo.ssb[0].ycsjy.mx;
                }
              }
            }
          }
        }
      }
      this.validation.number = 0;
      this.validation.message = [];
      this.showBtn(rows);
    },
    //获取基本校验
    getjbjyTable(rows) {
      if (rows.sb03ybr) { // 如果是sb03ybr 去找一窗式校验
        if ("jbjyVo" in rows.sb03ybr) {
          if (rows.sb03ybr.jbjyVo != null && rows.sb03ybr.jbjyVo != 'null' && rows.sb03ybr.jbjyVo != '') {
            if ("mxList" in rows.sb03ybr.jbjyVo) {
              if (rows.sb03ybr.jbjyVo.mxList.length > 0) {
                this.validation.visible = true;
                this.loading = false
                this.jbjyFlag = true;
                if (!this.ycsjyFlag && !this.sbjyFlag) {
                  this.activeName = "third";
                }
                this.jbjyTable = rows.sb03ybr.jbjyVo.mxList;
              }
            }
          }
        }
      }
    },
    //获取申报校验
    getsbjyTable(rows) {
      if (rows.sb03ybr) { // 如果是sb03ybr 去找一窗式校验
        if ("sbbVo" in rows.sb03ybr) {
          if (rows.sb03ybr.sbbVo != null && rows.sb03ybr.sbbVo != 'null' && rows.sb03ybr.sbbVo != "") {
            if ("bbjymxList" in rows.sb03ybr.sbbVo) {
              if (rows.sb03ybr.sbbVo.bbjymxList.length > 0) {
                this.validation.visible = true;
                this.loading = false
                this.sbjyFlag = true;
                if (!this.ycsjyFlag) {
                  this.activeName = "second";
                }
                this.sbjyTable = rows.sb03ybr.sbbVo.bbjymxList;
              }
            }
          }
        }
      }
    },
    // 继续申报按钮展示条件
    showBtn(rows) {
      if (this.jbjyTable.length == 0 && this.sbjyTable.length == 0) {
        if (this.validation.number == 0 && this.validation.message.length != 0) {
          this.nextSbBtn = true;
        } else if (this.ycsjyTable.length != 0 && rows.sb03vo.ssb[0].sbckVo.sbjg != "00") {
          this.nextSbBtn = true;
        } else {
          this.nextSbBtn = false;
        }
      } else {
        this.nextSbBtn = false;
      }
    },
    //继续申报
    continueDeclare() {
      //判断是否存在表间校验
      var obj = this.recursionParent(this.$parent, "checkResult");
      obj.betweenTableCheck('continue');
      this.resultDialog.visible = false;
      this.validation.visible = false;
    },
    // 关闭申报详情
    closeDetails() {
      this.validation.visible = false;
    },
    deferPaymentFun(resultData) {
      var sksssjz = this.$store.state.data.openData.sksssjz
      var listData = []
      if (resultData.length > 0) {
        resultData.forEach(item => {
          if (item.result == true && !([null, undefined, '', 'null'].includes(item.sb03vo))) {
            if (item.sb03vo.ssb[0].sbckVo.sbjg == '00') {
              var obj = {}
              obj = this.deepClone(item)
              listData.push(obj)
            }
          }
        })
      }
      if (JSON.stringify(listData) != '[]') {
        listData.forEach(item => {
          if (['10401', '10402', '10101', '10102', '10320'].includes(item.bblxDm)) {
            var filterData = item
            var fjsFirst = filterData.sb03vo.tsxxFlag.scsb
            var nsrlbdm = filterData.sb03vo.tsxxFlag.nsrlbdm
            var bblxDm = filterData.bblxDm
            var bblxMc = filterData.bblxMc
            var yzpzxh = filterData.sb03vo.ssb[0].sbckVo.yzpzxh
            var obj = {
              nsrlbdm: nsrlbdm,
              bblxDm: bblxDm,
              tips: bblxMc,
              value1: '',
              value2: '',
              input1: '',
              fjsSelectTip3: false,
              yzpzxh: yzpzxh
            }
            var copyObj = this.deepClone(obj)
            this.hjzcData.push(copyObj)
            if (!([null, '', undefined].fjsFirst)) {
              if (fjsFirst == 'Y') {
                // 是首次申报
                this.$refs.deferPayment.firstDefer.dialogVisible = true;
                // nsrlbdm 212 中型企业、1 微型企业、3不符合
              } else if (fjsFirst == 'N' && (nsrlbdm == '000000000051' || nsrlbdm == '000000000052')) {
                if (sksssjz > '20210930' && sksssjz < '20220101') {
                  this.$refs.deferPayment.defer4.dialogVisible = true
                }
                if (sksssjz >= '20220101' && sksssjz <= '20220630') {
                  this.$refs.deferPayment.defer6.dialogVisible = true
                }
                this.$refs.deferPayment.enterpriseDm = nsrlbdm
              } else {
                this.$refs.deferPayment.firstDefer.dialogVisible = false;
                this.$refs.deferPayment.defer4.dialogVisible = false
                this.$refs.deferPayment.defer6.dialogVisible = false
                this.$refs.deferPayment.enterpriseDm = ''
                this.ldtsFun()
              }
            }
          } else {
            this.ldtsFun()
          }
        })
      } else {
        this.ldtsFun()
      }
    },
    ldtsFun() {
      var resultData = this.$store.state.data.sbResultData
      var listData = []
      if (resultData.length > 0) {
        resultData.forEach(item => {
          if (item.result == true && !([null, undefined, '', 'null'].includes(item.sb03vo))) {
            if (item.sb03vo.ssb[0].sbckVo.sbjg == '00') {
              var obj = {}
              obj = this.deepClone(item)
              listData.push(obj)
            }
          }
        })
      }
      if (JSON.stringify(listData) != '[]') {
        listData.forEach(item => {
          var ldtsFlag = item.sb03vo.ssb[0].sbckVo.zzsqmldse_tstsbz
          if (ldtsFlag != '' && ldtsFlag == "Y") {
            this.$refs.taxCredit.ldtsShow = true;
          } else {
            this.hcpFun()
          }
        })
      } else {
        this.hcpFun()
      }
    },
    hcpFun() {
      var resultData = this.$store.state.data.sbResultData
      resultData.forEach(obj => {
        var hcpResponse = obj.hcpResponse
        if (![undefined, 'undefined', null, 'null'].includes(hcpResponse) && hcpResponse.result) {
          var ysypData = hcpResponse.responseBean;
          this.$refs.hcpDialog.ysypTip(ysypData);
        }
      });
    }
  },
}
</script>
<style scoped>
.btnMargin {
  margin-right: 10px;
}
.resultHeader {
  width: 100%;
  margin-bottom: 10px;
}
.sbxx {
  line-height: 30px;
}
.table100 {
  width: 100%;
}
.width30 {
  min-width: 30%;
}
</style>
