From d75975f18f3d4e57eb7a94646b32c8a8b3f33ade Mon Sep 17 00:00:00 2001
From: feige <791364011@qq.com>
Date: 星期二, 12 三月 2024 21:54:59 +0800
Subject: [PATCH] 修改了bug

---
 ruoyi-ui/src/views/marry/index.vue |  100 +++++++++++++++++++++++++++++--------------------
 1 files changed, 59 insertions(+), 41 deletions(-)

diff --git a/ruoyi-ui/src/views/marry/index.vue b/ruoyi-ui/src/views/marry/index.vue
index d7e8608..228acc9 100644
--- a/ruoyi-ui/src/views/marry/index.vue
+++ b/ruoyi-ui/src/views/marry/index.vue
@@ -1,5 +1,5 @@
 <template>
-  <div class="app-container">
+  <div class="app-container"  id="printable-content">
     <!--    鍥炲埌椤堕儴-->
     <el-backtop :bottom="150" :right="30">
       <el-button type="primary" circle
@@ -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,38 +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-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%;" >
@@ -250,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 >
@@ -610,7 +617,10 @@
       // 鏃ユ湡鑼冨洿
       dateRange: [],
       // 鏁版嵁鑼冨洿閫夐」
-      fot:[".jpg",".jif"],
+      // 鏁版嵁鑼冨洿閫夐」
+      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:[
@@ -759,10 +769,11 @@
       //涓汉淇℃伅
       listMarry(this.queryParams).then(response => {
 
-          if(response.data.length == 0){
+          if(response.data.length === 0){
             this.loading = false;
             this.marryList={};
             this.oldSpouseList = {};
+            console.log(this.marryList)
           }
           else{
             this.marryList = response.data;
@@ -770,6 +781,7 @@
             console.log(111)
             console.log("淇℃伅")
             console.log(this.marryList.marryStatus);
+			//alert(this.marryList.bearStatus)
             if(this.marryList.marryStatus===3){
               this.showOldSpouse = true;
             } else{
@@ -913,12 +925,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();
           });
@@ -941,12 +955,16 @@
     //淇敼鍚庣殑淇濆瓨
 
     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))
+	  // console.log(this.bear)
+	  // alert(this.bear)
+	  // 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

--
Gitblit v1.9.1