<template>
  <basic-container>
    <div>
      <Card class="cardTitle">
        <p>
          <el-button type="primary" @click="backPage" style="width: 80px"
            >返回</el-button
          >
        </p>
      </Card>
      <avue-crud
        style="width: 100%; margin-top: 15px"
        :data="tableData"
        :option="option"
        :page.sync="page"
        :table-loading="tableLoading"
        @on-load="getList"
        @size-change="sizeChange"
        @current-change="currentChange"
      >
        <template slot="menuLeft">
          <el-button
            type="primary"
            icon="el-icon-plus"
            size="small"
            v-show="typeVal == 'zjlscType'"
            @click="addList"
            >新增</el-button
          >
        </template>
        <template slot="settleNoteStatus" slot-scope="scope">
          <span v-if="scope.row.settleNoteStatus === 2" style="color: #F56C6C">
            {{ scope.row.settleNoteStatus | filterNoteStatus }}</span
          >
          <span
            v-else-if="scope.row.settleNoteStatus === 1"
            style="color: #67C23A"
          >
            {{ scope.row.settleNoteStatus | filterNoteStatus }}</span
          >
          <span v-else-if="scope.row.settleNoteStatus === 9" style="color: red">
            {{ scope.row.settleNoteStatus | filterNoteStatus }}</span
          >
          <span v-else>
            {{ scope.row.settleNoteStatus | filterNoteStatus }}</span
          >
        </template>
        <template slot="categoryName" slot-scope="scope">
          {{ getCategoryName(scope.row) }}
        </template>
        <template slot="menu" slot-scope="scope">
          <el-button
            type="text"
            size="small"
            icon="el-icon-view"
            @click="viewBtn(scope.row, scope.index)"
            >查看
          </el-button>

          <el-button
            type="text"
            :disabled="
              scope.row.settleNoteStatus != null &&
                scope.row.settleNoteStatus != 0
            "
            size="small"
            icon="el-icon-position"
            v-show="typeVal == 'zjlscType'"
            @click="settleBtn(scope.row, scope.index)"
            >结算
          </el-button>
        </template>
      </avue-crud>
    </div>

    <el-dialog
      :title="taskFromTitle"
      v-if="dialogAdd"
      :visible.sync="dialogAdd"
      width="30%"
      center
      :before-close="handleClose"
    >
      <el-form
        :disabled="taskFromType === 'view'"
        :hide-required-asterisk="taskFromType === 'view'"
        :model="taskForm"
        :rules="taskRules"
        ref="taskForm"
        label-width="110px"
        class="demo-ruleForm"
      >
        <el-form-item label="任务类型" prop="taskTypeId">
          <el-select
            v-model="taskForm.taskTypeId"
            placeholder="请选择"
            style="width: 100%"
            :disabled="notUse"
          >
            <el-option
              v-for="item in taskTypeList1"
              :key="item.taskTypeId"
              :label="item.taskTypeName"
              :value="item.taskTypeId"
            >
            </el-option>
          </el-select>
        </el-form-item>

        <el-form-item
          label="前端系统"
          prop="temp1"
          v-if="
            this.taskForm.taskTypeId != 22 && this.taskForm.taskTypeId != 24
          "
        >
          <el-input v-model="taskForm.temp1"></el-input>
        </el-form-item>

        <el-form-item
          label="项目名称"
          prop="temp2"
          v-if="
            this.taskForm.taskTypeId != 22 && this.taskForm.taskTypeId != 24
          "
        >
          <el-input v-model="taskForm.temp2"></el-input>
        </el-form-item>

        <el-form-item
          label="项目编码"
          prop="temp3"
          v-if="
            this.taskForm.taskTypeId != 22 && this.taskForm.taskTypeId != 24
          "
        >
          <el-input v-model="taskForm.temp3"></el-input>
        </el-form-item>

        <el-form-item
          label="说明"
          prop="temp4"
          v-if="
            this.taskForm.taskTypeId != 22 && this.taskForm.taskTypeId != 24
          "
        >
          <el-input v-model="taskForm.temp4"></el-input>
        </el-form-item>

        <el-form-item
          label="工作系统"
          prop="temp1"
          v-if="
            this.taskForm.taskTypeId == 22 || this.taskForm.taskTypeId == 24
          "
        >
          <el-input v-model="taskForm.temp1"></el-input>
        </el-form-item>

        <el-form-item
          label="系统账号"
          prop="temp10"
          v-if="
            this.taskForm.taskTypeId == 22 || this.taskForm.taskTypeId == 24
          "
        >
          <el-input v-model="taskForm.temp10"></el-input>
        </el-form-item>

        <el-form-item
          label="受试者编号"
          prop="temp2"
          v-if="
            this.taskForm.taskTypeId == 22 || this.taskForm.taskTypeId == 24
          "
        >
          <el-input v-model="taskForm.temp2"></el-input>
        </el-form-item>

        <el-form-item
          label="项目编号"
          v-if="
            this.taskForm.taskTypeId == 22 || this.taskForm.taskTypeId == 24
          "
        >
          <el-input v-model="taskForm.temp3" disabled></el-input>
        </el-form-item>

        <el-form-item
          label="上传日期"
          prop="temp8"
          v-if="
            this.taskForm.taskTypeId == 22 || this.taskForm.taskTypeId == 24
          "
        >
          <el-date-picker
            v-model="taskForm.temp8"
            class="w100"
            type="date"
            placeholder="选择日期时间"
          >
          </el-date-picker>
        </el-form-item>

        <el-form-item
          label="上传日志"
          prop="temp12"
          v-if="
            this.taskForm.taskTypeId == 22 || this.taskForm.taskTypeId == 24
          "
        >
          <el-input v-model="taskForm.temp12"></el-input>
        </el-form-item>

        <el-form-item
          label="访视阶段"
          prop="temp4"
          v-if="
            this.taskForm.taskTypeId == 22 || this.taskForm.taskTypeId == 24
          "
        >
          <el-input v-model="taskForm.temp4"></el-input>
        </el-form-item>

        <el-form-item
          label="审核状态"
          prop="temp5"
          v-if="
            this.taskForm.taskTypeId == 22 || this.taskForm.taskTypeId == 24
          "
        >
          <el-input v-model="taskForm.temp5"></el-input>
        </el-form-item>

        <el-form-item
          label="审核通过日期"
          prop="temp7"
          v-if="
            this.taskForm.taskTypeId == 22 || this.taskForm.taskTypeId == 24
          "
        >
          <el-date-picker
            v-model="taskForm.temp7"
            class="w100"
            type="date"
            placeholder="选择日期时间"
          >
          </el-date-picker>
        </el-form-item>

        <el-form-item
          label="审核人"
          prop="temp11"
          v-if="
            this.taskForm.taskTypeId == 22 || this.taskForm.taskTypeId == 24
          "
        >
          <el-input v-model="taskForm.temp11"></el-input>
        </el-form-item>

        <el-form-item
          label="备注"
          prop="temp6"
          v-if="
            this.taskForm.taskTypeId == 22 || this.taskForm.taskTypeId == 24
          "
        >
          <el-input v-model="taskForm.temp6"></el-input>
        </el-form-item>
      </el-form>

      <span slot="footer" class="dialog-footer">
        <el-button @click="handleClose">取 消</el-button>
        <el-button
          v-show="taskFromType == 'add'"
          type="primary"
          @click="uploadSure('taskForm')"
          >确 定</el-button
        >
      </span>
    </el-dialog>

    <!--      结算弹出框-->
    <el-dialog
      title="结算"
      :close-on-click-modal="false"
      @close="settleClose"
      :visible.sync="settleInfoVisible"
      center
    >
      <el-form
        ref="settleForm"
        :model="settleForm"
        :rules="settleRules"
        label-width="120px"
        :inline="true"
      >
        <el-form-item label="结算对象" prop="userName" class="settle-label">
          <el-input
            v-model="settleForm.realName"
            :disabled="true"
            autocomplete="off"
          ></el-input>
        </el-form-item>
        <el-form-item label="项目编码" prop="xmbm" class="settle-label">
          <el-input
            v-model="settleForm.xmbm"
            :disabled="true"
            autocomplete="off"
          ></el-input>
        </el-form-item>

        <el-form-item label="结算金额" prop="settleAmount" class="settle-label">
          <el-input
            v-model="settleForm.settleAmount"
            placeholder="请输入结算金额"
          ></el-input>
        </el-form-item>
        <el-form-item
          label="结算渠道"
          prop="subjectLocation"
          class="settle-label"
        >
          <el-select
            v-model="settleForm.subjectLocation"
            placeholder="请选择结算渠道"
            @change="subTypeChange"
          >
            <el-option
              v-for="(item, index) in subList"
              :value="item.subjectLocation"
              :key="index"
              :label="item.subjectLocation | filterSujectLocation"
            ></el-option>
          </el-select>
        </el-form-item>

        <el-form-item label="发票类目" prop="invoiceType" class="settle-label">
          <el-select
            v-model="settleForm.invoiceType"
            placeholder="请选择发票类目"
            @change="invoiceCategoryChange"
          >
            <el-option
              v-for="item in invoiceList"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
        </el-form-item>
      </el-form>

      <span slot="footer" class="dialog-footer">
        <el-button @click="settleClose" icon="el-icon-close">取 消</el-button>
        <el-button
          v-show="settleButtonShow"
          type="primary"
          :loading="buttonLoading"
          icon="el-icon-check"
          @click="settleSave('settleForm')"
          >保 存</el-button
        >
        <el-button
          v-show="settleButtonShow"
          type="primary"
          :loading="buttonLoading"
          icon="el-icon-check"
          @click="settleSubmit('settleForm')"
          >提 交</el-button
        >
      </span>
    </el-dialog>
  </basic-container>
