Bladeren bron

宅基地bug修改3

wulanhaote
zhao 3 jaren geleden
bovenliggende
commit
5ffbbac2ae
7 gewijzigde bestanden met toevoegingen van 97 en 35 verwijderingen
  1. +32
    -6
      src/components/house/HouseApplyUploadComp.vue
  2. +2
    -2
      src/permission.js
  3. +1
    -1
      src/utils/request.js
  4. +8
    -6
      src/views/onlineHome/homestead/circulation/circulationAdd.vue
  5. +1
    -0
      src/views/onlineHome/homestead/circulation/circulationModify.vue
  6. +3
    -1
      src/views/onlineHome/homestead/homeApplication/applicationList.vue
  7. +50
    -19
      src/views/onlineHome/homestead/homeApplication/proposerLite.vue

+ 32
- 6
src/components/house/HouseApplyUploadComp.vue Bestand weergeven

@@ -14,6 +14,8 @@
:disabled="disabled || !item.current"
:show-upload="!disabled && item.current"
:before-delete="handleRemove"
:deletable="!disabled && item.current"
:before-read="checkFile"
>
<!-- accept=".jpg,.png,.gif,.pdf,.doc,.docx,.xlsx,.xls" 设置了无法拉起相机/下载 -->
</van-uploader>
@@ -29,6 +31,7 @@
import { treeSingleProcessView , attach , removeFile , getAttachmentConfigTree, attachmentFind } from "@/api/onlineHome/homestead/application";
import {getToken} from "@/utils/auth";
import request from '@/utils/request'
import {Notify} from "vant";
/** 导入JS方法 */

export default {
@@ -73,12 +76,17 @@ export default {
params: item.postData,
data: formData,
}).then((resp) => {
file.response = resp;
console.log(resp);
file.fileList = item.fileList;
this.onFileListChanged("ADD", resp.id);
this.setFileStatus(file, 'done', '文件上传成功');
this.$emit('onUploadSuccess', file);
if(resp.code == 200)
{
file.response = resp;
console.log(resp);
file.fileList = item.fileList;
this.onFileListChanged("ADD", resp.id);
this.setFileStatus(file, 'done', '文件上传成功');
this.$emit('onUploadSuccess', file);
}
else
this.setFileStatus(file, 'fail', '文件上传失败!');
}).catch((e) => {
this.setFileStatus(file, 'fail', '文件上传失败!');
});
@@ -238,6 +246,24 @@ export default {
file.status = status;
file.message = message;
},
checkFile(file) {
let mime = file.type;
if([
"image/png",
"image/jpeg",
"image/gif",
"image/bmp",
].indexOf(mime) === -1)
{
this.notify('请上传jpg/png/gif/bmp等格式图片!', 'danger');
return false;
}
return true;
},
notify(message, type) {
Notify.clear();
Notify({ type: type || 'primary', message: message });
},
}
};
</script>


+ 2
- 2
src/permission.js Bestand weergeven

