be737fae by 杨炀

+香港身份证识别 港澳xx

信息变更 未修改信息不能提交
1 parent 89213734
...@@ -150,7 +150,7 @@ export function createMyMember(data) { ...@@ -150,7 +150,7 @@ export function createMyMember(data) {
150 } 150 }
151 export function updateUserPwd(data) { 151 export function updateUserPwd(data) {
152 return request({ 152 return request({
153 url: `/system/user/profile/updatePwd?oldPassword=${encodeURIComponent(data.oldPassword)}&newPassword=${encodeURIComponent(data.oldPassword)}`, 153 url: `/system/user/profile/updatePwd?oldPassword=${encodeURIComponent(data.oldPassword)}&newPassword=${encodeURIComponent(data.newPassword)}`,
154 method: 'put', 154 method: 'put',
155 params: data 155 params: data
156 }) 156 })
......
...@@ -54,8 +54,8 @@ function getCodeImg() { ...@@ -54,8 +54,8 @@ function getCodeImg() {
54 // 代退图形认证的获取手机验证码 54 // 代退图形认证的获取手机验证码
55 function getSmsCode(data) { 55 function getSmsCode(data) {
56 return request({ 56 return request({
57 url: '/captchaSmsWithCaptchaImage', 57 // url: '/captchaSmsWithCaptchaImage',
58 // url: '/captchaSmsWithCaptchaImageForMiniApp', 58 url: '/captchaSmsWithCaptchaImageForMiniApp',
59 method: 'post', 59 method: 'post',
60 params: data 60 params: data
61 }) 61 })
......
...@@ -183,8 +183,7 @@ function goDetail(item) { ...@@ -183,8 +183,7 @@ function goDetail(item) {
183 let path = `/group/apply/mergeUpDetail?&form=${form}` 183 let path = `/group/apply/mergeUpDetail?&form=${form}`
184 uni.navigateTo({ 184 uni.navigateTo({
185 url: path 185 url: path
186 }); 186 });
187
188 } 187 }
189 function goMerge(){ 188 function goMerge(){
190 let path = `/group/apply/merge` 189 let path = `/group/apply/merge`
......
...@@ -240,7 +240,10 @@ ...@@ -240,7 +240,10 @@
240 icon: 'none' 240 icon: 'none'
241 }) 241 })
242 countDown.value.start = true 242 countDown.value.start = true
243 }).catch(getCode) 243 }).catch(res=>{
244 console.log(res.data.msg)
245 getCode()
246 })
244 } 247 }
245 248
246 function timeup() { 249 function timeup() {
......
1 <template> 1 <template>
2 <view class="hasfixedbottom"> 2 <view class="hasfixedbottom">
3 3
4 <view class="flexbox mb30"> 4 <view class="flexbox mb30">
5 <button class="btn-red-kx mini w100" @click="chooseOnline"> 5 <button class="btn-red-kx mini w100" @click="chooseOnline">
6 <uni-icons type="personadd" size="16" color="#AD181F"></uni-icons> 6 <uni-icons type="personadd" size="16" color="#AD181F"></uni-icons>
7 在线选择</button> 7 在线选择</button>
8 </view> 8 </view>
9 9
10 <uni-swipe-action> 10 <uni-swipe-action>
11 <uni-swipe-action-item class="personitem" v-for="n in list" :key="n.id"> 11 <uni-swipe-action-item class="personitem" v-for="n in list" :key="n.id">
12 <uni-collapse> 12 <uni-collapse>
13 <uni-collapse-item :title="n.oldName+'('+n.personCode+')' +' - '+ n.memName"> 13 <uni-collapse-item :title="n.oldName+'('+n.personCode+')' +' - '+ n.memName">
14 <view class="collapseBody"> 14 <view class="collapseBody">
15 <view> 15 <view>
16 <label>姓名:</label> 16 <label>姓名:</label>
17 {{n.oldName}} 17 {{n.oldName}}
18 <text class="text-primary" @click="handleChange(n,'newName')">变更 </text> 18 <text class="text-primary" @click="handleChange(n,'newName')">变更 </text>
19 <text class="text-danger" v-if="n.oldName!=n.newName">{{ n.newName }}</text> 19 <text class="text-danger" v-if="n.oldName!=n.newName">{{ n.newName }}</text>
20 </view> 20 </view>
21 <view> 21 <view>
22 <label>性别:</label> 22 <label>性别:</label>
23 {{ n.oldSex==0?'男':'女' }} 23 {{ n.oldSex==0?'男':'女' }}
24 <text class="text-primary" @click="handleChange(n,'newSex')">变更 </text> 24 <text class="text-primary" @click="handleChange(n,'newSex')">变更 </text>
25 <text class="text-danger" v-if="n.oldSex!=n.newSex">{{ n.newSex==0?'男':'女' }}</text> 25 <text class="text-danger" v-if="n.oldSex!=n.newSex">{{ n.newSex==0?'男':'女' }}</text>
26 </view> 26 </view>
27 <view> 27 <view>
28 <label>证件类型:</label> 28 <label>证件类型:</label>
29 {{ cardType[n.oldIdcType].text }} 29 {{ cardType[n.oldIdcType].text }}
30 <text class="text-primary" @click="handleChange(n,'newIdcType')">变更 </text> 30 <text class="text-primary" @click="handleChange(n,'newIdcType')">变更 </text>
31 <text class="text-danger" 31 <text class="text-danger"
32 v-if="n.oldIdcType!=n.newIdcType">{{ cardType[n.newIdcType].text }} </text> 32 v-if="n.oldIdcType!=n.newIdcType">{{ cardType[n.newIdcType].text }} </text>
33 </view> 33 </view>
34 <view> 34 <view>
35 <label>证件号:</label> 35 <label>证件号:</label>
36 {{ n.oldIdcCode }} 36 {{ n.oldIdcCode }}
37 <text class="text-primary" @click="handleChange(n,'newIdcCode')">变更 </text> 37 <text class="text-primary" @click="handleChange(n,'newIdcCode')">变更 </text>
38 <text class="text-danger" v-if="n.oldIdcCode!=n.newIdcCode">{{ n.newIdcCode }}</text> 38 <text class="text-danger" v-if="n.oldIdcCode!=n.newIdcCode">{{ n.newIdcCode }}</text>
39 </view> 39 </view>
40 <view> 40 <view>
41 <label>出生日期:</label> 41 <label>出生日期:</label>
42 {{ n.oldBirth?.slice(0,10) }} 42 {{ n.oldBirth?.slice(0,10) }}
43 <text v-if="n.generateFlag==1&&n.newIdcType==0" class="text-gray">变更 </text> 43 <text v-if="n.generateFlag==1&&n.newIdcType==0" class="text-gray">变更 </text>
44 <text v-else class="text-primary" @click="handleChange(n,'newBirth')">变更 </text> 44 <text v-else class="text-primary" @click="handleChange(n,'newBirth')">变更 </text>
45 <text class="text-danger" 45 <text class="text-danger"
46 v-if="n.oldBirth!=n.newBirth">{{ n.newBirth?.slice(0,10) }}</text> 46 v-if="n.oldBirth!=n.newBirth">{{ n.newBirth?.slice(0,10) }}</text>
47 </view> 47 </view>
48 <view style="display: flex;"> 48 <view style="display: flex;">
49 <label><text class="text-danger">*</text>附件:</label> 49 <label><text class="text-danger">*</text>附件:</label>
50 <view class="content"> 50 <view class="content">
51 <uni-file-picker limit="1" v-model="n.fileUrl" file-extname="png,jpg,jpeg,pdf,zip" 51 <uni-file-picker limit="1" v-model="n.fileUrl" file-extname="png,jpg,jpeg,pdf,zip"
52 file-mediatype="all" @select="selectFile(n,$event)" 52 file-mediatype="all" @select="selectFile(n,$event)"
53 @delete="delSupplementFile(n)"></uni-file-picker> 53 @delete="delSupplementFile(n)"></uni-file-picker>
54 <text class="text-danger">*需上传证件照等有效资料</text> 54 <text class="text-danger">*需上传证件照等有效资料</text>
55 </view> 55 </view>
56 </view> 56 </view>
57 <!-- <view> 57 <!-- <view>
58 <label>开始日期:</label> 58 <label>开始日期:</label>
59 {{ n.oldBeginTime?.slice(0,10) }} 59 {{ n.oldBeginTime?.slice(0,10) }}
60 <text class="text-primary" @click="handleChange(n,'newBeginTime')">变更 </text> 60 <text class="text-primary" @click="handleChange(n,'newBeginTime')">变更 </text>
...@@ -70,366 +70,381 @@ ...@@ -70,366 +70,381 @@
70 v-if="n.oldValiDate!=n.newValiDate">{{ n.newValiDate?.slice(0,10) }}</text> 70 v-if="n.oldValiDate!=n.newValiDate">{{ n.newValiDate?.slice(0,10) }}</text>
71 </view> --> 71 </view> -->
72 72
73 </view> 73 </view>
74 74
75 </uni-collapse-item> 75 </uni-collapse-item>
76 </uni-collapse> 76 </uni-collapse>
77 77
78 <template v-slot:right> 78 <template v-slot:right>
79 <view class="slot-button"> 79 <view class="slot-button">
80 <view class="danger-button" @click="handleDelete(n)"> 80 <view class="danger-button" @click="handleDelete(n)">
81 <uni-icons type="trash" color="#fff" size="20"></uni-icons> 81 <uni-icons type="trash" color="#fff" size="20"></uni-icons>
82 <text class="slot-button-text">删除</text> 82 <text class="slot-button-text">删除</text>
83 </view> 83 </view>
84 </view> 84 </view>
85 </template> 85 </template>
86 </uni-swipe-action-item> 86 </uni-swipe-action-item>
87 </uni-swipe-action> 87 </uni-swipe-action>
88 <view class="nodata" v-if="list.length==0"> 88 <view class="nodata" v-if="list.length==0">
89 <image mode="aspectFit" src="/static/nodata.png"></image> 89 <image mode="aspectFit" src="/static/nodata.png"></image>
90 <text>请选择变更会员</text> 90 <text>请选择变更会员</text>
91 </view> 91 </view>
92 92
93 <view class="fixedBottom"> 93 <view class="fixedBottom">
94 <button class="btn-red" :disabled="list?.length <= 0" @click="commitFN">保存并提交</button> 94 <button class="btn-red" :disabled="list?.length <= 0" @click="commitFN">保存并提交</button>
95 </view> 95 </view>
96 96
97 97
98 98
99 <uni-popup ref="popup" type="bottom" background-color="#fff"> 99 <uni-popup ref="popup" type="bottom" background-color="#fff">
100 <view class="popBody"> 100 <view class="popBody">
101 <view class="h3 text-center mb30">信息变更</view> 101 <view class="h3 text-center mb30">信息变更</view>
102 <uni-forms class="mt30"> 102 <uni-forms class="mt30">
103 <view style="min-height: 30vh"> 103 <view style="min-height: 30vh">
104 <uni-forms-item label="姓名:" v-show="type=='newName'"> 104 <uni-forms-item label="姓名:" v-show="type=='newName'">
105 <uni-easyinput v-model="form.newName" placeholder="请输入" /> 105 <uni-easyinput v-model="form.newName" placeholder="请输入" />
106 </uni-forms-item> 106 </uni-forms-item>
107 <uni-forms-item label="性别:" v-show="type=='newSex'"> 107 <uni-forms-item label="性别:" v-show="type=='newSex'">
108 <uni-data-checkbox v-model="form.newSex" :localdata="sexs" /> 108 <uni-data-checkbox v-model="form.newSex" :localdata="sexs" />
109 </uni-forms-item> 109 </uni-forms-item>
110 <uni-forms-item label="证件类型:" v-show="type=='newIdcType'"> 110 <uni-forms-item label="证件类型:" v-show="type=='newIdcType'">
111 <uni-data-select v-model="form.newIdcType" :localdata="cardType1" 111 <uni-data-select v-model="form.newIdcType" :localdata="cardType1"
112 :clear='false'></uni-data-select> 112 :clear='false'></uni-data-select>
113 </uni-forms-item> 113 </uni-forms-item>
114 <uni-forms-item label="证件号码:" v-show="type=='newIdcCode'"> 114 <uni-forms-item label="证件号码:" v-show="type=='newIdcCode'">
115 <uni-easyinput v-model="form.newIdcCode" placeholder="请输入" /> 115 <uni-easyinput v-model="form.newIdcCode" placeholder="请输入" />
116 </uni-forms-item> 116 </uni-forms-item>
117 <uni-forms-item label="出生日期:" v-show="type=='newBirth'"> 117 <uni-forms-item label="出生日期:" v-show="type=='newBirth'">
118 <uni-datetime-picker type="datetime" placeholder="YYYY-MM-DD" :clear-icon="false" 118 <uni-datetime-picker type="datetime" placeholder="YYYY-MM-DD" :clear-icon="false"
119 v-model="form.newBirth" /> 119 v-model="form.newBirth" />
120 </uni-forms-item> 120 </uni-forms-item>
121 <uni-forms-item label="开始日期:" v-show="type=='newBeginTime'"> 121 <uni-forms-item label="开始日期:" v-show="type=='newBeginTime'">
122 <uni-datetime-picker type="datetime" placeholder="YYYY-MM-DD" :clear-icon="false" 122 <uni-datetime-picker type="datetime" placeholder="YYYY-MM-DD" :clear-icon="false"
123 v-model="form.newBeginTime" /> 123 v-model="form.newBeginTime" />
124 </uni-forms-item> 124 </uni-forms-item>
125 <uni-forms-item label="有效日期:" v-show="type=='newValiDate'"> 125 <uni-forms-item label="有效日期:" v-show="type=='newValiDate'">
126 <uni-datetime-picker type="datetime" placeholder="YYYY-MM-DD" :clear-icon="false" 126 <uni-datetime-picker type="datetime" placeholder="YYYY-MM-DD" :clear-icon="false"
127 v-model="form.newValiDate" /> 127 v-model="form.newValiDate" />
128 </uni-forms-item> 128 </uni-forms-item>
129 </view> 129 </view>
130 130
131 </uni-forms> 131 </uni-forms>
132 <view class="text-center"> 132 <view class="text-center">
133 <button class="btn-red-kx" @click="submitForm(type)">保存</button> 133 <button class="btn-red-kx" @click="submitForm(type)">保存</button>
134 </view> 134 </view>
135 135
136 </view> 136 </view>
137 </uni-popup> 137 </uni-popup>
138 138
139 <uni-popup ref="choseStudent" type="bottom" background-color="#fff" animation> 139 <uni-popup ref="choseStudent" type="bottom" background-color="#fff" animation>
140 <view class="popBody"> 140 <view class="popBody">
141 <view class="userlist" style="max-height:80vh;overflow: auto;"> 141 <view class="userlist" style="max-height:80vh;overflow: auto;">
142 <view class="item" v-for=" (n,index) in studentList" :key="index"> 142 <view class="item" v-for=" (n,index) in studentList" :key="index">
143 <view @click="checkThis(n)"> 143 <view @click="checkThis(n)">
144 <image class="icon" v-if="n.checked" 144 <image class="icon" v-if="n.checked"
145 :src="config.baseUrl_api+'/fs/static/member/dx_dwn.png'" /> 145 :src="config.baseUrl_api+'/fs/static/member/dx_dwn.png'" />
146 <image class="icon" v-else :src="config.baseUrl_api+'/fs/static/member/dx.png'" /> 146 <image class="icon" v-else :src="config.baseUrl_api+'/fs/static/member/dx.png'" />
147 </view> 147 </view>
148 <view> 148 <view>
149 <view class="name">{{n.name}} <text>{{n.perCode}}</text></view> 149 <view class="name">{{n.name}} <text>{{n.perCode}}</text></view>
150 <view class="date">{{ cardType[n.idcType]?.text }}:{{n.idcCode}}</view> 150 <view class="date">{{ cardType[n.idcType]?.text }}:{{n.idcCode}}</view>
151 </view> 151 </view>
152 </view> 152 </view>
153 <view class="nodata" v-if="studentList.length==0"> 153 <view class="nodata" v-if="studentList.length==0">
154 <image mode="aspectFit" src="/static/nodata.png"></image> 154 <image mode="aspectFit" src="/static/nodata.png"></image>
155 <text>无可变更会员</text> 155 <text>无可变更会员</text>
156 </view> 156 </view>
157 </view> 157 </view>
158 <button class="btn-red-kx" v-if="studentList.length!=0" @click="handleImport">批量添加</button> 158 <button class="btn-red-kx" v-if="studentList.length!=0" @click="handleImport">批量添加</button>
159 </view> 159 </view>
160 </uni-popup> 160 </uni-popup>
161 161
162 </view> 162 </view>
163 </template> 163 </template>
164 164
165 <script setup> 165 <script setup>
166 import { 166 import {
167 ref 167 ref
168 } from 'vue' 168 } from 'vue'
169 import { 169 import {
170 onLoad, 170 onLoad,
171 onShow 171 onShow
172 } from '@dcloudio/uni-app' 172 } from '@dcloudio/uni-app'
173 import * as api from '@/common/api.js' 173 import * as api from '@/common/api.js'
174 import config from '/config.js' 174 import config from '/config.js'
175 const queryParams = ref({}) 175 const queryParams = ref({})
176 const total = ref(0) 176 const total = ref(0)
177 const list = ref([]) 177 const list = ref([])
178 const popup = ref(null) 178 const popup = ref(null)
179 const choseStudent = ref(null) 179 const choseStudent = ref(null)
180 const studentList = ref([]) 180 const studentList = ref([])
181 const type = ref('') 181 const type = ref('')
182 const form = ref({}) 182 const form = ref({})
183 const sexs = ref([{ 183 const sexs = ref([{
184 text: '男', 184 text: '男',
185 value: '0' 185 value: '0'
186 }, { 186 }, {
187 text: '女', 187 text: '女',
188 value: '1' 188 value: '1'
189 }]) 189 }])
190 const cardType = ref([{ 190 const cardType = ref([{
191 text: '身份证', 191 text: '身份证',
192 value: '0' 192 value: '0'
193 }, 193 },
194 { 194 {
195 text: '港澳台通行证 ', 195 text: '来往大陆(内地)通行证',
196 value: '1' 196 value: '1'
197 }, 197 },
198 { 198 {
199 text: '中国护照', 199 text: '中国护照',
200 value: '2' 200 value: '2'
201 }, 201 },
202 { 202 {
203 text: '外国护照', 203 text: '护照',
204 value: '3' 204 value: '3'
205 }, 205 },
206 { 206 {
207 text: '其它', 207 text: '其它',
208 value: '4' 208 value: '4'
209 }, 209 },
210 { 210 {
211 text: '户口本', 211 text: '香港身份证',
212 value: '5' 212 value: '5'
213 } 213 },
214 ]) 214 {
215 const cardType1 = ref([{ 215 text: '往来港澳台通行证',
216 text: '身份证', 216 value: '6'
217 value: '0' 217 }
218 }, 218 ])
219 { 219 const cardType1 = ref([{
220 text: '港澳台通行证 ', 220 text: '身份证',
221 value: '1' 221 value: '0'
222 }, 222 },
223 { 223 {
224 text: '外国护照', 224 text: '来往大陆(内地)通行证',
225 value: '3' 225 value: '1'
226 }, 226 }, {
227 { 227 text: '护照',
228 text: '户口本', 228 value: '3'
229 value: '5' 229 },
230 } 230 {
231 ]) 231 text: '香港身份证',
232 onLoad((option) => { 232 value: '5'
233 if (option.rangeId) { 233 }
234 queryParams.value.rangeId = option.rangeId 234 ])
235 getList() 235 onLoad((option) => {
236 } 236 if (option.rangeId) {
237 }) 237 queryParams.value.rangeId = option.rangeId
238 onShow((option) => { 238 getList()
239 console.log(option) 239 }
240 if(option){ 240 })
241 queryParams.value.rangeId = option 241 onShow((option) => {
242 getList() 242 console.log(option)
243 } 243 if (option) {
244 }) 244 queryParams.value.rangeId = option
245 245 getList()
246 function getList() { 246 }
247 uni.showLoading({ 247 })
248 title: '加载中' 248
249 }) 249 function getList() {
250 api.addInfoModeList(queryParams.value).then(res => { 250 uni.showLoading({
251 list.value = res.rows 251 title: '加载中'
252 list.value.forEach(item => { 252 })
253 item.fileUrl = JSON.parse(item.fileUrl) 253 api.addInfoModeList(queryParams.value).then(res => {
254 }) 254 list.value = res.rows
255 total.value = res.total 255 list.value.forEach(item => {
256 uni.hideLoading() 256 item.fileUrl = JSON.parse(item.fileUrl)
257 }) 257 })
258 } 258 total.value = res.total
259 259 uni.hideLoading()
260 function handleChange(a, b) { 260 })
261 type.value = b 261 }
262 form.value = a 262
263 console.log(form.value.newName) 263 function handleChange(a, b) {
264 popup.value.open() 264 type.value = b
265 } 265 form.value = a
266 266 console.log(form.value.newName)
267 function handleDelete(row) { 267 popup.value.open()
268 uni.showModal({ 268 }
269 content: `确认删除会员${row.newName}`, 269
270 success: function(res) { 270 function handleDelete(row) {
271 if (res.confirm) { 271 uni.showModal({
272 api.infoMod([row.id]).then(Response => { 272 content: `确认删除会员${row.newName}`,
273 uni.showToast({ 273 success: function(res) {
274 title: '操作成功' 274 if (res.confirm) {
275 }) 275 api.infoMod([row.id]).then(Response => {
276 if(list.value.length==1){ 276 uni.showToast({
277 queryParams.value.rangeId = '' 277 title: '操作成功'
278 } 278 })
279 getList() 279 if (list.value.length == 1) {
280 }) 280 queryParams.value.rangeId = ''
281 } 281 }
282 } 282 getList()
283 }) 283 })
284 } 284 }
285 285 }
286 function chooseOnline() { 286 })
287 // uni.showLoading({ 287 }
288 // title: '加载中', 288
289 // icon: 'none' 289 function chooseOnline() {
290 // }) 290 // uni.showLoading({
291 // var obj = { 291 // title: '加载中',
292 // paymentRangeId: queryParams.value.rangeId || '-1', 292 // icon: 'none'
293 // multiDeptFlag: 1, 293 // })
294 // perType: 1 294 // var obj = {
295 // } 295 // paymentRangeId: queryParams.value.rangeId || '-1',
296 // api.selectPageList(obj).then(res => { 296 // multiDeptFlag: 1,
297 // studentList.value = res.rows 297 // perType: 1
298 // uni.hideLoading() 298 // }
299 // choseStudent.value.open() 299 // api.selectPageList(obj).then(res => {
300 // }) 300 // studentList.value = res.rows
301 uni.navigateTo({ 301 // uni.hideLoading()
302 url:`/personalVip/changeVipChoseList?rangeId=${queryParams.value.rangeId || '-1'}` 302 // choseStudent.value.open()
303 }) 303 // })
304 304 uni.navigateTo({
305 } 305 url: `/personalVip/changeVipChoseList?rangeId=${queryParams.value.rangeId || '-1'}`
306 306 })
307 function checkThis(n) { 307
308 if (n.checked) { 308 }
309 n.checked = false 309
310 } else { 310 function checkThis(n) {
311 n.checked = true 311 if (n.checked) {
312 } 312 n.checked = false
313 } 313 } else {
314 314 n.checked = true
315 function handleImport() { 315 }
316 var arr = [] 316 }
317 for (var n of studentList.value) { 317
318 if (n.checked) { 318 function handleImport() {
319 arr.push(n.perId) 319 var arr = []
320 } 320 for (var n of studentList.value) {
321 } 321 if (n.checked) {
322 api.addInfoModeToRange({ 322 arr.push(n.perId)
323 perIds: arr, 323 }
324 rangeIdStr: queryParams.value.rangeId || '-1' 324 }
325 }).then(res => { 325 api.addInfoModeToRange({
326 queryParams.value.rangeId = res.data 326 perIds: arr,
327 choseStudent.value.close() 327 rangeIdStr: queryParams.value.rangeId || '-1'
328 getList() 328 }).then(res => {
329 }) 329 queryParams.value.rangeId = res.data
330 } 330 choseStudent.value.close()
331 331 getList()
332 function submitForm(type) { 332 })
333 if (type == 'newIdcCode' && form.value.newIdcType == 0) { 333 }
334 // 验证身份证 334
335 const pattern = 335 function submitForm(type) {
336 /(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}$)/ 336 if (type == 'newIdcCode' && form.value.newIdcType == 0) {
337 if (!pattern.test(form.value.newIdcCode)) { 337 // 验证身份证
338 uni.showToast({ 338 const pattern =
339 title: '请输入正确证件号', 339 /(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}$)/
340 icon: 'none' 340 if (!pattern.test(form.value.newIdcCode)) {
341 }) 341 uni.showToast({
342 form.value.newIdcCode = form.value.oldIdcCode 342 title: '请输入正确证件号',
343 return 343 icon: 'none'
344 } 344 })
345 } 345 form.value.newIdcCode = form.value.oldIdcCode
346 api.personChangeEditMod({ 346 return
347 id: form.value.id, 347 }
348 newBeginTime: form.value.newBeginTime, 348 }
349 newBirth: form.value.newBirth, 349 api.personChangeEditMod({
350 newIdcCode: form.value.newIdcCode, 350 id: form.value.id,
351 newIdcType: form.value.newIdcType, 351 newBeginTime: form.value.newBeginTime,
352 newName: form.value.newName, 352 newBirth: form.value.newBirth,
353 newSex: form.value.newSex, 353 newIdcCode: form.value.newIdcCode,
354 newValiDate: form.value.newValiDate 354 newIdcType: form.value.newIdcType,
355 }).then(res => { 355 newName: form.value.newName,
356 popup.value.close() 356 newSex: form.value.newSex,
357 uni.showToast({ 357 newValiDate: form.value.newValiDate
358 title: '操作成功!' 358 }).then(res => {
359 }) 359 popup.value.close()
360 getList() 360 uni.showToast({
361 }) 361 title: '操作成功!'
362 } 362 })
363 363 getList()
364 function commitFN() { 364 })
365 const flag = list.value.some(item => { 365 }
366 if (!item.fileUrl) { 366
367 uni.showToast({ 367 function commitFN() {
368 title:`请上传${item.newName}的附件`, 368 const flag = list.value.some(item => {
369 icon:'none' 369 if ((item.newName == item.oldName) && (item.newSex == item.oldSex) &&
370 }) 370 (item.oldIdcType == item.newIdcType) && (item.oldIdcCode == item.newIdcCode) &&
371 return !item.fileUrl 371 (item.newBirth == item.oldBirth)
372 } 372 ) {
373 }) 373 uni.showToast({
374 if (flag) return 374 title: `${item.newName}没有变更的信息`,
375 if (form.value.rangeId == '') return 375 icon: 'none'
376 376 })
377 uni.showModal({ 377 return true
378 title: '提示', 378 }
379 content: `确定提交吗`, 379
380 success: function(res) { 380 if (!item.fileUrl) {
381 if (res.confirm) { 381 uni.showToast({
382 api.commitPersonalChange([queryParams.value.rangeId]).then(Response => { 382 title: `请上传${item.newName}的附件`,
383 uni.showToast({ 383 icon: 'none'
384 icon: "none", 384 })
385 title: '提交成功!' 385 return !item.fileUrl
386 }) 386 }
387 uni.navigateBack() 387
388 }) 388
389 } 389 })
390 } 390 if (flag) return
391 }) 391 if (form.value.rangeId == '') return
392 } 392
393 let selectFileValue = {} 393 uni.showModal({
394 394 title: '提示',
395 function selectFile(row, e) { 395 content: `确定提交吗`,
396 form.value = row 396 success: function(res) {
397 let file = e.tempFiles[0] 397 if (res.confirm) {
398 if(!file){ 398 api.commitPersonalChange([queryParams.value.rangeId]).then(Response => {
399 return 399 uni.showToast({
400 } 400 icon: "none",
401 api.uploadFile(e).then(data => { 401 title: '提交成功!'
402 selectFileValue = { 402 })
403 url: data.msg, 403 uni.navigateBack()
404 name: file.name, 404 })
405 extname: file.extname 405 }
406 } 406 }
407 console.log(selectFileValue,row.fileUrl) 407 })
408 uni.showLoading({ 408 }
409 title:'上传中' 409 let selectFileValue = {}
410 }) 410
411 api.personChangeEditMod({ 411 function selectFile(row, e) {
412 id: form.value.id, 412 form.value = row
413 newBeginTime: form.value.newBeginTime, 413 let file = e.tempFiles[0]
414 newBirth: form.value.newBirth, 414 if (!file) {
415 newIdcCode: form.value.newIdcCode, 415 return
416 newIdcType: form.value.newIdcType, 416 }
417 newName: form.value.newName, 417 api.uploadFile(e).then(data => {
418 newSex: form.value.newSex, 418 selectFileValue = {
419 newValiDate: form.value.newValiDate, 419 url: data.msg,
420 fileUrl: JSON.stringify([selectFileValue]) 420 name: file.name,
421 }).then(Response=>{ 421 extname: file.extname
422 uni.hideLoading() 422 }
423 getList() 423 console.log(selectFileValue, row.fileUrl)
424 }) 424 uni.showLoading({
425 }); 425 title: '上传中'
426 } 426 })
427 427 api.personChangeEditMod({
428 function delSupplementFile(row) { 428 id: form.value.id,
429 selectFileValue = {} 429 newBeginTime: form.value.newBeginTime,
430 row.fileUrl = [] 430 newBirth: form.value.newBirth,
431 } 431 newIdcCode: form.value.newIdcCode,
432 432 newIdcType: form.value.newIdcType,
433 newName: form.value.newName,
434 newSex: form.value.newSex,
435 newValiDate: form.value.newValiDate,
436 fileUrl: JSON.stringify([selectFileValue])
437 }).then(Response => {
438 uni.hideLoading()
439 getList()
440 })
441 });
442 }
443
444 function delSupplementFile(row) {
445 selectFileValue = {}
446 row.fileUrl = []
447 }
433 </script> 448 </script>
434 <style scoped lang="scss"> 449 <style scoped lang="scss">
435 .flexbox { 450 .flexbox {
...@@ -468,8 +483,10 @@ function delSupplementFile(row) { ...@@ -468,8 +483,10 @@ function delSupplementFile(row) {
468 .text-center .btn-red-kx { 483 .text-center .btn-red-kx {
469 border-radius: 50px; 484 border-radius: 50px;
470 font-size: 28rpx; 485 font-size: 28rpx;
471 } 486 }
472 :deep(.file-picker__progress) { 487
473 opacity: 0;background-color: transparent; 488 :deep(.file-picker__progress) {
489 opacity: 0;
490 background-color: transparent;
474 } 491 }
475 </style> 492 </style>
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
11 v-model="baseFormData.name" placeholder="请输入姓名" /> 11 v-model="baseFormData.name" placeholder="请输入姓名" />
12 </uni-forms-item> 12 </uni-forms-item>
13 <uni-forms-item label="证件类型" required name="idcType"> 13 <uni-forms-item label="证件类型" required name="idcType">
14 <uni-data-select v-model="baseFormData.idcType" style="width: 300rpx;" 14 <uni-data-select v-model="baseFormData.idcType" style="width: 360rpx;"
15 @change="changeIdcType" :clear="false" :disabled="current === 0" 15 @change="changeIdcType" :clear="false" :disabled="current === 0"
16 :localdata="idcTypeList"></uni-data-select> 16 :localdata="idcTypeList"></uni-data-select>
17 </uni-forms-item> 17 </uni-forms-item>
...@@ -150,14 +150,17 @@ ...@@ -150,14 +150,17 @@
150 }, 150 },
151 { 151 {
152 value: '1', 152 value: '1',
153 text: "港澳台通行证" 153 text: "来往大陆(内地)通行证"
154 }, 154 },
155 { 155 {
156 value: '3', 156 value: '3',
157 text: "外国护照" 157 text: "护照"
158 }, { 158 }, {
159 value: '4', 159 value: '4',
160 text: '户口本' 160 text: '户口本'
161 }, {
162 value: '5',
163 text: '香港身份证'
161 } 164 }
162 ]) 165 ])
163 const sexs = ref([{ 166 const sexs = ref([{
......
...@@ -65,7 +65,7 @@ const cardType = ref([{ ...@@ -65,7 +65,7 @@ const cardType = ref([{
65 value: '0' 65 value: '0'
66 }, 66 },
67 { 67 {
68 text: '港澳台通行证 ', 68 text: '来往大陆(内地)通行证',
69 value: '1' 69 value: '1'
70 }, 70 },
71 { 71 {
...@@ -73,7 +73,7 @@ const cardType = ref([{ ...@@ -73,7 +73,7 @@ const cardType = ref([{
73 value: '2' 73 value: '2'
74 }, 74 },
75 { 75 {
76 text: '外国护照', 76 text: '护照',
77 value: '3' 77 value: '3'
78 }, 78 },
79 { 79 {
...@@ -81,8 +81,12 @@ const cardType = ref([{ ...@@ -81,8 +81,12 @@ const cardType = ref([{
81 value: '4' 81 value: '4'
82 }, 82 },
83 { 83 {
84 text: '户口本', 84 text: '香港身份证',
85 value: '5' 85 value: '5'
86 },
87 {
88 text: '往来港澳台通行证',
89 value: '6'
86 } 90 }
87 ]) 91 ])
88 onLoad((option) => { 92 onLoad((option) => {
......
...@@ -94,15 +94,15 @@ ...@@ -94,15 +94,15 @@
94 value: '2' 94 value: '2'
95 }, 95 },
96 { 96 {
97 label: '外国护照', 97 label: '护照',
98 value: '3' 98 value: '3'
99 }, 99 },
100 { 100 {
101 label: '其它', 101 label: '户口本',
102 value: '4' 102 value: '4'
103 }, 103 },
104 { 104 {
105 label: '户口本', 105 label: '香港身份证',
106 value: '5' 106 value: '5'
107 } 107 }
108 ]) 108 ])
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
57 value: '0' 57 value: '0'
58 }, 58 },
59 { 59 {
60 label: '港澳台通行证 ', 60 label: '来往大陆(内地)通行证',
61 value: '1' 61 value: '1'
62 }, 62 },
63 { 63 {
...@@ -65,12 +65,18 @@ ...@@ -65,12 +65,18 @@
65 value: '2' 65 value: '2'
66 }, 66 },
67 { 67 {
68 label: '外国护照', 68 label: '护照',
69 value: '3' 69 value: '3'
70 }, 70 },
71 { 71 {
72 label: '其它', 72 label: '其它',
73 value: '4' 73 value: '4'
74 }, {
75 label: '香港身份证',
76 value: '5'
77 }, {
78 label: '往来港澳台通行证',
79 value: '6'
74 } 80 }
75 ]) 81 ])
76 const form = ref({}) 82 const form = ref({})
......
...@@ -65,7 +65,7 @@ const cardType = ref([{ ...@@ -65,7 +65,7 @@ const cardType = ref([{
65 value: '0' 65 value: '0'
66 }, 66 },
67 { 67 {
68 text: '港澳台通行证 ', 68 text: '来往大陆(内地)通行证',
69 value: '1' 69 value: '1'
70 }, 70 },
71 { 71 {
...@@ -73,7 +73,7 @@ const cardType = ref([{ ...@@ -73,7 +73,7 @@ const cardType = ref([{
73 value: '2' 73 value: '2'
74 }, 74 },
75 { 75 {
76 text: '外国护照', 76 text: '护照',
77 value: '3' 77 value: '3'
78 }, 78 },
79 { 79 {
...@@ -81,8 +81,12 @@ const cardType = ref([{ ...@@ -81,8 +81,12 @@ const cardType = ref([{
81 value: '4' 81 value: '4'
82 }, 82 },
83 { 83 {
84 text: '户口本', 84 text: '香港身份证',
85 value: '5' 85 value: '5'
86 },
87 {
88 text: '往来港澳台通行证',
89 value: '6'
86 } 90 }
87 ]) 91 ])
88 onLoad((option) => { 92 onLoad((option) => {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!