</template>

<script>
import { taskSettleData } from "@/const/crud/assignPoints/settlement/taskList";
import {
  subSettleInfo,
  saveSettleInfo,
  getSettleInfo,
  pageSettleTask,
  selectSettleTask,
  saveTaskSettle,
  getListByScoreId,
  getTaskInfo,
  getPackageById
} from "@/api/assignPoints/currency/taskList";
import Config from "@/settings";
import { getSubSelect } from "@/api/admin/deptSub";
import {
  invoiceDictMap,
  invoiceMap,
  subjectTypeMap
} from "@/const/constants/invoice";
import { getDictType } from "@/api/common";
import { SUBJECT_TYPE_MAP } from "@/const/auth";
export default {
  name: "taskList",
  data() {
    return {
      subList: [],
      taskFromTitle: "新增",
      taskFromType: "add",
      settleForm: {
        invoiceType: "",
        settleAmount: "",
        subType: ""
      },
      tableData: [],
      invoiceList: [],
      renlijia_invoice_dict: [], // 发票类目-人力加
      tax_helper_invoice_dict: [], // 发票类目-税邦云
      olading_invoice_dict: [], // 发票类目-自由职家
      yee_invoice_dict: [], // 发票类目-易联
      olading_jinyuan_invoice_dict: [], // 发票类目-金园数科
      zheng_qi_zhi_xing_invoice_dict: [],
      hui_qi_yun_invoice_dict: [],
      zhong_yi_yun_invoice_dict: [],
      zhong_zhi_invoice_dict: [],
      qi_fu_invoice_dict: [],
      shen_zhen_ren_cai_invoice_dict: [],
      yi_ma_invoice: [],
      xin_shi_yi_invoice_dict: [],
      he_chuang_zhong_zhi_invoice_dict: [],
      he_chuang_ren_cai_yun_invoice_dict: [],
      olading_henan_invoice_dict: [],
      olading_zhaoyu_invoice_dict: [],
      zheng_qi_zhi_xing_jiang_xi_invoice_dict: [],
      subject_type_eng: [], // 结算渠道code
      invoiceList0: [
        { value: 3, label: "现代服务*技术咨询服务费" },
        { value: 7, label: "现代服务*推广服务费" },
        { value: 4, label: "现代服务*其他咨询服务费" },
        { value: 5, label: "现代服务*现场辅助服务费" }
      ],
      invoiceList1: [
        // { value: 1,label: '推广服务费' },
        // { value: 2,label: '营销服务费' },
        // { value: 3,label: '信息服务费' },
        { value: 4, label: "专业技术服务" }
      ],
      invoiceList2: [{ value: 15, label: "设计服务" }],
      invoiceList3: [],
      invoiceMap: invoiceMap,
      option: taskSettleData,
      page: {
        pageSize: 10,
        pagerCount: 5
      },
      tableLoading: false,
      buttonLoading: false,
      settleButtonShow: true,
      settleInfoVisible: false,
      searchForm: {},
      taskForm: {
        taskTypeId: ""
      },
      dialogAdd: false,
      settleRules: {
        settleAmount: [
          { required: true, message: "请输入结算金额", trigger: "blur" }
        ],
        invoiceType: [
          { required: true, message: "请选择发票类目", trigger: "blur" }
        ],
        subjectLocation: [
          { required: true, message: "请选择结算渠道", trigger: "blur" }
        ]
      },
      taskRules: {
        // taskTypeId: [ {required: true, message: '请选择任务类型', trigger: 'blur'}],
        // temp1: [ {required: true, message: '请输入前端系统', trigger: 'blur'}],
        // temp2: [ {required: true, message: '请输入项目名称', trigger: 'blur'} ],
        // temp3: [ {required: true, message: '请输入项目编码', trigger: 'blur'} ]
      },
      taskTypeList1: [],
      typeVal: "",
      notUse: true,
      projectNum: ""
    };
  },
  computed: {
    getCategoryName() {
      return row => {
        if (row.subType && row.invoiceType) {
          const subjectType = this.subject_type_eng.filter(
            ele => ele.value === row.subType
          );
          const invoiceType = subjectType.length
            ? this[subjectType[0].label + "_invoice_dict"]
            : "";
          return invoiceType.length
            ? invoiceType.filter(
                ele1 => parseInt(ele1.value) === row.invoiceType
              )[0].label
            : "";
        } else {
          return "";
        }
      };
    }
  },
  mounted() {
    this.typeVal = this.$route.query.type;
    this.getTaskTypeList();
    this.showSubSelect();
    this.getInvoiceDict();
    this.getPackageById();
  },
  methods: {
    getInvoiceDict() {
      getDictType({ type: "subject_type_eng" }).then(res => {
        this.subject_type_eng = res.data.data;
      });
      getDictType({ type: "renlijia_invoice" }).then(res => {
        this.renlijia_invoice_dict = res.data.data;
      });
      getDictType({ type: "tax_helper_invoice" }).then(res => {
        this.tax_helper_invoice_dict = res.data.data;
      });
      getDictType({ type: "olading_invoice" }).then(res => {
        this.olading_invoice_dict = res.data.data;
      });
      getDictType({ type: "yee_invoice" }).then(res => {
        this.yee_invoice_dict = res.data.data;
      });
      getDictType({ type: "olading_jinyuan_invoice" }).then(res => {
        this.olading_jinyuan_invoice_dict = res.data.data;
      });
      getDictType({ type: "olading_henan_invoice" }).then(res => {
        this.olading_henan_invoice_dict = res.data.data;
      });
      getDictType({ type: "olading_zhaoyu_invoice" }).then(res => {
        this.olading_zhaoyu_invoice_dict = res.data.data;
      });
      getDictType({ type: "zheng_qi_zhi_xing_invoice" }).then(res => {
        this.zheng_qi_zhi_xing_invoice_dict = res.data.data;
      });
      getDictType({ type: "zheng_qi_zhi_xing_jiang_xi_invoice" }).then(res => {
        this.zheng_qi_zhi_xing_jiang_xi_invoice_dict = res.data.data;
      });
      getDictType({ type: "hui_qi_yun_invoice" }).then(res => {
        this.hui_qi_yun_invoice_dict = res.data.data;
      });
      getDictType({ type: "zhong_yi_yun_invoice" }).then(res => {
        this.zhong_yi_yun_invoice_dict = res.data.data;
      });
      getDictType({ type: "zhongzhi_invoice" }).then(res => {
        this.zhong_zhi_invoice_dict = res.data.data;
      });
      getDictType({ type: "qifu_invoice" }).then(res => {
        this.qi_fu_invoice_dict = res.data.data;
      });
      getDictType({ type: "shenzhenrencai_invoice" }).then(res => {
        this.shen_zhen_ren_cai_invoice_dict = res.data.data;
      });
      getDictType({ type: "yi_ma_invoice" }).then(res => {
        this.yi_ma_invoice_dict = res.data.data;
      });
      getDictType({ type: "xinshiyi_invoice" }).then(res => {
        this.xin_shi_yi_invoice_dict = res.data.data;
      });
      getDictType({ type: "hechuang_zhongzhi_invoice" }).then(res => {
        this.he_chuang_zhong_zhi_invoice_dict = res.data.data;
      });
      getDictType({ type: "hechuang_rencaiyun_invoice" }).then(res => {
        this.he_chuang_ren_cai_yun_invoice_dict = res.data.data;
      });
    },
    subTypeChange(val) {
      this.invoiceList = [];
      delete this.settleForm.invoiceType;
      delete this.settleForm.categoryName;
      const selectedSubType = this.subList.filter(
        ele => ele.subjectLocation === val
      );
      this.invoiceList = this[SUBJECT_TYPE_MAP[val] + "_invoice_dict"].filter(
        ele => {
          if (
            selectedSubType[0].subjectInvoiceCategory &&
            selectedSubType[0].subjectInvoiceCategory
              .split(",")
              .includes(ele.value)
          ) {
            return ele;
          }
        }
      );
    },
    invoiceCategoryChange(e) {
      let item = this.invoiceList.find(item => item.value === e);
      this.settleForm.categoryName = item.label;
    },
    async showSubSelect() {
      const res1 = await getSubSelect();
      this.subList = res1.data.data;
      if (!this.subList) return;
      this.settleForm.subType = this.subList[0].subjectType;
    },
    // 初始化页面
    getList(page, params) {
      this.tableLoading = true;
      pageSettleTask(
        Object.assign(
          {
            packageId: this.$route.query.packageId,
            userId: this.$route.query.taskUserId,
            current: page.currentPage,
            size: page.pageSize
          },
          params,
          this.searchForm
        )
      )
        .then(response => {
          this.tableData = [];
          this.tableData = response.data.data.records;
          this.page.total = response.data.data.total;
          this.tableLoading = false;
        })
        .catch(() => {
          this.tableLoading = false;
        });
    },

    // 任务类型列表
    getTaskTypeList() {
      let arg = {
        scoreId: this.$route.query.packageId
      };
      getListByScoreId(arg)
        .then(response => {
          this.taskTypeList1 = response.data.data;
        })
        .catch(() => {});
    },
    // 新增按钮
    addList() {
      this.taskForm.taskTypeId = this.taskTypeList1[0].taskTypeId;
      this.taskFromTitle = "新增";
      this.taskFromType = "add";
      this.dialogAdd = true;
      this.taskForm.temp3 = this.projectNum; // 项目编号自动读取此积分包关联的项目，无需手动填写，不可修改
      if (this.taskForm.taskTypeId != 22 && this.taskForm.taskTypeId != 24) {
        this.taskRules = {
          taskTypeId: [
            { required: true, message: "请选择任务类型", trigger: "blur" }
          ],
          temp1: [
            { required: true, message: "请输入前端系统", trigger: "blur" }
          ],
          temp2: [
            { required: true, message: "请输入项目名称", trigger: "blur" }
          ],
          // temp3: [ {required: true, message: '请输入项目编码', trigger: 'blur'} ],
          temp4: [{ required: true, message: "请输入说明", trigger: "blur" }]
        };
      } else {
        this.taskRules = {
          taskTypeId: [
            { required: true, message: "请选择任务类型", trigger: "blur" }
          ],
          temp1: [
            { required: true, message: "请输入工作系统", trigger: "blur" }
          ],
          temp2: [
            { required: true, message: "请输入受试者编号", trigger: "blur" }
          ],
          // temp3: [ {required: true, message: '请输入项目编码', trigger: 'blur'} ],
          temp4: [
            { required: true, message: "请输入访视阶段", trigger: "blur" }
          ],
          temp5: [
            { required: true, message: "请输入审核状态", trigger: "blur" }
          ],
          // temp6: [ {required: true, message: '请输入备注', trigger: 'blur'} ],
          temp7: [
            { required: true, message: "请选择审核通过日期", trigger: "blur" }
          ],
          temp8: [
            { required: true, message: "请输入上传日期", trigger: "blur" }
          ],
          temp10: [
            { required: true, message: "请输入系统账号", trigger: "blur" }
          ],
          temp11: [
            { required: true, message: "请输入审核人", trigger: "blur" }
          ],
          temp12: [
            { required: true, message: "请输入上传日志", trigger: "blur" }
          ]
        };
      }
    },
    viewBtn(row) {
      this.taskFromTitle = "查看";
      this.taskFromType = "view";

      getTaskInfo({ taskId: row.id })
        .then(response => {
          this.taskForm = response.data.data.wmTaskContent;
          this.taskForm.taskTypeId = this.taskTypeList1[0].taskTypeId;
          this.dialogAdd = true;
        })
        .catch(() => {});
    },
    // 返回按钮
    backPage() {
      this.$router.$avueRouter.closeTag();

      this.$router.push({
        path:
          "/admin/assignPoints/settlement/manList?id=" +
          this.$route.query.packageId +
          "&type=zjlscType"
      });
    },

    uploadSure(formName) {
      this.$refs[formName].validate(valid => {
        if (valid) {
          // this.taskForm.scorePackageId =this.idVal, // 积分包id
          // this.taskForm.taskUserId =this.taskUserId, // 任务成员id
          this.taskForm.scorePackageId = this.$route.query.packageId;
          this.taskForm.taskUserId = this.$route.query.taskUserId;
          this.taskForm.wmTaskContent = {};
          this.taskForm.wmTaskContent.temp1 = this.taskForm.temp1;
          this.taskForm.wmTaskContent.temp2 = this.taskForm.temp2;
          this.taskForm.wmTaskContent.temp3 = this.taskForm.temp3;
          this.taskForm.wmTaskContent.temp4 = this.taskForm.temp4;
          this.taskForm.wmTaskContent.temp5 = this.taskForm.temp5;
          this.taskForm.wmTaskContent.temp6 = this.taskForm.temp6;
          this.taskForm.wmTaskContent.temp7 = this.taskForm.temp7;
          this.taskForm.wmTaskContent.temp8 = this.taskForm.temp8;
          this.taskForm.wmTaskContent.temp9 = this.taskForm.temp9;
          this.taskForm.wmTaskContent.temp10 = this.taskForm.temp10;
          this.taskForm.wmTaskContent.temp11 = this.taskForm.temp11;
          this.taskForm.wmTaskContent.temp12 = this.taskForm.temp12;

          saveTaskSettle(this.taskForm)
            .then(response => {
              this.dialogAdd = false;
              this.$message.success("保存成功！");
              this.getList(this.page);
            })
            .catch(() => {});
        }
      });
    },

    // 查看按钮
    lookBtn(row) {
      window.open(
        Config.outsideUrl + "/h5/#/pages/task/task-detail/index?id=" + row.id,
        "newwindow",
        "height=500, width=400, top=200, left=300, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no"
      );
    },
    settleBtn(row) {
      let args = {
        taskId: row.id,
        packageId: row.scorePackageId,
        userId: row.taskUserId
      };
      if (row.noteId) {
        args.id = row.noteId;
      }
      this.buttonLoading = false;
      getSettleInfo(args)
        .then(response => {
          const res = response.data.data;
          this.settleForm = res;
          this.settleForm.xmbm = row.xmbm;
          this.settleInfoVisible = true;
          this.subTypeChange(res.subjectLocation);
        })
        .catch(() => {});
    },
    settleClose() {
      this.settleForm = {};
      this.settleInfoVisible = false;
    },
    settleSave(formName) {
      this.$refs[formName].validate(valid => {
        if (valid) {
          const args = this.settleForm;
          if (args.subType == 0 && args.settleAmount > 50000) {
            this.$message.error("人力家单笔结算额不得超过5万元");
            return;
          }
          this.buttonLoading = true;

          saveSettleInfo(args)
            .then(response => {
              this.buttonLoading = false;
              this.settleClose();
              this.getList(this.page);
            })
            .catch(() => {
              this.buttonLoading = false;
            });
        }
      });
    },
    settleSubmit(formName) {
      this.$refs[formName].validate(valid => {
        if (valid) {
          const args = this.settleForm;
          if (args.subType == 0 && args.settleAmount > 50000) {
            this.$message.error("人力家单笔结算额不得超过5万元");
            return;
          }
          this.buttonLoading = true;
          subSettleInfo(args)
            .then(response => {
              this.buttonLoading = false;
              this.settleClose();
              this.getList(this.page);
            })
            .catch(() => {
              this.buttonLoading = false;
            });
        }
      });
    },
    // 结算按钮
    refuseBtn(row) {},
    // 确认按钮
    sureBtn() {},
    // 取消按钮
    handleClose() {
      this.taskForm = {};
      this.dialogAdd = false;
    },
    // 分页查询
    sizeChange(pageSize) {
      this.page.pageSize = pageSize;
    },
    currentChange(current) {
      this.page.currentPage = current;
    },
    getPackageById() {
      getPackageById({ id: this.$route.query.packageId }).then(res => {
        this.projectNum = res.data.data.projectNum;
      });
    }
  }
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.settle-label {
  width: 48%;

  ::v-deep .el-input__inner {
    width: 233px;
  }
}
</style>