@@ -129,7 +129,7 @@ router.beforeEach((to, from, next) => {
store.dispatch('LogOut').then(() => {
try {
let loginUrl = Cookies.get("_Login_url");
if(loginUrl && loginUrl.endsWith("onlineHomeLogin"))
if(loginUrl && loginUrl.indexOf("onlineHomeLogin") !== -1)
{
next({ path: '/onlineHomeLogin' })
return;
@@ -168,7 +168,7 @@ router.beforeEach((to, from, next) => {
} else {
try {
let loginUrl = Cookies.get("_Login_url");
if(loginUrl && loginUrl.endsWith("onlineHomeLogin"))
if(loginUrl && loginUrl.indexOf("onlineHomeLogin") !== -1)
{
next({ path: `/onlineHomeLogin?redirect=${to.fullPath}` })
return;


+ 1
- 1
src/utils/request.js Bestand weergeven

@@ -72,7 +72,7 @@ service.interceptors.response.use(res => {
store.dispatch('LogOut').then(() => {
try {
let loginUrl = Cookies.get("_Login_url");
if(loginUrl && loginUrl.endsWith("onlineHomeLogin"))
if(loginUrl && loginUrl.indexOf("onlineHomeLogin") !== -1)
{
window.location.href = loginUrl;
return;


+ 8
- 6
src/views/onlineHome/homestead/circulation/circulationAdd.vue Bestand weergeven

@@ -361,17 +361,19 @@
houseAdd(this.circulation).then(response => {
if(response.code = 200){
this.$toast.success('保存成功');
this.$router.back(-1);
}
});
this.$router.push({name: this.$router.back(-1)});
},
goSubmit(){
goApply(this.$route.query.id).then(response => {
houseAdd(this.circulation).then(response => {
if(response.code = 200){
this.$toast.success('提交成功');
setTimeout(function(){
window.location.replace("circulationList")
},1000)
goApply(response.data).then(response => {
if(response.code = 200){
this.$toast.success('提交成功');
this.$router.back(-1);
}
});
}
});
},


+ 1
- 0
src/views/onlineHome/homestead/circulation/circulationModify.vue Bestand weergeven

@@ -364,6 +364,7 @@ export default {
edit(this.circulation).then(response => {
if(response.code = 200){
this.$toast.success('保存成功');
this.$router.back(-1);
}
});
},


+ 3
- 1
src/views/onlineHome/homestead/homeApplication/applicationList.vue Bestand weergeven

@@ -84,6 +84,7 @@ export default {
this.houseGetDicts("house_apply_status").then((response) => {
console.log(response)
this.houseApplyStatus = response.data;
//this.refresh();
});
},
methods: {
@@ -146,9 +147,10 @@ export default {
});
},
refresh() {
this.applicationList = [];
this.queryParams.pageNum = 1;
this.refreshing = true;
this.finished = false;
this.applicationList = []
},
submitApplyProposer(item) {
this.$dialog.confirm({


+ 50
- 19
src/views/onlineHome/homestead/homeApplication/proposerLite.vue Bestand weergeven

@@ -42,7 +42,7 @@
/>
<van-field required :readonly="!formEnabled.baseApplyForm.baseFormEnabled" v-model="applicationDetail.tHouseApplyProposer.age" label="年龄" placeholder="年龄" input-align="right" type="digit" :rules="[{ required: true }]"/>
<van-field required :readonly="!formEnabled.baseApplyForm.baseFormEnabled" v-model="applicationDetail.tHouseApplyProposer.phone" label="联系电话" placeholder="联系电话" input-align="right" type="digit" :rules="[{pattern: /(^\d{7}(\d{4})?$)/}]"/>
<van-field required :readonly="!formEnabled.baseApplyForm.baseFormEnabled" v-model="applicationDetail.tHouseApplyProposer.idcard" label="身份证号" placeholder="身份证号" input-align="right" :rules="[{pattern: /^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/}]"/>
<van-field required :readonly="!formEnabled.baseApplyForm.baseFormEnabled" v-model="applicationDetail.tHouseApplyProposer.idcard" label="身份证号" placeholder="身份证号" input-align="right" :rules="[{pattern: /^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/}]" @change="updateUserInfo"/>
<van-field required :readonly="!formEnabled.baseApplyForm.baseFormEnabled" v-model="applicationDetail.tHouseApplyProposer.householdRegister" label="户口所在地" placeholder="户口所在地" input-align="right" :rules="[{ required: true }]"/>
<van-field required :readonly="!formEnabled.baseApplyForm.baseFormEnabled" v-model="applicationDetail.tHouseApplyProposer.familyAddress" label="家庭住址" placeholder="家庭住址" input-align="right" :rules="[{ required: true }]"/>
<van-field required readonly v-model="applicationDetail.tHouseApplyProposer.members" label="家庭人口数" placeholder="家庭人口数" type="digit" input-align="right"/>
@@ -88,7 +88,7 @@
<van-field required v-model="item.memberName" label="姓名" placeholder="姓名" input-align="right" :rules="[{ required: true }]"/>
<van-field required v-model="item.age" label="年龄" placeholder="年龄" input-align="right" :rules="[{ required: true }]"/>
<van-field required v-model="item.familyStatusName" label="与户主关系" placeholder="与户主关系" input-align="right" :rules="[{ required: true }]"/>
<van-field required v-model="item.idcard" label="身份证号" placeholder="身份证号" input-align="right" :rules="[{pattern: /^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/}]"/>
<van-field required v-model="item.idcard" label="身份证号" placeholder="身份证号" input-align="right" :rules="[{pattern: /^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/}]" @change="updateMemberInfo(index)"/>
<van-field required v-model="item.householdRegister" label="户口所在地" placeholder="户口所在地" input-align="right" :rules="[{ required: true }]"/>
</div>
</div>
@@ -318,7 +318,7 @@
<van-row type="flex" justify="space-between" align="center">
<van-col span="5">自然<br/>资源<br/>部门<br/>意见</van-col>
<van-col span="19">
<van-field required :readonly="!formEnabled.baseApplyForm.townFormEnabled" v-model="applicationDetail.tHouseApproveNatureOptions.landArea" label="用地面积" placeholder="请输入" input-align="right"><template #right-icon>㎡</template></van-field>
<van-field required :readonly="!formEnabled.baseApplyForm.townFormEnabled" v-model="applicationDetail.tHouseApproveNatureOptions.landArea" label="用地面积" placeholder="请输入" input-align="right" :rules="[{ required: true }]"><template #right-icon>㎡</template></van-field>
<field-select
v-model="applicationDetail.tHouseApproveNatureOptions.rightsType"
label="土地权属"
@@ -1387,6 +1387,8 @@ export default {
//TODO: 开工结束时后台必定生成
});
}
if(this.applicationDetail.tHouseApplyEnd.oldHouseStatus == '0')
this.applicationDetail.tHouseApplyEnd.oldHouseStatus = null;
}
// 验收镇级审批
else if(this.isProposeStatus(houseApplyStatus, ["29"]))
@@ -1440,7 +1442,7 @@ export default {
this.houseApplyUploadComp.full = true;
this.houseApplyUploadCompStart.full = false;
this.houseApplyUploadCompEnd.full = false;
this.houseApplyUploadComp.readonly = true;
this.houseApplyUploadComp.readonly = houseApplyStatus != '12';
this.houseApplyUploadCompStart.readonly = false;
this.houseApplyUploadCompEnd.readonly = true;
} else if (this.isAccepting()) {
@@ -1461,7 +1463,7 @@ export default {
}

this.houseApplyUploadComp.proposerId = proposerId;
this.houseApplyUploadComp.houseApplyStatus = houseApplyStatus;
this.houseApplyUploadComp.houseApplyStatus = houseApplyStatus == '12' ? '10' : houseApplyStatus; // 申请通过是10 被驳回是12;
this.houseApplyUploadCompStart.proposerId = proposerId;
this.houseApplyUploadCompStart.houseApplyStatus = houseApplyStatus == '10' ? '12' : houseApplyStatus; // 申请通过是10 被驳回是12
this.houseApplyUploadCompEnd.proposerId = proposerId;
@@ -1740,6 +1742,7 @@ export default {
this.applicationDetail.tHouseApplyProposer.existHomestead = 'N';
this.applicationDetail.tHouseApplyProposer.applyTime = this.getDate();
this.getMemberCurrentSituation();
this.updateUserInfo();
}
});
},
@@ -1749,7 +1752,7 @@ export default {
if(res)
return true;
if(regexp)
res = !regexp.test(value);
res = !value.match(regexp);
return res;
},
// 保存申请(是否提交)
@@ -1787,7 +1790,7 @@ export default {
else
{
this.notify("保存成功", 'success');
this.$router.back(-1);
this.goBack();
}
}).catch((e) => {
this.notify("保存失败!", 'danger');
@@ -1878,7 +1881,7 @@ export default {
submitApplyProposer() {
customSubmitWLHT(this.id).then((resp) => {
this.notify("提交成功", 'success');
this.$router.back(-1);
this.goBack();
}).catch((e) => {
this.notify("提交失败!", 'danger');
}).finally(() => {
@@ -2075,7 +2078,7 @@ export default {
params: data,
}).then((response) => {
this.notify("操作成功", 'success');
this.$router.back(-1);
this.goBack();
}).catch(e => {
this.notify("操作失败!", 'danger');
});
@@ -2139,7 +2142,7 @@ export default {
{
submitStartWLHT(this.applicationDetail.tHouseApplyStart.id).then(resp => {
this.notify("操作成功", 'success');
this.$router.back(-1);
this.goBack();
}).catch((e) => {
this.notify("操作失败!", 'danger');
});
@@ -2147,7 +2150,7 @@ export default {
else
{
this.notify("保存成功", 'success');
this.$router.back(-1);
this.goBack();
}
}).catch((e) => {
this.notify('保存失败', 'danger');
@@ -2181,7 +2184,7 @@ export default {
{
submitEndWLHT(this.applicationDetail.tHouseApplyEnd.id).then(resp => {
this.notify("操作成功", 'success');
this.$router.back(-1);
this.goBack();
}).catch(err => {
this.notify("操作失败!", 'danger');
});
@@ -2189,7 +2192,7 @@ export default {
else
{
this.notify("保存成功", 'success');
this.$router.back(-1);
this.goBack();
}
}).catch(err => {
this.notify('保存失败', 'danger');
@@ -2238,11 +2241,11 @@ export default {
if (this.checkString(this.applicationDetail.tHouseApplyProposer.age)) {
return "户主年龄不能为空";
}
if (this.checkString(this.applicationDetail.tHouseApplyProposer.phone)) {
return "联系电话不能为空";
if (this.checkString(this.applicationDetail.tHouseApplyProposer.phone, /(^\d{7}(\d{4})?$)/)) {
return "请填写有效的联系电话";
}
if (this.checkString(this.applicationDetail.tHouseApplyProposer.idcard)) {
return "身份证号不能为空";
if (this.checkString(this.applicationDetail.tHouseApplyProposer.idcard, /^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/)) {
return "请填写有效的身份证号";
}
if (this.checkString(this.applicationDetail.tHouseApplyProposer.householdRegister)) {
return "户口所在地不能为空";
@@ -2269,8 +2272,8 @@ export default {
if (this.checkString(v.familyStatusName)) {
return "与户主关系不能为空";
}
if (this.checkString(v.idcard)) {
return "家庭成员身份证不能为空";
if (this.checkString(v.idcard, /^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/)) {
return "请填写有效的家庭成员身份证";
}
if (this.checkString(v.householdRegister)) {
return "户口所在地不能为空";
@@ -2656,6 +2659,34 @@ export default {
}
return false;
},
parseIDCard(idcard) {
if(!idcard)
return false;
if(idcard.length !== 18)
return false;
if(!/^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/.test(idcard))
return false;
let sex = (parseInt(idcard.substr(16, 1)) % 2) ^ 1;
let now = new Date().getFullYear();
let y = parseInt(idcard.substr(6, 4));
let age = Math.max(now - y, 0);
return [sex, age];
},
updateUserInfo() {
let res = this.parseIDCard(this.applicationDetail.tHouseApplyProposer.idcard);
if(res)
{
this.applicationDetail.tHouseApplyProposer.sex = res[0];
this.applicationDetail.tHouseApplyProposer.age = res[1];
}
},
updateMemberInfo(index) {
let res = this.parseIDCard(this.applicationDetail.tHouseApplyFamilyMembers[index].idcard);
if(res)
{
this.applicationDetail.tHouseApplyFamilyMembers[index].age = res[1];
}
},
},
watch: {
selectedTabName: function (newVal, oldVal) {


Laden…
Annuleren
Opslaan