<template>
  <div>
    <h5formButton ref="h5formButtonRef" :archive-case-c-r-f-item="archiveCaseCRFItem" :yrmb-button-show="false"
      :get-save-eidt-title="saveEidtTitle" :edit-save-button-show="positionName.join().includes('医生') ? true : false" />
    <!-- <div id="printH5">测试</div> -->
    <span v-show="!formListValue.createName" class="title-ts">(提示:此表单尚未保存)</span>
    <div id="printH5" class="pay-demand-note formTablePrint form-setclass pdf-scale-box"
      style="margin:0 auto;color:#000;width:750px;font-family:msyh;">
      <div ref="htmlContent">
        <!-- v-if="currentUrl.includes('192')" -->
        <p style="color:#000000;font-size:32px;text-align:center;">
          温州医科大学附属眼视光医院杭州分院</p>
        <p style="color:#000000;font-size:32px;margin:0 0 30px 0;text-align:center;">
          特需医疗服务患者知情同意书
        </p>
        <div class="patientInfo-one left">
          <span style="padding-right:10px;" class="width-90">
            <span>PID：</span>
            <el-input v-model="formListValue.patientId" placeholder="PID" :value="formListValue.patientId" />
          </span>
          <span style="padding-right:10px;" class="width-90">
            <span style="heigth:40px;">姓名：</span>
            <el-input v-model="formListValue.patientName" placeholder="姓名" />
          </span>
          <span style="padding-right:10px;" class="width-60">
            <span>性别：</span>
            <el-input v-model="formListValue.patientSex" placeholder="性别" />
          </span>
          <span style="padding-right:10px;" class="width-60">
            <span>年龄：</span>
            <el-input v-model="formListValue.patientAge" placeholder="年龄" />岁
          </span>
          <span class="width-100">
            <span>专科：{{ formListValue.zhuanke ? formListValue.zhuanke : '-' }}</span>
          </span>
        </div>
      </div>
      <div id="printA5" style="text-align: left; margin-top:20px;margin-bottom:20px;">
        <span>根据物价局、卫生计生委对公立医疗实施特需医疗服务价格公示要求，请患者家属对以下的特需医疗服务项目认真了解并签字确认同意实施，感谢您的配合!</span>
        <el-form ref="formListValue" :model="formListValue" :rules="dataRule"
          :disabled="saveEidtTitle==='编辑' ? true : false">
          <div class="margin-top-20" style="padding-bottom:10px;width:100%;border-bottom:1px solid #ced4d9">
            <el-row :gutter="10"
              style="font-weight:700;font-size:18px;background:#ced4d9;padding:10px 0;font-family:MicrosoftYaHeiBold;display: flex;align-items: center;">
              <el-col :span="2">序号</el-col>
              <el-col :span="12">特需医疗服务项目</el-col>
              <el-col :span="2">类别</el-col>
              <el-col :span="2">计价单位</el-col>
              <el-col :span="2">单价(元)</el-col>
              <el-col :span="1">数量</el-col>
              <el-col :span="2">金额(元)</el-col>
              <el-col v-if="saveEidtTitle==='保存'" :span="1" />
            </el-row>
            <el-row v-for="(item,index) in formListValue.payList" :key="index" :gutter="10" class="margin-top-20">
              <el-col :span="2">{{index+1}}</el-col>
              <el-col :span="12">
                <span v-if="formListValue.payList[index].sfxm">
                  <span>{{ formListValue.payList[index].sfxm }}</span>
                  <i v-if="saveEidtTitle==='保存'" class="el-icon-circle-close" style="cursor: pointer;font-size: 20px;"
                    @click="
                      closeOperaHandle(index, 'sfxm','dj','sl','je')
                    " />
                </span>
                <el-select v-model="formListValue.payList[index].sfxm"
                  :class="formListValue.payList[index].sfxm ? 'patientBlPosition1' : ''" class="width-280"
                  placeholder="">
                  <el-option v-for="(itex,i) in sfxmList" :key="i" :label="itex.sfxm" :value="itex.sfxm" @click.native="
                      selectOperaChange(index,itex)
                    " />
                </el-select>
                <!-- <el-select v-model="formListValue.payList[index].sfxm" placeholder="请选择">
                  <el-option
                    v-for="(itex,i) in sfxmList"
                    :key="i"
                    :label="itex.name"
                    :value="itex.id"
                  />
                </el-select> -->
              </el-col>
              <el-col :span="2">{{ item.lx ? item.lx : '-' }}</el-col>
              <el-col :span="2">单眼</el-col>
              <el-col :span="2">{{ item.dj ? item.dj : '-' }}</el-col>
              <el-col :span="1">{{ item.sl ? item.sl : '-' }}</el-col>
              <el-col :span="2">{{ item.je ? item.je : '-' }}</el-col>
              <el-col v-if="saveEidtTitle==='保存'" :span="1">
                <span v-if="index===formListValue.payList.length-1"
                  style="font-size:20px;font-weight:700;cursor: pointer;display:inline-block;width:50px"
                  @click="addProject">+</span>
                <span v-if="index!==0"
                  style="font-size:20px;font-weight:700;cursor: pointer;display:inline-block;width:50px"
                  @click="deleteProject(index)">-</span>
              </el-col>
            </el-row>
          </div>
          <div class="margin-top-20">
            如果您是医保患者，您在本次治疗期间，因病情需要使用不属于基本医疗保险支付范围的诊疗项
            目、材料和药品的费用须由患者个人承担。现征求您的意见，是否同意使用自费项目。
          </div>
          <div class="flex-7 margin-top-20">
            医生已将以上内容充分告知，本人（患者或授权人）
            <el-form-item prop="agree" class="selectClass1">
              <el-radio-group v-model="formListValue.agree" class="flex" @change="agreeChange">
                <el-radio label="同意">同意</el-radio>
                <el-radio label="不同意">不同意</el-radio>
              </el-radio-group>
            </el-form-item>
            使用以上项目。
          </div>
          <div style="display: flex;align-items: center;justify-content: flex-end;margin-top:30px;">
            <div>
              <div>
                <span class="flex-7" style="padding-right:140px">
                  告知人：
                  <span style="display:inline-block;text-align:center">
                    <span v-if="!formListValue.gzrSign">{{ formListValue.gzrName ? formListValue.gzrName : '-' }}</span>
                    <img v-else :src="formListValue.gzrSign" alt="" width="90px">
                  </span>
                  <!-- <img :src="formListValue.gzrSign" alt="" width="90px"> -->
                </span>
                <div class="flex-7 width-inner-200 date-class" style="margin-top:20px;">
                  <span>日 期：</span>
                  <el-date-picker v-model="formListValue.gzrSignDate" class="margin-right-6" type="datetime"
                    format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm" placeholder="日期" />
                </div>
              </div>

              <div style="margin-top:20px;">
                <div>
                  <div class="width-180 flex-7">
                    <span>患者(代理人)意见：{{ formListValue.dlrYj ? formListValue.dlrYj : '-' }}</span>
                    <!-- <el-input
                  v-model="formListValue.dlrYj"
                  placeholder=""
                  class="margin-right-6"
                /> -->
                  </div>
                  <div class="flex-7 margin-top-20">
                    <div>
                      <span>患者(代理人)签字：</span>
                      <!-- <span
                      v-if="!formListValue.dlrSign && saveEidtTitle === '保存'"
                      class="sign"
                      @click="singHandle('dlrSign')"
                    >点击签字</span> -->
                    </div>
                    <span v-if="formListValue.dlrSign">
                      <img :src="formListValue.dlrSign" alt="" width="90px" @click="singHandle('dlrSign')">
                      <!-- <i
                    v-show="saveEidtTitle === '保存'"
                    class="el-icon-circle-close"
                    style="font-size: 20px; cursor: pointer"
                    @click="imageRemoveClick('dlrSign')"
                  /> -->
                    </span>
                  </div>
                  <div class="flex-7 margin-top-20">
                    <span>患者(代理人)</span>

                    <div class="flex-7">
                      <el-form-item prop="zjSelect" class="selectClass">
                        <div class="width-120">
                          <el-select v-if="saveEidtTitle === '保存'" v-model="formListValue.zjSelect" class="zjClass"
                            default-first-option filterable placeholder="请选择证件">
                            <el-option v-for="(item,index) in zjList" :key="index" :label="item" :value="item" />
                          </el-select>
                          <span v-else style="padding-left:6px;">{{ formListValue.zjSelect }}</span>
                        </div>
                      </el-form-item>
                      <el-form-item prop="patientOrDlrZjh">
                        <div class="width-220">
                          <el-input v-model="formListValue.patientOrDlrZjh" placeholder="" />
                        </div>
                      </el-form-item>
                    </div>

                    <!-- <el-input v-model="formListValue.patientOrDlrZjh" placeholder="" class="margin-right" /> -->
                  </div>
                  <div class="flex-7  margin-top-20">
                    <span>与患者关系：</span>
                    <div class="width-inner-120 width-120">
                      <el-select v-if="saveEidtTitle === '保存'" v-model="formListValue.dlrHzGx" default-first-option
                        filterable placeholder="" @change="hzgxSelectChange">
                        <el-option v-for="(item,index) in hzgx" :key="index" :label="item" :value="item" />
                      </el-select>
                      <span v-else style="padding-left:6px;">{{ formListValue.dlrHzGx }}</span>
                    </div>

                    <div v-if="formListValue.dlrHzGx!=='本人'" class="width-180 margin-left-24">
                      <el-input v-model="formListValue.patientGxInput" placeholder="" />
                    </div>
                    <!-- <el-input v-model="formListValue.dlrHzGx" placeholder="" class="margin-right" /> -->
                  </div>
                  <div class="flex-7 margin-top-20 width-inner-200 date-class">
                    <span>日 期：</span>
                    <el-date-picker v-model="formListValue.dlrSignDate" class="margin-right-6" type="datetime"
                      format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm" placeholder="日期" />
                  </div>
                </div>
              </div>
            </div>
          </div>
        </el-form>
      </div>
    </div>
    <div class="saveInfo">
      <span class="padding-right-10">保存人：{{ formListValue.createName ? formListValue.createName : '-' }}</span>
      <span>保存时间：{{ formListValue.createDate ? formListValue.createDate : '-' }}</span>
    </div>
    <!-- 检查数据查看 -->
    <historyData v-if="historyDataVisible" ref="historyDataRef" :patient-id="patientId"
      :archive-case-c-r-f-item="archiveCaseCRFItem" @yinruClick="yinruClick"
      @closeDialog="historyDataVisible = false" />
    <!-- 模板引入 -->
    <intoTemplate v-if="intoTemplateVisible" ref="intoTemplateRef" :patient-id="patientId"
      :archive-case-c-r-f-item="archiveCaseCRFItem" @yinruTemplateClick="yinruTemplateClick"
      @closeDrawer="historyDataVisible = false" />
  </div>
