From fbec0a50ff9a4e4afb5ac7cbb965020acb9db2c7 Mon Sep 17 00:00:00 2001
From: yz3456 <2753272399@qq.com>
Date: 星期五, 10 五月 2024 15:35:10 +0800
Subject: [PATCH] 备忘录添加了fid
---
ruoyi-ui/src/views/marry/index.vue | 232 +++++++++++++++++++++++++++++++++++++--------------------
1 files changed, 150 insertions(+), 82 deletions(-)
diff --git a/ruoyi-ui/src/views/marry/index.vue b/ruoyi-ui/src/views/marry/index.vue
index 972d91d..a37d005 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
@@ -7,50 +7,43 @@
></el-button>
</el-backtop>
<h2 style="font-size:30px;padding-top:0px">濠氬Щ鐘跺喌鐧昏琛�</h2>
- <el-row :gutter="10" class="mb8">
- <el-col :span="1.5">
- <el-button
- type="warning"
- plain
- icon="el-icon-download"
- size="mini"
- @click="handleExport"
- v-hasPermi="['family:note:export']"
- >瀵煎嚭</el-button>
- </el-col>
- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
- </el-row>
<el-divider />
<!-- 鍩烘湰淇℃伅-->
- <h2 style="font-size:21px">鍩烘湰鎯呭喌</h2>
+ <!-- <h2 style="font-size:21px">鍩烘湰鎯呭喌</h2>
<el-container>
- <div style="padding-left:0px" >
+ <div style="padding-left:0px;width: 28%;" >
<el-container >
<el-col >
<el-form ref="elForm" :model="marryList" :rules="rules" size="medium" label-position="left"
v-loading="loading" :data="marryList" @selection-change="handleSelectionChange" >
<el-row :span="16">
- <el-form-item label="濮撳悕" prop="name" label-width="40px">
+ <el-form-item label="濮撳悕" prop="name" label-width="50px">
<el-input v-model="marryList.name " placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
</el-input>
</el-form-item>
</el-row>
<el-row :span="16">
- <el-form-item label="鍑虹敓鏃ユ湡" prop="birthday" label-width="70px">
- <el-input v-model="marryList.birthday" placeholder="" type="date" clearable :style="{width: '100%'}" :disabled="dsb">
- </el-input>
+ <el-form-item label="鍑虹敓鏃ユ湡" prop="birthday" label-width="75px">
+
+ <el-date-picker v-model="marryList.birthday"
+ type="date"
+ placeholder="璇烽�夋嫨鏃ユ湡"
+ :editable="false"
+ :clearable="false"
+ :style="{width: '100%'}"
+ :disabled="dsb" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
</el-row>
<el-row :span="16">
- <el-form-item label="韬唤璇佸彿鐮�" prop="id" label-width="85px">
+ <el-form-item label="韬唤璇佸彿鐮�" prop="id" label-width="95px">
<el-input v-model="marryList.id" placeholder="" clearable :style="{width: '100%'}" :disabled="dsb">
</el-input>
</el-form-item>
</el-row>
<el-row :span="16">
- <el-form-item label="濠氬Щ鐘跺喌" prop="marryStatus" label-width="70px">
+ <el-form-item label="濠氬Щ鐘跺喌" prop="marryStatus" label-width="80px" >
<template v-if="!isEditing">
<el-input v-if="marryList.marryStatus===0" placeholder="鏈" style="" :disabled="dsb"></el-input>
<el-input v-if="marryList.marryStatus===1" placeholder="鍒濆" :disabled="dsb"></el-input>
@@ -59,7 +52,7 @@
</template>
<template v-else>
- <el-select v-model="mrs" placeholder="璇烽�夋嫨濠氬Щ鐘舵��" clearable :style="{width: '100%'}">
+ <el-select v-model="mrs" placeholder="璇烽�夋嫨濠氬Щ鐘舵��" clearable :style="{width: '100%'}" @change="handleMarryStatusChange">
<el-option label="鏈" value='0'></el-option>
<el-option label="鍒濆" value='1'></el-option>
<el-option label="绂诲" value='2'></el-option>
@@ -82,7 +75,7 @@
</el-col>
</el-container>
</div>
- <div style="padding-left:200px">
+ <div style="width: 35%;padding-left: 100px;">
<el-container>
<el-col v-loading="loading" :data="marryList" @selection-change="handleSelectionChange">
<el-form ref="elForm" :model="marryList" :rules="rules" size="medium" label-position="left">
@@ -114,8 +107,8 @@
</el-row>
<el-row :span="16">
<el-form-item label="缁撳鏃堕棿" prop="marryTime" label-width="70px">
- <el-input v-model="marryList.marryTime" placeholder="" type="date" clearable :style="{width: '100%'}" :disabled="dsb">
- </el-input>
+ <el-date-picker v-model="marryList.marryTime" type="date" placeholder="璇烽�夋嫨鏃ユ湡" :editable="false" :clearable="false" :style="{width: '100%'}" :disabled="dsb" value-format="yyyy-MM-dd">
+ </el-date-picker>
</el-form-item>
</el-row>
</el-form>
@@ -125,29 +118,11 @@
- <div style="padding-left:400px;padding-top:30px" >
- <el-container >
-
- <el-row >
- <el-button
- type="primary"
- @click="handleEdit()"
- v-if="isShow"
- v-hasPermi="['system:role:edit']"
- >缂栬緫</el-button>
- <el-button v-if="isShow_2" type="primary" @click="submitForm" :disabled="dsb">瀹屾垚</el-button>
- <br>
-
- </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" >
+ <div style="padding-top:15px;width: 28%;" >
<el-container >
<el-col >
<el-form ref="elForm" :model="marryList" :rules="rules" size="medium" label-position="left"
@@ -160,8 +135,8 @@
</el-row>
<el-row :span="16">
<el-form-item label="鍑虹敓鏃ユ湡" prop="spouseBirthday" label-width="70px">
- <el-input v-model="marryList.spouseBirthday" placeholder="" type="date" clearable :style="{width: '100%'}" :disabled="dsb">
- </el-input>
+ <el-date-picker v-model="marryList.spouseBirthday" type="date" placeholder="璇烽�夋嫨鏃ユ湡" :editable="false" :clearable="false" :style="{width: '100%'}" :disabled="dsb" value-format="yyyy-MM-dd">
+ </el-date-picker>
</el-form-item>
</el-row>
<el-row :span="16">
@@ -202,7 +177,7 @@
</el-col>
</el-container>
</div>
- <div style="padding-left:200px;padding-top:15px">
+ <div style="padding-left:100px;padding-top:15px;width: 30%;">
<el-container>
<el-col v-loading="loading" :data="marryList" @selection-change="handleSelectionChange">
<el-form ref="elForm" :model="marryList" :rules="rules" size="medium" label-position="left">
@@ -235,8 +210,8 @@
</el-row>
<el-row :span="16">
<el-form-item label="缁撳鏃堕棿" prop="spouseMarryTime" label-width="70px">
- <el-input v-model="marryList.spouseMarryTime" placeholder="" type="date" clearable :style="{width: '100%'}" :disabled="dsb">
- </el-input>
+ <el-date-picker v-model="marryList.spouseMarryTime" type="date" placeholder="璇烽�夋嫨鏃ユ湡" :editable="false" :clearable="false" :style="{width: '100%'}" :disabled="dsb" value-format="yyyy-MM-dd">
+ </el-date-picker>
</el-form-item>
</el-row>
</el-form>
@@ -244,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 >
@@ -256,7 +269,7 @@
<!-- </el-dialog> self:user:export-->
</el-container>
- <div>
+ <div v-if="showOldSpouse">
<el-collapse v-model="activeNames" @change="handleChange">
<el-collapse-item name="1" >
@@ -296,8 +309,8 @@
<el-table-column label="鍑虹敓鏃ユ湡" prop="birthday" sortable width="150" align="center" >
<template slot-scope="scope">
<template v-if="!scope.row.isEdit">{{ scope.row.birthday }}</template>
- <template v-else><el-input v-model="scope.row.birthday" type="date" placeholder="閫夋嫨鏃ユ湡">
- </el-input></template>
+ <template v-else><el-date-picker v-model="scope.row.birthday" type="date" placeholder="璇烽�夋嫨鏃ユ湡" :editable="false" :clearable="false" :style="{width: '100%'}" value-format="yyyy-MM-dd">
+ </el-date-picker></template>
</template>
</el-table-column>
<el-table-column label="鎴风睄鍦板潃" prop="address" sortable width="180" align="center" >
@@ -340,8 +353,8 @@
<el-table-column label="缁撳鏃堕棿" prop="marryTime" sortable width="150" align="center" >
<template slot-scope="scope">
<template v-if="!scope.row.isEdit">{{ scope.row.marryTime }}</template>
- <template v-else><el-input v-model="scope.row.marryTime" type="date" placeholder="閫夋嫨鏃ユ湡">
- </el-input></template>
+ <template v-else><el-date-picker v-model="scope.row.marryTime" type="date" placeholder="璇烽�夋嫨鏃ユ湡" :editable="false" :clearable="false" :style="{width: '100%'}" value-format="yyyy-MM-dd">
+ </el-date-picker></template>
</template>
</el-table-column>
<!-- 鎿嶄綔 -->
@@ -431,14 +444,14 @@
<el-row :span="16" >
<el-form-item label="棰嗚瘉鏃堕棿" prop="handbookTime" label-width="70px">
- <el-input v-model="marryList.handbookTime " placeholder="" type="date" clearable :style="{width: '100%'}" :disabled="dsb">
- </el-input>
+ <el-date-picker v-model="marryList.handbookTime" type="date" placeholder="璇烽�夋嫨鏃ユ湡" :editable="false" :clearable="false" :style="{width: '100%'}" :disabled="dsb" value-format="yyyy-MM-dd">
+ </el-date-picker>
</el-form-item>
</el-row>
<el-row :span="16">
<el-form-item label="棰嗚瘉鏃堕棿" prop="oneBornTime" label-width="70px">
- <el-input v-model="marryList.oneBornTime" placeholder="" type="date" clearable :style="{width: '100%'}" :disabled="dsb">
- </el-input>
+ <el-date-picker v-model="marryList.oneBornTime" type="date" placeholder="璇烽�夋嫨鏃ユ湡" :editable="false" :clearable="false" :style="{width: '100%'}" :disabled="dsb" value-format="yyyy-MM-dd">
+ </el-date-picker>
</el-form-item>
</el-row>
@@ -478,11 +491,8 @@
</el-select>
</el-form-item>
<el-form-item label="鍑虹敓鏃ユ湡" prop="birthday">
- <el-input
- v-model='formDat.birthday'
- type='date'
- placeholder='閫夋嫨鏃ユ湡'
- ></el-input>
+ <el-date-picker v-model="formDat.birthday" type="date" placeholder="璇烽�夋嫨鏃ユ湡" :editable="false" :clearable="false" :style="{width: '100%'}" value-format="yyyy-MM-dd">
+ </el-date-picker>
</el-form-item>
<el-form-item label="姘戞棌" prop="nation">
<el-input v-model="formDat.nation" placeholder="璇疯緭鍏ユ皯鏃�" clearable :style="{width: '100%'}" >
@@ -506,11 +516,8 @@
</el-select>
</el-form-item>
<el-form-item label="缁撳鏃堕棿" prop="marryTime">
- <el-input
- v-model='formDat.marryTime'
- type='date'
- placeholder='閫夋嫨鏃ユ湡'
- ></el-input>
+ <el-date-picker v-model="formDat.marryTime" type="date" placeholder="璇烽�夋嫨鏃ユ湡" :editable="false" :clearable="false" :style="{width: '100%'}" value-format="yyyy-MM-dd">
+ </el-date-picker>
</el-form-item>
@@ -539,6 +546,7 @@
data() {
return {
+ showOldSpouse:false,//鏄剧ず鍓嶄换淇℃伅
// 閬僵灞�
disabled: false,
isEditing:false,
@@ -562,6 +570,7 @@
limitCountImg:1,//涓婁紶鍥剧墖鐨勬渶澶ф暟閲�
//涓汉淇℃伅鏁版嵁
marryList:{
+ id:undefined,
name:undefined,
sex:undefined,
birthday:undefined,
@@ -590,16 +599,18 @@
},
fit:['fill'],
- oldSpouseList:{},
//涓嬫媺瀹炵幇
activeNames:['1'],
// 寮瑰嚭灞傛爣棰�
title: "",
+ iddd:undefined,
// 鏄惁鏄剧ず寮瑰嚭灞�
open: false,
// open:true,
// 鏄惁鏄剧ず寮瑰嚭灞傦紙鏁版嵁鏉冮檺锛�
bear:undefined,
+ handsj:undefined,
+ onebear:undefined,
mrs:undefined,
smrs:undefined,
openDataScope: false,
@@ -610,7 +621,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:[
@@ -621,7 +635,6 @@
btn:false,
isShow:true,
isShow_2:false,
- oldSpouseList:undefined,
oldSpouseList:{
name:undefined,
sex:undefined,
@@ -661,10 +674,33 @@
},
// 琛ㄥ崟鏍¢獙
rules: {
-
+ idNo: [{
+ // required: true,
+ message: '璇疯緭鍏ヨ韩浠借瘉鍙风爜',
+ trigger: 'blur'
+ }],
+ name: [{
+ // required: true,
+ message: '璇疯緭鍏ュ鍚�',
+ trigger: 'blur'
+ }],
+ birthday: [{
+ // required: true,
+ message: '璇烽�夋嫨鏃ユ湡',
+ trigger: 'change'
+ }],
+ marryStatus: [{
+ // required: true,
+ message: '璇烽�夋嫨濠氬Щ鐘跺喌',
+ trigger: 'change'
+ }],
+ marryTime: [{
+ // required: true,
+ message: '璇烽�夋嫨缁撳鏃堕棿',
+ trigger: 'change'
+ }],
},
- typeOptions: [],
typeOptions: [ {
value: '濂�',
label: '濂�',
@@ -695,6 +731,17 @@
this.getList()
},
methods: {
+
+ handleMarryStatusChange() {
+ // 鍒ゆ柇褰撳墠閫変腑鐨勫濮荤姸鎬佹槸鍚︿负鍐嶅
+ if (this.mrs === '3') {
+ this.showOldSpouse = true;
+ } else {
+ this.showOldSpouse = false;
+ }
+
+ },
+
//鎬у埆
getSrc1(sex) {
if (sex === '濂�') {
@@ -708,6 +755,7 @@
cancelData() {
this.open = false;
this.reset();
+
},
//涓嬫媺
handleChange(val) {
@@ -726,17 +774,28 @@
//涓汉淇℃伅
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;
this.oldSpouseList = this.marryList.oldSpouseList;
- this.loading = false;
console.log(111)
- console.log(this.oldSpouseList)
+ console.log("淇℃伅")
+ 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{
+ this.showOldSpouse = false;
+ }
+ this.loading = false;
+
}
}
@@ -873,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();
});
@@ -901,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 => {
@@ -922,6 +988,7 @@
this.dsb = true
this.isShow_2=false
this.isShow = true
+ this.getList()
}).catch(error => {
console.error(error);
@@ -933,6 +1000,7 @@
}
}
})
+ this.getList()
// 鍒锋柊椤甸潰
// window.location.reload();
},
--
Gitblit v1.9.1