<style scoped>
.page_fnDm {
  background-color: white;
}
.query-box {
  overflow: inherit;
}
._nav {
  margin: 20px 0 0 0;
  background-color: #f5f5f5;
}
._nav li {
  float: left;
  font-size: 14px;
  color: #666666;
  padding: 15px 20px;
  cursor: pointer;
  position: relative;
  background-color: #f1f1f1;
  margin-right: 5px;
}
._nav li._active {
  background-color: #ffffff;
  color: #333333;
}
._nav li._active::after {
  content: "";
  width: 20px;
  height: 3px;
  background-color: #e95252;
  display: inline-block;
  position: absolute;
  bottom: 0;
  left: 38%;
}
.el-range-editor.el-input__inner {
  border-radius: 0;
}
.query-box {
  border: none;
}
.hight_query {
  position: relative;
}
.hight_query span {
  height: 34px;
  line-height: 34px;
  color: #e95252;
}
.hight_query span .icon-gengduo {
  font-size: 12px;
}
.hight_query span em {
  text-decoration: underline;
  cursor: pointer;
}
.hight_query_box {
  position: absolute;
  background-color: white;
  z-index: 2000;
  right: 200px;
  width: 800px;
}
._hqb_shadow {
  box-shadow: 3px 2px 10px rgb(204, 203, 203);
  border: 1px solid #ececec;
}
.query-box ul {
  overflow: initial;
}
.hqb_t {
  padding: 10px 20px;
  font-size: 16px;
  background-color: #e95252;
  border: 1px solid #e95252;
  color: #fff;
  text-align: center;
  margin-bottom: 15px;
}
.query-box li:last-child {
  float: left;
}
.query-box > ul > li:last-child {
  float: right;
}
.query-box .hight_query ul .el-input {
  width: inherit;
}
.hight_query_box ul li {
  margin-top: 0;
  float: left;
  margin-right: 15px;
}
.hight_query_box ul li label {
  font-size: 14px;
}
.hight_query_box .el-form {
  padding: 0 20px;
}
.hight_query_box ul li._hqb_btn {
  float: right;
  margin-right: 25px;
  padding-top: 5px;
  position: inherit;
}
.Receipt_box {
  padding: 15px;
  color: #c94052;
  width: 614px;
  background-color: rgba(242, 242, 242, 1);
  border: 1px solid rgba(228, 228, 228, 1);
}
.Receipt_box.color_blur {
  color: #106baf;
}
.Receipt_box.color_blur .rb_stit span {
  display: inline-block;
  border-bottom: 2px solid #106baf;
  padding: 0 20px;
}
.rb_tit {
  font-size: 18px;
  text-align: center;
}
.rb_stit {
  font-size: 14px;
  text-align: center;
}
.rb_stit span {
  display: inline-block;
  border-bottom: 2px solid #c94052;
  padding: 0 20px;
}
.rb_top_row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}
.rb_top_row span._r_name {
  color: #333333;
}
.rb_top_row span._r_bold {
  font-weight: bold;
}
.rb_top_row ._r_time span {
  color: #333333;
}
._r_mb5 {
  margin-bottom: 5px;
}
.Receipt_table {
  width: 100%;
  font-size: 14px;
  text-align: center;
}
.Receipt_table .th {
  font-weight: 200 !important;
}
._r_mt10 {
  margin-top: 10px;
}
._bg__ {
  display: inline-block;
  padding: 2px 8px;
  color: white;
  border-radius: 4px;
}
._bg_red {
  background-color: #e95252;
}
.zhuiClass {
  width: 20px;
  height: 20px;
  display: inline-block;
  border-radius: 50%;
  text-align: center;
  line-height: 20px;
  color: #e95252;
  border: 1px solid #e95252;
  font-size: 12px;
}
._bg_green {
  background-color: #2bb87c;
}
.text_d {
  text-decoration: underline;
  cursor: pointer;
}
.PingFangSC {
  font-weight: bold;
}
.Bill_par {
  position: relative;
}
tr._item_list {
  border-bottom: 1px solid #e5e5e5;
  height: 78px;
}
tr._item_list td {
  border-bottom: 1px solid #e5e5e5;
  padding: 10px;
}
/* tr._t_head th{border-top: 1px solid #e5e5e5;} */
tr._item_list td:first-child {
  border-left: 1px solid #e5e5e5;
}
tr._item_list td:last-child {
  border-right: 1px solid #e5e5e5;
}
._head_img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  vertical-align: middle;
}
._btn_group {
  font-size: 14px;
}
.icon-daiqueren {
  color: #4bca81;
}
.icon-yiqueren {
  color: #4bca81;
}
.icon-yiquxiao {
  color: #959595;
}
.icon-shenhebohui {
  color: #e95252;
}
.icon-icon-zancun {
  color: #ff9c01;
}
.singeRowTable tr:hover {
  background-color: white;
}
._TradeWayList {
  padding: 5px 10px;
  background-color: #eeeeee;
  border-radius: 4px;
  margin: 10px 0;
  width: 190px;
}
._bold {
  font-weight: bold;
}
._bank_name,
._bank_type {
  display: inline-block;
  background-color: #333333;
  color: white;
  padding: 2px 4px;
  border-radius: 4px;
  margin-left: 10px;
}
._bank_name {
  margin-left: 10px;
}
._bank_type {
  background-color: #2aaef2;
}
._bank_type2 {
  background-color: #ff9c01;
}
._font_init {
  color: #333333;
  font-size: 12px;
  vertical-align: top;
}
.InfoChangeLog {
  height: auto;
  max-height: 220px;
  background-color: #ffffff;
}
.changLogList {
  padding-left: 20px;
  max-height: 180px;
  overflow: auto;
}
.changLogList_l {
  border-left: 1px solid #e9e9e9;
  position: relative;
  padding-bottom: 10px;
  padding-left: 20px;
  padding-top: 10px;
}
._radius_green {
  background-color: #47bf8c;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  position: absolute;
  left: -4px;
  top: 19px;
}
.changLog_time {
  color: #666666;
  font-size: 12px;
  display: inline-block;
  padding-right: 10px;
}
._icon_btn i {
  width: 28px;
  height: 28px;
  display: inline-block;
  color: white !important;
  border-radius: 50%;
  text-align: center;
  line-height: 28px;
  margin-right: 10px;
  cursor: pointer;
  outline: none;
}
._icon_btn i.edit {
  background-color: #00c6ff;
  font-size: 16px;
}
._icon_btn i.edit:hover {
  background-color: #59daff;
}
._icon_btn i.edit:active {
  background-color: #00b8ec;
}
._icon_btn i.icon-sousuo,
.icon-zhuanhuan1 {
  background-color: #47bf8c;
}
._icon_btn i.icon-sousuo:hover {
  background-color: #66bb97;
}
._icon_btn i.icon-sousuo:active {
  background-color: #35ab79;
}
._icon_btn i.icon-ico_commodity_defaul {
  background-color: #f16c3c;
}
._icon_btn i.icon-ico_commodity_defaul:hover {
  background-color: #e87c54;
}
._icon_btn i.icon-ico_commodity_defaul:active {
  background-color: #f76630;
}
._icon_btn i.icon-quxiao1 {
  background-color: #e95252;
}
._icon_btn i.icon-quxiao1:hover {
  background-color: #ea6d6d;
}
._icon_btn i.icon-quxiao1:active {
  background-color: #e42d2d;
}
._icon_btn i.icon-zhuanjiao1,
._icon_btn i.icon-cuishou {
  background-color: #e6a014;
  font-size: 16px;
}
._icon_btn i.icon-zhuanjiao1:hover,
._icon_btn i.icon-cuishou:hover {
  background-color: rgb(235, 184, 84);
}
._icon_btn i.icon-zhuanjiao1:active,
._icon_btn i.icon-cuishou:active {
  background-color: rgb(223, 150, 6);
}
._tag_span {
  background-color: rgba(64, 158, 255, 0.1);
  display: inline-block;
  padding: 0 5px;
  height: 22px;
  line-height: 20px;
  font-size: 12px;
  color: #409eff;
  border-radius: 4px;
  box-sizing: border-box;
  border: 1px solid rgba(64, 158, 255, 0.2);
  white-space: nowrap;
  margin-bottom: 4px;
}
._tag_span._tag_warr {
  background-color: rgba(103, 194, 58, 0.1);
  border-color: rgba(103, 194, 58, 0.2);
  color: #67c23a;
}
._fex_cen {
  display: flex;
  align-items: center;
}
._pad5 {
  padding: 5px 10px;
}
._color_gar {
  color: gray;
}
.page_fnDm .query-box li:last-child {
  top: 97px !important;
}
._TCIDAndTCNUMList {
  display: flex;
}
.w216 {
  width: 216px;
}
._icon_btn i.icon-tiaozheng {
  background-color: #1296db;
  font-size: 16px;
}
._icon_btn i.icon-zhifupeizhiguanli {
  background-color: #1296db;
  font-size: 16px;
}