</template>
<script>
import signGet from '@/mixins/signGet'
import publicFile from '@/mixins/publicFile'
import h5formButton from '@/components/H5formOhter/h5formButton'
import htmlToPdfToBlob from '@/mixins/htmlToPdfToBlob'
import yiXinQianSign from '@/mixins/yiXinQianSign.js'
import { isIDNumber, isHuzhao } from '@/utils/validate'
export default {
  components: {
    h5formButton
  },
  mixins: [signGet, publicFile, htmlToPdfToBlob, yiXinQianSign],
  props: {
    archiveCaseCRFItem: {
      type: Object,
      default: () => { }
    },
    formContent: {
      // type: Array,
      default: () => []
    },
    currentUrl: {
      type: String,
      default: ''
    },
    patientId: {
      type: String,
      default: ''
    },
    patientInfoObj: {
      type: Object,
      default: () => { }
    },
    roleList: {
      type: Array,
      default: () => []
    },
    positionName: {
      type: Array,
      default: () => []
    }
  },
  data() {
    return {
      saveEidtTitle: '编辑',
      formListValue: {
        formName: '特需医疗服务患者知情同意书',
        patientName: '',
        patientId: '',
        patientSex: '',
        patientAge: '',
        zhuanke: '',
        payList: [{
          lx: '',
          sfxm: '',
          dj: '',
          sl: '',
          je: ''
        }],
        // 是否同意
        agree: '',
        // 告知人名字
        gzrName: '',
        // 告知人签字
        gzrSign: '',
        // 告知人签字日期
        gzrSignDate: '',
        // 代理人意见
        dlrYj: '',
        // 代理人签字
        dlrSign: '',
        // 证件选择
        zjSelect: '',
        // 患者或代理人证件号
        patientOrDlrZjh: '',
        // 代理人患者关系
        dlrHzGx: '本人',
        // 代理人关系备注
        patientGxInput: '',
        dlrSignDate: ''
      },
      zjList: ['身份证号', '护照号'],
      hzgx: ['本人', '家属', '见证人'],
      formFlag: '1',
      userData: {},
      sfxmList: [],
      sfxmParams: {
        name: '像差优化个性化Smart全激光',
        ds: '8400',
        sl: '2',
        je: '16800'
      }
    }
  },
  computed: {
    dataRule() {
      var validataIDNumber = (rule, value, callback) => {
        this.dataRuleFun(value, callback, 'zjSelect')
        callback()
      }
      return {
        patientOrDlrZjh: [
          { required: true, validator: validataIDNumber, trigger: 'blur' }
        ],
        zjSelect: [
          { required: true, message: '请做出选择', trigger: 'change' }
        ],
        agree: [
          { required: true, message: '请做出选择', trigger: 'change' }
        ]
      }
    }
  },
  watch: {

  },
  created() {
  },
  destroyed() {
  },
  methods: {
    init() {
      this.getInfo()
      this.getpayList()
    },
    dataRuleFun(value, callback, text) {
      if (this.formListValue[text] === '身份证号') {
        if (value && !isIDNumber(value)) {
          return callback(new Error('您输入的身份证格式不正确'))
        } else if (!value) {
          return callback(new Error('请输入身份证号'))
        }
      } else if (this.formListValue[text] === '护照号') {
        if (value && !isHuzhao(value)) {
          return callback(new Error('您输入的护照格式不正确'))
        } else if (!value) {
          return callback(new Error('请输入护照号'))
        }
      }
    },
    // 患者关系选择
    hzgxSelectChange(e) {
      console.log(e)
      e === '本人' ? this.formListValue.patientOrDlrZjh = this.formListValue.patientIdNumber : this.formListValue.patientOrDlrZjh = ''
    },
    selectChange(e) {
      this.$refs.formListValue.resetFields()
    },
    agreeChange(e) {
      this.formListValue.dlrYj = e
    },
    // 点编辑按钮自动获取签名
    getSign() {
      this.getSystomSign('', '', '', 'gzrName')
      this.formListValue.gzrSignDate ? '' : this.formListValue.gzrSignDate = this.$moment().format('YYYY-MM-DD HH:mm')
      this.formListValue.dlrSignDate ? '' : this.formListValue.dlrSignDate = this.$moment().add(5, 'minutes').format('YYYY-MM-DD HH:mm')
    },
    // 获取表单
    async getInfo() {
      const { data: res } = await this.$http.get('/quguang/sfd/getInfo', {
        params: {
          formId: this.archiveCaseCRFItem.id,
          formName: this.archiveCaseCRFItem.formName,
          formDate: this.archiveCaseCRFItem.formDate,
          patientIdNumber: this.archiveCaseCRFItem.patientIdNumber,
          patientId: this.patientId
        }
      })
      if (res.code === 0) {
        this.$emit('load')
        if (this.archiveCaseCRFItem.id === res.data.formId) {
          // console.log(res.data)
          Object.keys(res.data).forEach((item) => {
            // console.log(res.data)
            // 如果data中没有定义这个字段，就自动加进去
            this.formListValue[item] || typeof this.formListValue[item] === 'boolean' ? '' : this.formListValue[item] = ''
            // 如果不为空就赋值上去
            if ((res.data[item] && res.data[item] !== 'false' && res.data[item] !== 'true') || typeof res.data[item] === 'number') {
              this.formListValue[item] = res.data[item]
            }
            if (res.data[item] && typeof res.data[item] !== 'number') {
              res.data[item].includes('[') || res.data[item] === 'false' || res.data[item] === 'true' ? this.formListValue[item] = JSON.parse(res.data[item]) : ''
            }
            if (item === 'payList') {
              this.formListValue[item] = res.data[item] && res.data[item].length > 0
                ? res.data[item]
                : [{
                  lx: '自费',
                  sfxm: '',
                  dj: '',
                  sl: '',
                  je: ''
                }]
            }
          })
          this.formListValue.dlrHzGx === '本人' && !this.formListValue.patientOrDlrZjh ? this.formListValue.patientOrDlrZjh = this.formListValue.patientIdNumber : ''
          // console.log('证件号',isIDNumber(this.formListValue.patientOrDlrZjh));
          this.formListValue.zjSelect ? '' : this.formListValue.zjSelect = isIDNumber(this.formListValue.patientOrDlrZjh) ? '身份证号' : (
            isHuzhao(this.formListValue.patientOrDlrZjh) ? '护照号' : ''
          )
        }
      } else {
        this.$message.error(res.msg)
      }
    },
    // 获取收费项列表
    async getpayList() {
      const { data: res } = await this.$http.get('/quguang/charge/conf/getList')
      if (res.code === 0) {
        this.sfxmList = res.data
      } else {
        this.$message.error(res.msg)
      }
    },
    // 选择手术方式
    selectOperaChange(index, itex) {
      this.formListValue.payList[index].dj = itex.dj
      this.formListValue.payList[index].sl = itex.sl
      this.formListValue.payList[index].je = itex.je
    },
    // 关闭收费项目
    closeOperaHandle(index, text1, text2, text3, text4) {
      this.$confirmFun('您确定修改收费项目吗？', '您已取消修改').then(
        () => {
          this.formListValue.payList[index][text1] = ''
          this.formListValue.payList[index][text2] = ''
          this.formListValue.payList[index][text3] = ''
          this.formListValue.payList[index][text4] = ''
        }
      )
    },
    // 增加收费项目
    addProject() {
      this.formListValue.payList.push({
        lx: '自费',
        sfxm: '',
        dj: '',
        sl: '',
        je: ''
      })
    },
    // 删除收费项目
    deleteProject(index) {
      this.formListValue.payList.splice(index, 1)
    },
    // 保存表单
    saveAllForm() {
      this.$refs.formListValue.validate((valid) => {
        console.log('valid', valid)
        if (!valid) {
          this.$message({
            message: '您的表单不符合提交要求，请仔细查阅无误后再提交',
            type: 'warning'
          })
          return false
        } else {
          this.saveAllFormFun()
        }
      })
    },
    async saveAllFormFun() {
      this.formListValue.gzrSign = ''
      this.formListValue.dlrSign = ''
      const { data: res } = await this.$http.post(
        '/quguang/sfd/save',
        this.formListValue
      )
      if (res.code === 0) {
        this.saveEidtTitle = '编辑'
        this.$message({
          message: '您已保存成功',
          type: 'success'
        })
        this.getSendCaStatus()
      } else {
        this.$message.error(res.msg)
      }
    },
    // 是否开启了CA认证表单状态
    async getSendCaStatus() {
      const { data: res } = await this.$http.get('/quguang/caSign/getSendCaStatus', {
        params: {
          name: this.archiveCaseCRFItem.formName
        }
      })
      if (res.code === 0) {
        res.data === 1 ? this.sendCaSign() : this.getInfo()
      } else {
        this.$message.error(res.msg)
      }
    },
    sendCaSign() {
      if (this.formListValue.gzrName) {
        this.formListValue.ysSign = ''
        this.formListValue.dlrSign = ''
        this.loading = this.$loading({
          lock: true,
          text: '发送CA签中请稍等...',
          spinner: 'el-icon-loading',
          background: 'rgba(255, 255, 255, 0.7)'
        })
        window.localStorage.getItem('qg-userData') ? this.userData = JSON.parse(window.localStorage.getItem('qg-userData')) : ''
        const caParams = {
          // 文件名称
          fileName: this.archiveCaseCRFItem.formName,
          // 表单标志位，11 特需医疗服务患者知情同意书
          formFlag: 11,
          // 表单id
          formId: this.archiveCaseCRFItem.id,
          signUser: {
            // 签署位置集合
            position: [
              {
                // 坐标签署X轴（数值为0-1之间的小数，以左下角为原点0,右角顶点为1） * 签署位置类型为:2必填
                coX: '',
                // 坐标签署Y轴（数值为0-1之间的小数，以左下角为原点0,右角顶点为1） * 签署位置类型为:2必填
                coY: '',
                // 关键字 签署位置类型为:1必填
                keyword: '告知人：',
                // 关键字偏移（左右），单位像素 签署位置类型为:1必填
                offsetX: '0.1',
                // 关键字偏移（上下），单位像素 签署位置类型为:1必填
                offsetY: '0',
                // 签署位置类型为:2必填 * 坐标签署页码，格式“A-B"，A为起始页，B为结束页，如“1-5"表示从第1到第5页。“0-0"表示签所有页
                pageNo: '',
                // 签名图片和时间戳分开时必填 * 1：签字位置(默认); * 6: 签署时间
                signatureType: '',
                // 是否附加签名时间，签名时间显示于签字/印章图片的下方,内层外层需要同时填入才可生效 * 1：附加；0：不附加 (默认)
                timestamp: '1',
                // 签署位置类型（1：关键字；2：坐标；3：签名域）
                type: '1',
                // 签字/盖章宽度
                width: '75',
                // 签字/盖章高度
                height: '30'
              }
            ],
            // 是否必填：是 医护人员编号，用户需要在系统中已导入、实名认证和采集了签字
            userId: this.userData.employeeId
          }
        }
        setTimeout(() => {
          this.exportPDF({
            customMargin: [20, 0, 0, 20], // 上 右 下 左
            customElementId: 'printH5',
            customOrientation: 'portrait',
            paperSize: 'A4',
            isCurrentPageLoad: true, // CA发送后端接口是否使用loading
            isPadPatientSign: true, // 是否移动患者签
            caParams: caParams,
            isJavaTransformPdf:false, // 是否java转换pdf
            isHaveDoctorSign: true, // 是否有医生签名
            manyPatientSign: true // 患者是否为多人签名
          })
        }, 10)
      }
    },
    setPatientParamsInfo(customParams) {
      // 患者签参数
      // 患者签参数
      const patientSignObj1 = [{
        // 坐标签署X轴（数值为0-1之间的小数，以左下角为原点0,右角顶点为1） * 签署位置类型为:2必填
        coX: '',
        // 坐标签署Y轴（数值为0-1之间的小数，以左下角为原点0,右角顶点为1） * 签署位置类型为:2必填
        coY: '',
        // 关键字 签署位置类型为:1必填
        keyword: '患者(代理人)签字：',
        // 关键字偏移（左右），单位像素 签署位置类型为:1必填
        offsetX: '0.1',
        // 关键字偏移（上下），单位像素 签署位置类型为:1必填
        offsetY: '0',
        // 签署位置类型为:2必填 * 坐标签署页码，格式“A-B"，A为起始页，B为结束页，如“1-5"表示从第1到第5页。“0-0"表示签所有页
        pageNo: '',
        // 签名图片和时间戳分开时必填 * 1：签字位置(默认); * 6: 签署时间
        signatureType: '',
        // 是否附加签名时间，签名时间显示于签字/印章图片的下方,内层外层需要同时填入才可生效 * 1：附加；0：不附加 (默认)
        timestamp: '1',
        // 签署位置类型（1：关键字；2：坐标；3：签名域）
        type: '1',
        // 签字/盖章宽度
        width: '75',
        // 签字/盖章高度
        height: '30'
      }]
      // 本人
      const signUsers1 = [{
        signerType: '3', // 签名类型 3：患者; 4:家属; 5:见证人
        patientName: this.formListValue.patientName, // 患者姓名
        patientIdcard: this.formListValue.patientOrDlrZjh, // 患者证件号
        description: '患者',
        signFiles: [{
          fileCode: this.patientCaUploadParams.fileCode,
          // 签署位置集合
          positions: patientSignObj1
        }]
      }]
      // 代理人签--注：不能单代理人签，需要患者一起签
      const signUsers2 = [{
        signerType: '3', // 签名类型 3：患者; 4:家属; 5:见证人
        patientName: this.formListValue.patientName, // 患者姓名
        patientIdcard: this.formListValue.patientIdNumber, // 患者证件号
        description: '患者',
        signFiles: [{
          fileCode: this.patientCaUploadParams.fileCode,
          // 签署位置集合
          positions: patientSignObj1
        }]
      }, {
        signerType: this.formListValue.dlrHzGx === '家属' ? '4' : (this.formListValue.dlrHzGx === '见证人' ? '5' : ''), // 签名类型 3：患者; 4:家属; 5:见证人
        patientName: this.formListValue.patientName + this.formListValue.dlrHzGx, // 代理人姓名
        patientIdcard: this.formListValue.patientOrDlrZjh, // 代理人证件号
        description: this.formListValue.dlrHzGx,
        signFiles: [{
          fileCode: this.patientCaUploadParams.fileCode,
          // 签署位置集合
          positions: patientSignObj1
        }]
      }]
      this.signUsers = this.formListValue.dlrHzGx === '本人' ? signUsers1 : signUsers2
      this.signFileByPad(customParams)
    },
    // 刷新页面
    caRefresh() {
      this.getInfo()
    }
  }
}
</script>

