yz3456
2024-05-18 87e28c4bc7fe04eb14629482e97541d183c1d067
ruoyi-ui/src/views/marry/index.vue
@@ -11,7 +11,7 @@
    <el-divider />
    <!--    基本信息-->
    <h2 style="font-size:21px">基本情况</h2>
    <!-- <h2 style="font-size:21px">基本情况</h2>
    <el-container>
      <div style="padding-left:0px;width: 28%;" >
        <el-container >
@@ -26,8 +26,7 @@
              </el-row>
              <el-row :span="16">
                <el-form-item label="出生日期" prop="birthday" label-width="75px">
                  <!-- <el-input v-model="marryList.birthday" placeholder="" type="date" clearable :style="{width: '100%'}" :disabled="dsb">
                  </el-input> -->
                  <el-date-picker v-model="marryList.birthday"
                                  type="date"
                                  placeholder="请选择日期"
@@ -119,47 +118,8 @@
      <div style="padding-left:400px;padding-top:30px" >
        <el-container >
          <el-row :gutter="10" class="mb8">
            <el-col  >
              <el-button
                plain
                @click="handleEdit()"
                style="width: 80px;height: 32px;background: #E0EEFE;"
                v-if="isShow"
                v-hasPermi="['system:role:edit']"
              >编辑</el-button>
              <el-button v-if="isShow_2"  style="width: 80px;height: 32px;background: #E0EEFE;" @click="submitForm" :disabled="dsb">完成</el-button>
              <br>
            </el-col>
            <el-col style="padding-top: 10px;">
              <el-button
                plain
                style="width: 80px;height: 32px;background: #D2F3E0;"
                @click="handleExport"
                v-hasPermi="['family:note:export']"
              >导出</el-button></el-col>
            <el-col style="padding-top: 10px;">
              <el-button
                plain
                style="width: 80px;height: 32px;background: #FFDDE3;"
                v-print="'#printable-content'"
                v-hasPermi="['family:note:export']"
              >打印</el-button></el-col>
          </el-row>
        </el-container>
      </div>
      <!--      </el-dialog> self:user:export-->
    </el-container>
    </el-container> -->
    <h2 style="font-size:16px " >配偶情况</h2>
    <el-container>
      <div style="padding-top:15px;width: 28%;" >
@@ -259,7 +219,45 @@
        </el-container>
      </div>
 <div style="padding-left:400px;padding-top:30px" >
        <el-container >
          <el-row :gutter="10" class="mb8">
            <el-col  >
              <el-button
                plain
                @click="handleEdit()"
                style="width: 80px;height: 32px;background: #E0EEFE;"
                v-if="isShow"
                v-hasPermi="['system:role:edit']"
              >编辑</el-button>
              <el-button v-if="isShow_2"  style="width: 80px;height: 32px;background: #E0EEFE;" @click="submitForm" :disabled="dsb">完成</el-button>
              <br>
            </el-col>
            <el-col style="padding-top: 10px;">
              <el-button
                plain
                style="width: 80px;height: 32px;background: #D2F3E0;"
                @click="handleExport"
                v-hasPermi="['family:note:export']"
              >导出</el-button></el-col>
            <el-col style="padding-top: 10px;">
              <el-button
                plain
                style="width: 80px;height: 32px;background: #FFDDE3;"
                v-print="'#printable-content'"
                v-hasPermi="['family:note:export']"
              >打印</el-button></el-col>
          </el-row>
        </el-container>
      </div>
      <div style="padding-left:30px;padding-top:30px" >
        <el-container >
@@ -572,6 +570,7 @@
      limitCountImg:1,//上传图片的最大数量
      //个人信息数据
      marryList:{
        id:undefined,
        name:undefined,
        sex:undefined,
        birthday:undefined,
@@ -604,11 +603,14 @@
      activeNames:['1'],
      // 弹出层标题
      title: "",
      iddd:undefined,
      // 是否显示弹出层
      open: false,
      // open:true,
      // 是否显示弹出层(数据权限)
      bear:undefined,
      handsj:undefined,
      onebear:undefined,
      mrs:undefined,
      smrs:undefined,
      openDataScope: false,
@@ -622,7 +624,7 @@
      // 数据范围选项
      fot:['.bmp','.jpg','.jpeg','.png','.tif','.gif','.pcx','.tga','.exif','.fpx',
        '.svg','.psd','.cdr','.pcd','.dxf','.ufo','.eps','.ai','.aw','.WMF','.webp','.apng'],
      fileList:[
      ],
      fileListOther:[
@@ -672,13 +674,13 @@
      },
      // 表单校验
      rules: {
        id: [{
          required: true,
        idNo: [{
          // required: true,
          message: '请输入身份证号码',
          trigger: 'blur'
        }],
        name: [{
          required: true,
          // required: true,
          message: '请输入姓名',
          trigger: 'blur'
        }],
@@ -688,7 +690,7 @@
          trigger: 'change'
        }],
        marryStatus: [{
          required: true,
          // required: true,
          message: '请选择婚姻状况',
          trigger: 'change'
        }],
@@ -753,6 +755,7 @@
    cancelData() {
      this.open = false;
      this.reset();
    },
    //下拉
    handleChange(val) {
@@ -782,7 +785,10 @@
            this.oldSpouseList = this.marryList.oldSpouseList;
            console.log(111)
            console.log("信息")
            console.log(this.marryList.marryStatus);
            console.log(this.marryList,'1111111111111111111');
            this.iddd = this.marryList.id
            console.log(this.iddd,'2222222222222')
         //alert(this.marryList.bearStatus)
            if(this.marryList.marryStatus===3){
              this.showOldSpouse = true;
            } else{
@@ -832,7 +838,7 @@
          deptCheckStrictly: true,
          remark: undefined
        };
      this.resetForm("form");
      this.resetForm("elForm");
    },
@@ -926,12 +932,14 @@
    /** 提交按钮(数据权限) */
    submitDataScope: function() {
      let _this = this
      this.$refs["elForm"].validate(valid => {
        if (valid) {
          console.log(this.formDat)
          addMarryOld(this.formDat).then(response => {
            // marryList.oldSpouseList.push(this.formDat);
            this.$modal.msgSuccess("新增成功");
            _this.formDat = {}
            this.open = false;
            this.getList();
          });
@@ -954,17 +962,22 @@
    //修改后的保存
    submitForm() {
      if(parseInt(this.mrs))
      if(this.mrs!=undefined)
        this.marryList.marryStatus = parseInt(this.mrs)
      if(parseInt(this.smrs))
      if(this.smrs!=undefined)
        this.marryList.spouseMarryStatus = parseInt(this.smrs)
      if(parseInt(this.bear))
      if(this.bear!=undefined)
        this.marryList.bearStatus = parseInt(this.bear)
      this.marryList.oneBorn = parseInt(this.onebear)
      this.marryList.handbookStatus =parseInt(this.handsj)
      this.marryList.sex = this.sinds
      this.marryList.spouseSex = this.inds
      console.log(this.marryList,'marryListmarryListmarryListmarryList')
      // this.marryList.id = this.iddd
      this.$refs['elForm'].validate(valid => {
        // alert(valid)
        if (valid) {
          if (this.marryList.id !== undefined) {
            updateMarry(this.marryList).then(response => {
@@ -975,6 +988,7 @@
              this.dsb = true
              this.isShow_2=false
              this.isShow = true
              this.getList()
            }).catch(error => {
              console.error(error);
@@ -986,6 +1000,7 @@
          }
        }
      })
      this.getList()
      // 刷新页面
      // window.location.reload();
    },