.boss_btn_tips,
.boss_btn {
  text-align: center;
}
.boss_btn_tips {
  padding-bottom: 25px;
}
.boss_btn span {
  color: #2bb87c;
}
.cdForm .el-form-item {
  display: inline-block;
}
.leaderPayTable {
  width: 100%;
  margin: 10px auto;
  text-align: center;
  font-size: 12px;
  color: #333;
  border-collapse: collapse;
  background-color: #fff;
  border: 1px solid #d1d1d1;
}

.leaderPayTable th {
  background: #e6e6e6;
  padding: 8px 0;
  color: #333;
  border: 1px solid #d1d1d1;
  font-weight: bold;
}

.leaderPayTable tr td {
  background-color: #fff;
  padding: 8px 0;
  height: 32px;
  border: 1px solid #d1d1d1;
  text-align: center;
}

.leaderPayTable2 tr td {
  border: 1px solid #ccc;
  line-height: 17px;
  height: 25px;
  font-size: 12px;
  background: #fff;
  text-align: center;
  padding: 0;
  margin: 0;
}
.Myquery-box li {
  float: left;
  font-size: 12px;
  color: #666;
  margin: 5px 30px 5px 0;
}
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

input[type="number"] {
  -moz-appearance: textfield;
}
.page_MyCustomer .avatar-uploader .el-upload {
    border: 1px dashed #d9d9d9;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
  }

  .page_MyCustomer .avatar-uploader .el-upload:hover {
    border-color: #409EFF;
  }

  .page_MyCustomer .avatar-uploader-icon {
    font-size: 28px;
    color: #8c939d;
    width: 148px;
    height: 148px;
    line-height: 148px;
    text-align: center;
  }

  .page_MyCustomer .avatar {
    width: 148px;
    height: 148px;
    display: block;
  }
</style>