<style lang="scss">
.pay-demand-note {
  .operaListSpan:hover {
    .opera-icon {
      display: inline-block;
    }
  }
  .el-textarea {
    width: auto !important;
  }
  .el-input__prefix {
    display: none;
  }
  .el-date-editor.el-input,
  .el-date-editor.el-input__inner {
    width: 140px;
  }
  .el-checkbox {
    margin-right: 6px;
  }

  .el-radio {
    margin-right: 8px;
    display: block;
  }
  //   表头
  .has-gutter {
    .cell {
      font-weight: 700;
    }
  }
  .el-select {
    width: auto;
  }
  .el-input__suffix {
    top: -6px;
  }
  .date-class {
    .el-input__suffix {
      top: -6px;
      right: -53px;
    }
  }
  .el-form-item {
    margin-bottom: 0;
  }
  .el-form-item__error {
    top: 30px;
    right: 0;
    left: 140px;
  }
  .zjClass {
    .el-input__inner {
      border-bottom: none !important;
      width: 100px;
      // text-align: left;
      color: #000;
    }
  }
  .el-input__inner {
    font-family: msyh;
    font-weight: normal;
  }
  .el-col {
    text-align: center;
  }
  .selectClass {
    .el-form-item__error {
      width: 60px;
      left: 10px;
    }
  }
  .selectClass1 {
    .el-form-item__error {
      width: 60px;
      left: 10px;
      top: 20px;
    }
  }
}
</style>