<template >
  <div class="page_fnDm" @keyup.enter="resetPageIndex(), getPageList()">
    <ul class="_nav clearfix">
      <li :class="active == 1 ? '_active' : ''" @click="getActive(1, 0, -1)">
        {{$t('objFill.v101.Rest.suoyoukehu')}}
      </li>
      <li :class="active == 3 ? '_active' : ''" @click="getActive(3, 1)">
        {{$t('objFill.v101.Rest.daijiesshenh')}}
      </li>

      <li class="hight_query" style="float: right">
        <button class="hollowFixedBtn" @click="resetPageIndex(), getPageList()">
          {{ $t("pub.searchBtn") }}
        </button>
        <button v-if="active==1" class="normalBtn" @click="exportExcel">
          {{$t('visa.v_daochu')}}
        </button>
      </li>
    </ul>
    <div class="Myquery-box">
      <ul class="clearfix">
        <li>
          <span>
            <em style="margin-left: 12px">{{$t('fnc.khmingcheng')}}</em>
            <el-input
              placeholder=""
              class="w150"
              v-model="msg.CustomerName"
              maxlength="8"
            ></el-input>
          </span>
        </li>
        <li v-if="active==1">
          <span>
            <em style="margin-left: 12px">{{$t('objFill.v101.Rest.weijiesuanje')}}</em>
            <el-select v-model="msg.CustomerStatus" :placeholder="$t('pub.pleaseSel')"
            @change="resetPageIndex(), getPageList()">
              <el-option
                v-for="item in options"
                :key="item.Id"
                :label="item.Name"
                :value="item.Id">
              </el-option>
            </el-select>
          </span>
        </li>
      </ul>
    </div>
    <!-- <input type="text" v-model="mathNumber" @blur="mathMoney(mathNumber)">
        <input type="text" v-model="ChineseStr"> -->
    <div
      class="_fnDm_content"
      v-loading="loading"
      :style="{ minHeight: minHeight + 'px' }"
    >
      <table v-if="active == 1"
        border="0"
        cellspacing="0"
        cellpadding="0"
        class="singeRowTable"
        style="margin-bottom: 30px"
      >
        <tr class="_t_head">
          <th>{{$t('salesModule.storeName')}}</th>
          <th>{{$t('system.query_name')}}</th>
          <th>{{$t('restaurant.res_ContactNumber')}}</th>
          <th>{{$t('ground.zongjiaoyie')}}</th>
          <th>{{$t('objFill.v101.Rest.yuejiejine')}}</th>
          <th>{{$t('objFill.v101.Rest.weijiesuanje')}}</th>
          <th>{{$t('objFill.v101.Rest.weijssqshu')}}</th>
          <th>{{$t('objFill.v101.activity.zongshouks')}}</th>
          <th>{{$t('objFill.v101.Rest.qianyuejzsj')}}</th>
          <!-- <th>{{$t('system.table_operation')}}</th> -->
        </tr>
        <tr v-for="(item, index) in DataList" :key="index">
          <td>{{ item.customerName }}</td>
          <td>{{ item.contact }}</td>
          <td>{{ item.contactNumber }}</td>
          <td><span style="cursor: pointer;text-decoration: underline;" @click="lookDetail(item,1)">{{ item.tradeTotal }}</span></td>
          <td>{{ item.signingPrice }}</td>
          <td><span style="cursor: pointer;text-decoration: underline;" @click="lookDetail(item,2)">{{ item.signingUnsettledPrice }}</span></td>
          <td><span style="cursor: pointer;text-decoration: underline;" @click="lookDetail(item,3)">{{ item.waringAudit }}</span></td>
          <td>{{ item.totalGuestNum }}</td>
          <td>{{ item.signingEndTime }}</td>
        </tr>
        <tr v-if="DataList.length == 0">
          <td colspan="12" style="text-align: center">{{$t('system.content_noData')}}</td>
        </tr>
      </table>

<table v-if="active == 3" class="leaderPayTable" border="0" cellspacing="1" cellpadding="0">
                <tr>
                <th>{{$t('fnc.khmingcheng')}}</th>
                <th>{{$t('objFill.lianxifangshi')}}</th>
                <th>{{$t('objFill.qianyueedu')}}</th>
                <th>{{$t('objFill.v101.Rest.chuanjianzhe')}}</th>
                <th>{{$t('fnc.cjshijian')}}</th>
                <th>{{$t('fnc.shzhuangtai')}}</th>
                <th>{{$t('fnc.jine')}}</th>
                <!-- <th>{{$t('salesModule.AdultPeople')}}</th>
                <th>{{$t('objFill.shenheishijian')}}</th>
                <th>{{$t('salesModule.ReviewReason')}}</th> -->
                <th>{{$t('system.table_operation')}}</th>
                </tr>
                <tr v-for="(item,index) in czList" :key="index">

                <td>{{item.customerName}}</td>
                <td>{{item.contactNumber}}</td>
                <td>{{item.signingPrice}}</td>
                <td>{{item.createBy}}</td>
                <td>{{item.createDate}}</td>
                <td>{{item.statusName}}</td>
                <td>{{item.totalPrice}}</td>
                <!-- <td>{{item.examineEmpName}}</td>
                <td>{{item.examineTime}}</td>
                <td>{{item.examineReason}}</td> -->
                <td><el-button type="primary" size="mini" @click="financeCheck(item)">{{$t('fnc.shenhe')}}</el-button>
                    </td>
                </tr>
                <tr v-if="czList.length==0">
          <td colspan="13">{{$t('system.content_noData')}}</td>
        </tr>
      </table>

    </div>
    <div class="noData" v-show="noData">
      {{ $t("system.content_noData") }}
    </div>
    <div v-if="!BOSSBtn && !BOSSBtn2">
      <el-pagination
        background
        @current-change="handleCurrentChange"
        :current-page.sync="currentPage"
        layout="total,prev, pager, next, jumper"
        :page-size="msg.pageSize"
        :total="total"
      >
      </el-pagination>
    </div>
    <el-dialog
      custom-class="addCompany page_MyCustomer"
      :title="$t('objFill.jiesuan')"
      width="400px"
      :visible.sync="showCheck"
      center
    >
      <el-form label-width="100px">
        <el-form-item :label="$t('ground.pingzheng')" prop="SigningFile">

          <el-upload
            class="avatar-uploader"
            action=""
            :http-request="UploadAttachment"
            accept="image/jpeg,image/gif,image/png,image/bmp"
            :show-file-list="false"
          >
            <img
              v-if="BusinessCardPhotos"
              :src="BusinessCardPhotos"
              class="avatar"
            />
            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
          </el-upload>
        </el-form-item>
        <el-form-item :label="$t('hotel.hotel_remark')">
          <el-input
            type="textarea"
            v-model="addMsg.ExamineReason"
            class="w216"
          ></el-input>
        </el-form-item>
        <el-form-item :label="$t('objFill.shenheyijian')">
  <el-radio-group v-model="addMsg.Status">
    <el-radio :label="1">{{$t('visa.v_tongguo')}}</el-radio>
    <el-radio :label="2">{{$t('visa.v_jujue')}}</el-radio>
  </el-radio-group>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <button class="normalBtn" type="primary" @click="checkSubmit">
          {{ $t("pub.saveBtn") }}
        </button>
        <button class="hollowFixedBtn" @click="showCheck = false">
          {{ $t("pub.cancelBtn") }}
        </button>
      </div>
    </el-dialog>
  </div>
</template>
<script>
// import myBill from "./FinancialSubmodule/BillModule.vue";
// import myrbvBill from "./FinancialSubmodule/ReceivablesModule.vue";
// import myhrBill from "./FinancialSubmodule/MergeBillModule.vue";
// import myGZBill from "./FinancialSubmodule/GZBillModule.vue";
export default {
  data() {
    return {
      options:[
        {Name:this.$t('pub.unlimitedSel'),Id:0},
        {Name:this.$t('objFill.v101.Rest.weijiesjeyhu'),Id:2},
      ],
      addMsg: {
        Status: 1,
      },
      showCheck: false,
      BusinessCardPhotos: "",
      isTerminate: -1,
      hbMsg: {
        FrIDList: [],
        Type: 1,
      },
      hbBtn: false,
      hbState: false,
      hbShow: false,
      HandMsg: {
        TCNUM: "",
        ReFinanceId: "",
        OtherType: 6,
      },
      HandState: false,
      widthSon: "700px",
      colorSon: "#f5f5f5",
      showID: false,
      active: 3,
      userId: 0,
      rejectNum: "",
      zhuanjiaoBox: false,
      searchList: [],
      //转交信息
      zhuanjiaoMsg: {
        CreateBy: "",
        FrIDList: [],
      },
      msg: {
        pageIndex: 1,
        pageSize: 10,
        SigningCustomerId: 0,
        CustomerStatus: 0
      },
      getCompanyMsg: {
        // 公司
        RB_Group_Id: "0",
        Status: "0",
      },
      getDepartmentMsg: {
        // 部门
        RB_Group_Id: "",
        RB_Branch_Id: "",
        Status: 0,
        ParentId: -1,
        Tier: 0,
      },
      employeeMsg: {
        // 员工
        GroupId: "",
        BranchId: -1,
        DepartmentId: 0,
        PostId: 0,
        IsLeave: 0,
      },
      zhuanMsg: {
        AuditEmId: null,
        WorkFlowId: 0,
        Description: "",
      },
      updateMsg: {
        FrID: 0,
        OTradeDate: "",
        TradeDate: "",
        Description: "",
      },
      DataList: [],
      GetFinancLogList: [],
      StatusList: [],
      ClientAccountList: [],
      ClientTypeList: [],
      accountList: [],
      BranchAccountList: [],
      DepartmentList: [],
      EmployeeList: [],
      ConditionList: [],
      CompanyList: [],
      productionDate: [],
      approvalDate: [],
      transactionDate: [],
      missionDate: [],
      currencyTypeList: [],
      GetCostTypeList: [],
      TemplateGetList: [],
      AccList: [],
      checkList: [],
      checkAllList: [],
      dateStart: "",
      dateEnd: "",
      dateArr: "",
      status: "1",
      type: "1",
      heightQueryBox: false,
      loading: false,
      LogLoading: false,
      noData: false,
      checkboxShow: false,
      isCkedAll: false,
      currentPage: 1,
      total: 0,
      ChineseStr: "",
      mathNumber: "",
      DepartIDs: "",
      zhuanBox: false,
      loading2: false,
      dialogFormVisible: false,
      searchList: [],
      minHeight: 400,
      //当前登录用户功能权限
      ActionMenuCode: "",
      BOSSBtn: false,
      BOSSBtn2: false,
      AuditOrRefundMsg: {
        WorkFlowId: "",
        Description: "",
        Status: "5",
        Image: "",
        TradeDate: new Date().Format("yyyy-MM-dd"),
        tradeWays: [],
        emList: [],
      },
      bossLen: null,
      BOSSDialog: false,
      userMenuCode: false,
      BOSSDialogText: false,
      HandShow: false,

      F_Advance_Match: false,
      yfcdState: false,
      yfcheckList: [],
      yfOutBranchId: "",
      yfHandmsg: {
        OtherType: 7,
        ReFinanceId: 0,
        Rate: 0,
        czState: true,
      },
      czList: [],
      total2: 0,
      czdateList: [],
      czMsg: {
        pageIndex: 1,
        pageSize: 8,
        FrID: "",
        CostTypeID: "",
        sTradeDate: "",
        eTradeDate: "",
        IsAdvanceFinance: 1,
      },
      costList: [],
      transactionmode: false,
      transactionTax: false,
      accountList2: [],
      trabeList: [], //获取的交易方式列表
      alltransaction: [],
      istransaction: false,
      transTax: {
        FrId: 0,
        Fee: "0.0",
        loading: false,
        ClientType: "",
        ClientID: "",
      },
      PaymentSync: false,
      costmodeHL: false,
      trabeListHL: [], //修改费率下拉数据
    };
  },
  created() {
    this.msg.SigningCustomerId = this.$route.query.id?this.$route.query.id:0
    this.active = this.$route.query.tab?this.$route.query.tab:3
    this.isTerminate = -1;
    let userinfo = this.getLocalStorage();
    let allH, cH;
    allH = document.documentElement.clientHeight;
    cH = allH - 380; //298 = 顶部导航 50 面包屑83 查询框75 table表头41 分页49
    this.minHeight = cH;
  },
  components: {
    // "my-Bill": myBill,
    // "my-RVB-Bill": myrbvBill,
    // "my-HB-Bill": myhrBill,
    // "my-GZ-Bill": myGZBill
  },
  mounted() {
    this.GetAuth();

    this.getCostTypeList();
    let userInfo = this.getLocalStorage();
    this.yfOutBranchId = userInfo.RB_Branch_id;
    let userMenuCode = "," + userInfo.ActionMenuCode + ",";
    this.userMenuCode =
      userMenuCode.indexOf(",C_Batch_AuditFinance,") != -1 ? true : false;
    this.getCompanyMsg.RB_Group_Id =
      this.employeeMsg.GroupId =
      this.getDepartmentMsg.RB_Group_Id =
        userInfo.RB_Group_id; //集团ID
    this.ActionMenuCode = userInfo.ActionMenuCode;
    this.DepartIDs = userInfo.RB_Department_Id;
    this.userId = userInfo.EmployeeId;
    // this.financeinfo_post_GetList();
    // this.financeinfo_post_GetCostTypeList();
    // this.FinancialFlowTemplate_post_GetList();
    // this.getCompanyList();
    // this.Financial_post_GetConditionList();
    // this.getEmployee();
    // this.getDepartment();
    // this.Financial_post_GetBranchAccountList();
    // this.financeinfo_post_GetClientTypeList();
    // this.FinancialFlowTemplate_post_GetStatusList();
    this.getPageList();
    // this.czgetList();
  },
  methods: {
    exportExcel() { //导出
      let msg = JSON.parse(JSON.stringify(this.msg))
      // let userInfo = this.getLocalStorage();
      // msg.EmployeeIdUser = userInfo.EmployeeId
      let time = this.getBeforeDate(0,new Date().Format("yyyy-MM-dd"))
      var fileName = `${this.$t('objFill.v101.Rest.qianykhubiao')}${time}.xls`;
      this.GetLocalFile("customer_post_GetSigningCustomerOutToExcel", msg, fileName);
    },
    lookDetail(item, type) {
      let path = ''
      let query = {}
      if(type == 1) {
        path='MyCustomerDetail',
        query={
          id: item.customerId,
         blank: 'y',
        }
      } else if(type == 2) { // weij
        path='signedFinance',
        query={
          id: item.customerId,
         blank: 'y',
        }
      } else { // 详情
        path='signedFinanceForAll',
        query={
          id: item.customerId,
         blank: 'y',
        }
      }
      this.$router.push({path,query})
    },
    financeCheck(item) {
      this.$router.push({
        path: 'signedFinanceCheck',
        query: {
          id: item.id,
          name: item.customerName,
          blank: 'y',
        }
      })
    },
    checkSubmit() {
      if (!this.BusinessCardPhotos) {
        this.$message.error(this.$t('objFill.v101.FinancialModule.qingcpz'));
        return;
      }
      this.addMsg.ExamineVoucher = this.BusinessCardPhotos;
      this.addMsg.Id = this.checkObj.customerAccountId;
      this.apipost(
        "customer_post_UpdateSigningSettlement",
        this.addMsg,
        (res) => {
          if (res.data.resultCode == 1) {
            this.showCheck = false;
          } else {
            this.$message.error(res.data.message ||this.$t('objFill.v101.Rest.fashengyiccs'));
          }
        },
        (err) => {}
      );
    },
    UploadAttachment(file) {
      //上传
      let newArr = [];
      newArr.push(file.file);
      let path = "/Upload/Temporary/";
      this.UploadSelfFileT(path, newArr, (x) => {
        this.BusinessCardPhotos =
          this.domainManager().ViittoFileUrl + x.data.FilePath;
      });
    },
    getRate(value) {
      return this.moneyFormatB(value);
    },
    showhuilv(row) {
      this.apipost(
        "Financial_get_GetFinanceRate",
        { FinanceId: row.FrID },
        (res) => {
          if (res.data.resultCode == 1) {
            this.trabeListHL = res.data.data;
            this.costmodeHL = true;
          }
        },
        (err) => {}
      );
    },
    GetAuth() {
      var actionCode = this.$AuthCode.F_Advance_Match;
      this.CheckUserAuth(actionCode, (res) => {
        if (res.data.resultCode == 1 && res.data.data == 1) {
          this.F_Advance_Match = true;
        }
      });
    },
    ZhiDanChongDi() {
      this.yfcdState = true;
      this.yfcheckList = [];
    },
    goUrlZD(item) {
      let that = this;
      let yfcheckList;
      if (item) {
        this.yfcheckList = [];
        this.yfcheckList.push(item);
        that.yfHandmsg.OtherType = 65;
      } else {
        that.yfHandmsg.OtherType = 7;
      }
      yfcheckList = JSON.parse(JSON.stringify(this.yfcheckList));
      if (this.yfcheckList.length > 1) {
        this.Error(this.$t('objFill.onlyoneitem'));
        return;
      }
      if (this.yfcheckList.length == 0) {
        this.Error(this.$t('objFill.atleastone'));
        return;
      }

      let arr = [];
      // var TCArr = [this.yfHandmsg.TCNUM];
      let orderObj = {
        OrderID: 0,
        OrderSource: 8,
        Obj: {},
        // TCIDList: TCArr
      };
      that.yfHandmsg.ReFinanceId = this.yfcheckList[0].FrID;
      that.yfHandmsg.Rate = this.yfcheckList[0].Rate;
      var msg = {};
      // msg = JSON.stringify(that.yfHandmsg);
      if (item) {
        msg = {
          OtherType: 65,
          ReFinanceId: that.yfHandmsg.ReFinanceId,
          czState: that.yfHandmsg.czState,
        };
      } else {
        msg = {
          OtherType: 7,
          ReFinanceId: that.yfHandmsg.ReFinanceId,
          czState: that.yfHandmsg.czState,
        };
      }

      let routeData = this.$router.resolve({
        name: "ChoiceAddFinancialDocuments",
        query: {
          czmsg: JSON.stringify(msg),
          orderObj: JSON.stringify(orderObj),
          companyID: this.OutBranchId,
          Type: 2,
          searchTitle: "分摊",
        },
      });
      window.open(routeData.href, "_blank");
    },
    ckeckOne() {
      if (this.yfcheckList.length == 2) {
        this.yfcheckList.splice(0, 1);
      }
      if (this.yfcheckList.length > 1) {
        this.Error(this.$t('objFill.onlyoneitem'));
      }
    },
    handleCurrentChange2(val) {
      this.czMsg.pageIndex = val;
      this.czgetList();
    },
    getCostTypeList() {
      this.apipost(
        "Financial_get_GetAdvanceCostTypeList",
        {},
        (res) => {
          if (res.data.resultCode === 1) {
            this.costList = res.data.data;
          } else {
            this.Error(res.data.message);
          }
        },
        null
      );
    },
    czgetList() {
      if (this.czdateList && this.czdateList.length > 0) {
        this.czMsg.sTradeDate = this.czdateList[0];
        this.czMsg.eTradeDate = this.czdateList[1];
      } else {
        this.czMsg.sTradeDate = "";
        this.czMsg.eTradeDate = "";
      }
      let msg = Object.assign({}, this.czMsg);
      if (msg.FrID == "") {
        msg.FrID = 0;
      }
      this.apipost(
        "Financial_get_GetAdvanceFinancePageList",
        msg,
        (res) => {
          if (res.data.resultCode === 1) {
            this.czList = res.data.data.pageData;
            this.total2 = res.data.data.count;
          }
        },
        null
      );
    },
      getList(t,active) { // 获取待结算列表数据
      if (active) {
        this.total = 0;
        this.DataList = [];
        this.msg.pageIndex = 1;
        this.isTerminate++;
      }
      this.loading = true
            this.czList = []
        this.apipost('customer_post_GetSettlementCustomerPage',
        this.msg, res => {
          if (res.data.resultCode == 0) {
            this.loading = false;
            this.czList = []
          } else {
            this.czList = res.data.data.pageData;
            this.total = res.data.data.count;
            this.loading = false;
          }
        }, err => {})
      },
    goUrl() {
      this.dialogFormVisible = true;
    },
    // 切换table栏
    getActive(active, Conditon, BOSSBtn) {
      this.active = active;
      if (BOSSBtn) {
        this.BOSSBtn = false;
      }
      if(active==3){
        this.msg.CustomerStatus = 0
      }
      this.msg.pageIndex == 1;
      this.getPageList(0, 1);
    },
    getPageList(t,active) {
      if(this.active == 1) {
      this.getAllPageList(t,active);
      } else {
        this.getList(t,active)
      }
    },
    getAllPageList(t, active) {
      if (active) {
        this.total = 0;
        this.DataList = [];
        this.msg.pageIndex = 1;
        this.isTerminate++;
      }
      // 获取列表数据
      this.loading = true;
      this.checkAllList = [];
      this.checkList = [];
      this.apipost(
        "customer_post_GetSigningCustomerPage",
        this.msg,
        (res) => {
          if (res.data.resultCode == 1) {
            let data = [];
            if (t == 1 && this.BOSSBtn && this.msg.Conditon == 3) {
              let dataList = res.data.data.pageData;
              let newData = [];
              dataList.forEach((x) => {
                if (x.IsBatchAudit == 0 || x.Type == 1) {
                  newData.push(x);
                }
              });
              data = newData;
            } else {
              data = res.data.data.pageData;
            }
            this.total = res.data.data.count;
            if (this.total == 0) {
              this.DataList = [];
              this.noData = true;
            } else {
              data.forEach((x) => {
                x.modelShow = false;
                this.checkAllList.push(x.FrID);
              });
              this.DataList = data;
              this.noData = false;
            }
            this.loading = false;
          } else {
            this.loading = false;
            this.$message.error(res.data.message);
          }
        },
        (err) => {},
        "",
        this.isTerminate
      );
    },
    Financial_post_GetFinancLogList(id) {
      // 获取单据日志
      if (this.checkboxShow) return;
      this.LogLoading = true;
      this.apipost(
        "Financial_post_GetFinancLogList",
        { ID: id, Type: 2 },
        (res) => {
          if (res.data.resultCode == 1) {
            let data = res.data.data;
            data.forEach((x) => {
              x.UpdateDate = this.$commonUtils.formatMsgTime(x.UpdateDate);
            });
            this.LogLoading = false;
            this.GetFinancLogList = data;
          }
        },
        (err) => {}
      );
    },
    mathMoney(n) {
      // 数字转中文大写 1
      this.ChineseStr = this.$commonUtils.changeMoneyToChinese(n);
    },
    FinancialFlowTemplate_post_GetStatusList() {
      // 获取审核状态枚举
      this.apipost(
        "FinancialFlowTemplate_post_GetStatusList",
        {},
        (res) => {
          if (res.data.resultCode == 1) {
            this.StatusList = res.data.data;
          }
        },
        (err) => {}
      );
    },
    financeinfo_post_GetClientTypeList() {
      // 获取对象类型
      this.apipost(
        "financeinfo_post_GetClientTypeList",
        {},
        (res) => {
          if (res.data.resultCode == 1) {
            this.ClientTypeList = res.data.data;
          }
        },
        (err) => {}
      );
    },
    GetClientAccountList(i) {
      //获取客户名称并且根据费用类型和付款对象获取客户账号
      this.msg.AccountNumber = "";
      this.transTax.ClientID = "";
      this.ClientTypeList.forEach((x) => {
        if (x.ID == i) {
          // this.msg.RemitterName = x.Name;
          this.financeinfo_post_GetClientAccountList(this.transTax.ClientType);
        }
      });
    },
    financeinfo_post_GetClientAccountList(t) {
      // 获取对象类型
      let msg = {
        Type: t,
        ObjID: 0,
        CardNum: "",
      };
      this.apipost(
        "financeinfo_post_GetClientAccountList",
        msg,
        (res) => {
          if (res.data.resultCode == 1) {
            let data = res.data.data;
            let ClientAccountList = [];
            data.forEach((x) => {
              let obj = {
                ID: x.ID,
                Name: x.AccountAlias,
                Nom: x.CardNum,
              };
              ClientAccountList.push(obj);
            });
            this.ClientAccountList = ClientAccountList;
          }
        },
        (err) => {}
      );
    },
    getAccountList(i, t) {
      //收款账户
      let accountList = [];
      if (t == 1) {
        // 银行
        this.apipost(
          "bankaccount_post_GetList",
          { TypeId: i },
          (res) => {
            if (res.data.resultCode == 1) {
              let data = res.data.data;
              data.forEach((x) => {
                let obj = {
                  ID: x.ID,
                  Name: x.Alias,
                  Nom: 0,
                };
                accountList.push(obj);
              });
              this.accountList = accountList;
            }
          },
          (err) => {}
        );
      }
      if (t == 2) {
        //平台账户
        let msg = {
          BackId: 0,
          TypeId: i,
          BranchId: -1,
          Alias: "",
        };
        this.apipost(
          "BankAccount_post_GetPlatformList",
          msg,
          (res) => {
            if (res.data.resultCode == 1) {
              let data = res.data.data;
              data.forEach((x) => {
                let obj = {
                  ID: x.ID,
                  Name: x.Alias,
                  Nom: x.PlatformNo,
                };
                accountList.push(obj);
              });
              this.accountList = accountList;
            }
          },
          (err) => {}
        );
      }
      if (t == 3) {
        //现金账户
        let msg = {
          TypeId: i,
          BranchId: -1,
          Alias: "",
        };
        this.apipost(
          "BankAccount_post_GetCashAccountList",
          msg,
          (res) => {
            if (res.data.resultCode == 1) {
              let data = res.data.data;
              data.forEach((x) => {
                let obj = {
                  ID: x.ID,
                  Name: x.Alias,
                  Nom: 0,
                };
                accountList.push(obj);
              });
              this.accountList = accountList;
            }
          },
          (err) => {}
        );
      }
      if (t == 4) {
        //资金池账户
        let msg = {
          TypeId: i,
          BranchId: -1,
          Alias: "",
        };
        this.apipost(
          "BankAccount_post_GetCashPoolList",
          msg,
          (res) => {
            if (res.data.resultCode == 1) {
              let data = res.data.data;
              data.forEach((x) => {
                let obj = {
                  ID: x.ID,
                  Name: x.Alias,
                  Nom: 0,
                };
                accountList.push(obj);
              });
              this.accountList = accountList;
            }
          },
          (err) => {}
        );
      }
    },
    Financial_post_GetBranchAccountList() {
      //获取交易方式列表
      this.apipost(
        "Financial_post_GetBranchAccountList",
        {},
        (res) => {
          if (res.data.resultCode == 1) {
            this.BranchAccountList = res.data.data;
          }
        },
        (err) => {}
      );
    },
    getDepartment() {
      //部门
      this.apipost(
        "admin_get_DepartmentGetList",
        this.getDepartmentMsg,
        (res) => {
          if (res.data.resultCode == 1) {
            this.DepartmentList = res.data.data;
          }
        },
        (err) => {}
      );
    },
    getEmployee() {
      //员工
      this.apipost(
        "admin_get_EmployeeGetList",
        this.employeeMsg,
        (res) => {
          if (res.data.resultCode == 1) {
            this.EmployeeList = res.data.data;
          }
        },
        (err) => {}
      );
    },
    getCompanyList() {
      //获取公司列表
      this.apipost(
        "admin_get_BranchGetList",
        this.getCompanyMsg,
        (res) => {
          if (res.data.resultCode == 1) {
            this.CompanyList = res.data.data;
          } else {
          }
        },
        (err) => {}
      );
    },
    Financial_post_GetConditionList() {
      //获取财务单据枚举列表
      this.apipost(
        "Financial_post_GetConditionList",
        {},
        (res) => {
          if (res.data.resultCode == 1) {
            this.ConditionList = res.data.data;
          } else {
          }
        },
        (err) => {}
      );
    },
    financeinfo_post_GetList() {
      // 币种类型
      this.apipost(
        "financeinfo_post_GetList",
        { Name: "" },
        (res) => {
          if (res.data.resultCode == 1) {
            this.currencyTypeList = res.data.data;
          } else {
          }
        },
        (err) => {}
      );
    },
    financeinfo_post_GetCostTypeList() {
      // 费用类型
      this.apipost(
        "financeinfo_post_GetCostTypeList",
        { Name: "", type: 0, DepartIDs: this.DepartIDs },
        (res) => {
          if (res.data.resultCode == 1) {
            this.GetCostTypeList = res.data.data;
          } else {
          }
        },
        (err) => {}
      );
    },
    FinancialFlowTemplate_post_GetList() {
      // 单据类型
      this.apipost(
        "Financial_post_GetList",
        {},
        (res) => {
          if (res.data.resultCode == 1) {
            this.TemplateGetList = res.data.data;
          } else {
          }
        },
        (err) => {}
      );
    },
    handleCurrentChange(val) {
      //翻页
      this.msg.pageIndex = val;
      this.getPageList();
    },
    resetPageIndex() {
      // 重置页码
      this.msg.pageIndex = 1;
      this.currentPage = 1;
    },
    goUrl(path, id, Conditon, pageIndex) {
      this.$router.push({
        name: path,
        query: {
          id: id,
          Conditon: Conditon,
          pageIndex: pageIndex,
          blank: "y",
          tab: '单据详情',
        },
      });
    },
    goUrlAdd(path) {
      this.$router.push({
        name: path,
        query: { blank: "y", tab: '选择财务单据类型' },
      });
    },
    goEit(type, id, edit, Conditon, pageIndex, item) {
      let path = "";
      if (type === 1) {
        path = "addReceivablesDocuments";
        this.$router.push({
          name: path,
          query: {
            type: type,
            FrID: id,
            edit: edit,
            Conditon: Conditon,
            pageIndex: pageIndex,
            blank: "y",
            tab: '修改财务单据',
          },
        });
      } else if (type === 2) {
        if (item.Status == 3 && item.DMCUsePriceCount > 0) {
          return this.$message.error(
            this.$t('objFill.dijiefeilqbbhcxfq')
          );
        } else {
          path = "addFinancialDocuments";
          this.$router.push({
            name: path,
            query: {
              type: type,
              FrID: id,
              edit: edit,
              Conditon: Conditon,
              pageIndex: pageIndex,
              blank: "y",
              tab: '修改财务单据',
            },
          });
        }
      } else if (type === 4) {
        path = "addCapitalAllocation";
        this.$router.push({
          name: path,
          query: { id: id, edit: 1, blank: "y", tab: this.$t('objFill.xiugaicaiwudj') },
        });
      } else if (type === 7) {
        path = "addFinancialGZDocuments";
        this.$router.push({
          name: path,
          query: { FrID: id, edit: 1, blank: "y", tab: this.$t('objFill.xiugaicaiwudj') },
        });
      }
    },
    showjiaoyi(FrId) {
      //弹出交易方式修改
      this.apipost(
        "Financial_get_GetFinanceTrabeList",
        { FrId: FrId },
        (res) => {
          if (res.data.resultCode == 1) {
            this.trabeList = res.data.data;
            this.trabeList.forEach((x) => {
              this.alltransaction.map((j) => {
                if (x.AccountTypeId == j.Id) {
                  x.list = j.list;
                  return;
                }
              });
            });
            this.transactionmode = true;
          }
        },
        (err) => {}
      );
    },
    showTranTax(fid, type) {
      this.transTax.FrId = fid;

      this.transTax.loading = false;
      if (type == 1) {
        this.transTax.Fee = "0.00";
        this.transactionTax = true;
      } else {
        this.transTax.ClientType = "";
        this.transTax.ClientID = "";
        this.PaymentSync = true;
      }
    },
    getAccountList2(AccountTypeId, y) {
      //获取账户类型对应下的账户列表
      this.alltransaction.map((x) => {
        if (x.Id == AccountTypeId) {
          this.trabeList[y].list = x.list;
          return;
        }
      });
    },
    getAccountList3(x, y) {
      x.list.map((item) => {
        if (x.AccountId == item.ID) {
          this.trabeList[y].Type = item.BankType;
          return;
        }
      });
    },
    getAccountListtype(AccountId) {
      this.accountList2.map((x) => {
        if (x.ID == AccountId) {
          this.FinanceTrabeMsg.Type = x.BankType;
          return;
        }
      });
    },
  },
  watch: {},
};
</script>