@@ -109,7 +109,7 @@ | |||||
clickable | clickable | ||||
@click="showCbqxq = true" | @click="showCbqxq = true" | ||||
> | > | ||||
<template #button v-if="isDisabled"> | |||||
<template #button v-if="taskStatus === '2' && $route.params.surveyStatus !== '3' && this.form.id"> | |||||
<van-button size="mini" type="primary" native-type="button" @click.stop="extension">延期</van-button> | <van-button size="mini" type="primary" native-type="button" @click.stop="extension">延期</van-button> | ||||
</template> | </template> | ||||
</van-field> | </van-field> | ||||
@@ -141,7 +141,11 @@ | |||||
this.$toast({ | this.$toast({ | ||||
icon: 'success', | icon: 'success', | ||||
message: '保存成功', | message: '保存成功', | ||||
duration:"1000" | |||||
duration:"1000", | |||||
onClose: () => { | |||||
this.$route.params.cbfmc = this.form.cbfmc; | |||||
this.getDetail(); | |||||
} | |||||
}) | }) | ||||
} | } | ||||
}).catch(() => { | }).catch(() => { | ||||
@@ -11,10 +11,10 @@ | |||||
<div class="list_main"> | <div class="list_main"> | ||||
<van-form ref="formData"> | <van-form ref="formData"> | ||||
<van-field v-model="form.cbfbm" label="代码:" placeholder="请输入代码" required :rules="[{ required: true }]" :border="false" input-align="left" maxlength="18"> | |||||
<template #button> | |||||
<van-field v-model="form.cbfbm" label="代码:" placeholder="<自动生成>" :border="false" input-align="left" maxlength="18"> | |||||
<!-- <template #button> | |||||
<van-button size="mini" type="primary" native-type="button" @click="generateCode">生成代码</van-button> | <van-button size="mini" type="primary" native-type="button" @click="generateCode">生成代码</van-button> | ||||
</template> | |||||
</template> --> | |||||
</van-field> | </van-field> | ||||
<van-field | <van-field | ||||
v-model="cbflxText" | v-model="cbflxText" | ||||
@@ -147,11 +147,11 @@ | |||||
this.$notify({ type: 'danger', message: '请填写完整的表单项' }); | this.$notify({ type: 'danger', message: '请填写完整的表单项' }); | ||||
}); | }); | ||||
}, | }, | ||||
generateCode() { | |||||
/* generateCode() { | |||||
generateContractorCode({deptId: this.$route.params.deptId}).then(response => { | generateContractorCode({deptId: this.$route.params.deptId}).then(response => { | ||||
this.$set(this.form, 'cbfbm', response.data); | this.$set(this.form, 'cbfbm', response.data); | ||||
}); | }); | ||||
}, | |||||
}, */ | |||||
}, | }, | ||||
}; | }; | ||||
</script> | </script> | ||||
@@ -18,10 +18,10 @@ | |||||
<div class="list_main"> | <div class="list_main"> | ||||
<van-form ref="formData"> | <van-form ref="formData"> | ||||
<van-field v-model="form.fbfbm" label="代码:" placeholder="请输入代码" required :rules="[{ required: true }]" :border="false" input-align="right" label-width="auto" :disabled="isDisabled" maxlength="14"> | |||||
<template #button v-if="!isDisabled"> | |||||
<van-field v-model="form.fbfbm" label="代码:" placeholder="<自动生成>" :border="false" input-align="right" label-width="auto" :disabled="true" maxlength="14"> | |||||
<!-- <template #button v-if="!isDisabled"> | |||||
<van-button size="mini" type="primary" native-type="button" @click="generateCode">生成代码</van-button> | <van-button size="mini" type="primary" native-type="button" @click="generateCode">生成代码</van-button> | ||||
</template> | |||||
</template> --> | |||||
</van-field> | </van-field> | ||||
<van-field v-model="form.fbfmc" label="名称:" placeholder="请输入名称" required :rules="[{ required: true }]" :border="false" input-align="right" label-width="auto" maxlength="50" /> | <van-field v-model="form.fbfmc" label="名称:" placeholder="请输入名称" required :rules="[{ required: true }]" :border="false" input-align="right" label-width="auto" maxlength="50" /> | ||||
<van-field v-model="form.fbffzrxm" label="负责人姓名:" placeholder="请输入负责人姓名" required :rules="[{ required: true }]" :border="false" input-align="right" label-width="auto" maxlength="50" /> | <van-field v-model="form.fbffzrxm" label="负责人姓名:" placeholder="请输入负责人姓名" required :rules="[{ required: true }]" :border="false" input-align="right" label-width="auto" maxlength="50" /> | ||||
@@ -98,7 +98,7 @@ | |||||
data() { | data() { | ||||
return { | return { | ||||
form: {}, // 发包方信息表单 | form: {}, // 发包方信息表单 | ||||
isDisabled: false, // 是否禁用 | |||||
// isDisabled: false, // 是否禁用 | |||||
credentialTypeOptions: [], // 证件类型字典 | credentialTypeOptions: [], // 证件类型字典 | ||||
credentialTypeText: null, // 证件类型标签名 | credentialTypeText: null, // 证件类型标签名 | ||||
showCredentialType: false, // 控制证件类型字典弹出层的显示和隐藏 | showCredentialType: false, // 控制证件类型字典弹出层的显示和隐藏 | ||||
@@ -130,21 +130,21 @@ | |||||
listFbf({deptId: this.$route.query.deptId}).then(response => { | listFbf({deptId: this.$route.query.deptId}).then(response => { | ||||
if (response.rows.length > 0) { | if (response.rows.length > 0) { | ||||
this.form = response.rows[0]; | this.form = response.rows[0]; | ||||
this.isDisabled = true; | |||||
// this.isDisabled = true; | |||||
this.$nextTick(() => { | this.$nextTick(() => { | ||||
this.credentialTypeText = this.selectDictLabel(this.credentialTypeOptions, this.form.fzrzjlx); | this.credentialTypeText = this.selectDictLabel(this.credentialTypeOptions, this.form.fzrzjlx); | ||||
}); | }); | ||||
} else { | } else { | ||||
this.resetForm(); | this.resetForm(); | ||||
this.isDisabled = false; | |||||
// this.isDisabled = false; | |||||
} | } | ||||
}); | }); | ||||
}, | }, | ||||
generateCode() { | |||||
/* generateCode() { | |||||
generateEmployerCode({deptId: this.$route.query.deptId}).then(response => { | generateEmployerCode({deptId: this.$route.query.deptId}).then(response => { | ||||
this.$set(this.form, 'fbfbm', response.data); | this.$set(this.form, 'fbfbm', response.data); | ||||
}); | }); | ||||
}, | |||||
}, */ | |||||
onConfirmTypeOptions(value){ | onConfirmTypeOptions(value){ | ||||
this.form.fzrzjlx = value.dictValue; | this.form.fzrzjlx = value.dictValue; | ||||
this.credentialTypeText = value.dictLabel; | this.credentialTypeText = value.dictLabel; | ||||
@@ -73,7 +73,7 @@ | |||||
right-icon="arrow-down" | right-icon="arrow-down" | ||||
readonly | readonly | ||||
clickable | clickable | ||||
@click="showLandCategory = true" | |||||
@click="openLandCategoryPopup" | |||||
/> | /> | ||||
<van-popup v-model="showLandCategory" position="bottom" get-container=".app-container"> | <van-popup v-model="showLandCategory" position="bottom" get-container=".app-container"> | ||||
<van-picker | <van-picker | ||||
@@ -375,7 +375,11 @@ | |||||
this.reset(); | this.reset(); | ||||
this.form = data; | this.form = data; | ||||
this.syqxzText = this.selectDictLabel(this.syqxzOptions, data.syqxz); | this.syqxzText = this.selectDictLabel(this.syqxzOptions, data.syqxz); | ||||
this.dklbText = this.selectDictLabel(this.dklbOptions, data.dklb); | |||||
if (data.dklb === '10') { | |||||
this.dklbText = '承包地块'; | |||||
} else { | |||||
this.dklbText = this.selectDictLabel(this.dklbOptions, data.dklb); | |||||
} | |||||
this.dldjText = this.selectDictLabel(this.dldjOptions, data.dldj); | this.dldjText = this.selectDictLabel(this.dldjOptions, data.dldj); | ||||
this.tdytText = this.selectDictLabel(this.tdytOptions, data.tdyt); | this.tdytText = this.selectDictLabel(this.tdytOptions, data.tdyt); | ||||
this.tdlylxText = this.selectDictLabel(this.tdlylxOptions, data.tdlylx); | this.tdlylxText = this.selectDictLabel(this.tdlylxOptions, data.tdlylx); | ||||
@@ -594,6 +598,18 @@ | |||||
this.dldjText = '一等地'; | this.dldjText = '一等地'; | ||||
this.tdytText = '种植业'; | this.tdytText = '种植业'; | ||||
}, | }, | ||||
openLandCategoryPopup() { | |||||
// 修改时 && 地块类别为承包地块 不允许打开地块类别弹出层 | |||||
if (this.form.id && this.form.dklb === '10') { | |||||
this.$toast({ | |||||
icon: 'fail', | |||||
message: '当前地块为承包地块,不能更改地块类别', | |||||
duration: '2000' | |||||
}) | |||||
return ; | |||||
} | |||||
this.showLandCategory = true; | |||||
} | |||||
}, | }, | ||||
}; | }; | ||||
</script> | </script> | ||||
@@ -18,10 +18,10 @@ | |||||
<div class="list_main"> | <div class="list_main"> | ||||
<van-form ref="formData"> | <van-form ref="formData"> | ||||
<van-field v-model="form.dkbm" label="地块代码:" placeholder="请输入地块代码" required :rules="[{ required: true }]" :border="false" input-align="right" label-width="auto" :disabled="isDisabled" maxlength="19"> | |||||
<template #button v-if="!$route.query.id"> | |||||
<van-field v-model="form.dkbm" label="地块代码:" placeholder="<自动生成>" :border="false" input-align="right" label-width="auto" :disabled="true" maxlength="19"> | |||||
<!-- <template #button v-if="!$route.query.id"> | |||||
<van-button size="mini" type="primary" native-type="button" @click="generateCode">生成代码</van-button> | <van-button size="mini" type="primary" native-type="button" @click="generateCode">生成代码</van-button> | ||||
</template> | |||||
</template> --> | |||||
</van-field> | </van-field> | ||||
<van-field v-model="form.dkmc" label="地块名称:" placeholder="请输入地块名称" required :rules="[{ required: true }]" :border="false" input-align="right" maxlength="50" /> | <van-field v-model="form.dkmc" label="地块名称:" placeholder="请输入地块名称" required :rules="[{ required: true }]" :border="false" input-align="right" maxlength="50" /> | ||||
<van-field v-model="syqxzText" label="所有权性质:" | <van-field v-model="syqxzText" label="所有权性质:" | ||||
@@ -190,7 +190,6 @@ | |||||
currentDate: new Date(2021, 0, 17), | currentDate: new Date(2021, 0, 17), | ||||
titleName: '', // 标题信息 | titleName: '', // 标题信息 | ||||
isDisabled: false, // 是否禁用 | |||||
form: {}, // 地块信息表单 | form: {}, // 地块信息表单 | ||||
syqxzOptions: [], // 所有权性质字典 | syqxzOptions: [], // 所有权性质字典 | ||||
syqxzText: null, // 所有权性质标签名 | syqxzText: null, // 所有权性质标签名 | ||||
@@ -243,7 +242,6 @@ | |||||
mounted() { | mounted() { | ||||
if (this.$route.query.id) { | if (this.$route.query.id) { | ||||
this.titleName = '修改地块信息'; | this.titleName = '修改地块信息'; | ||||
this.isDisabled = true; | |||||
setTimeout(() => { | setTimeout(() => { | ||||
this.getDetail(); | this.getDetail(); | ||||
}, 500); | }, 500); | ||||
@@ -259,7 +257,11 @@ | |||||
const data = response.data; | const data = response.data; | ||||
this.form = data; | this.form = data; | ||||
this.syqxzText = this.selectDictLabel(this.syqxzOptions, data.syqxz); | this.syqxzText = this.selectDictLabel(this.syqxzOptions, data.syqxz); | ||||
this.dklbText = this.selectDictLabel(this.dklbOptions, data.dklb); | |||||
if (data.dklb === '10') { | |||||
this.dklbText = '承包地块'; | |||||
} else { | |||||
this.dklbText = this.selectDictLabel(this.dklbOptions, data.dklb); | |||||
} | |||||
this.dldjText = this.selectDictLabel(this.dldjOptions, data.dldj); | this.dldjText = this.selectDictLabel(this.dldjOptions, data.dldj); | ||||
this.tdytText = this.selectDictLabel(this.tdytOptions, data.tdyt); | this.tdytText = this.selectDictLabel(this.tdytOptions, data.tdyt); | ||||
this.tdlylxText = this.selectDictLabel(this.tdlylxOptions, data.tdlylx); | this.tdlylxText = this.selectDictLabel(this.tdlylxOptions, data.tdlylx); | ||||
@@ -401,11 +403,11 @@ | |||||
this.form.theGeom = null; | this.form.theGeom = null; | ||||
} | } | ||||
}, | }, | ||||
generateCode() { | |||||
/* generateCode() { | |||||
generateLandCode({deptId: this.$route.query.deptId}).then(response => { | generateLandCode({deptId: this.$route.query.deptId}).then(response => { | ||||
this.$set(this.form, 'dkbm', response.data); | this.$set(this.form, 'dkbm', response.data); | ||||
}); | }); | ||||
}, | |||||
}, */ | |||||
goBack() { | goBack() { | ||||
// history.back(-1); | // history.back(-1); | ||||
this.$router.push({ | this.$router.push({ | ||||
@@ -421,7 +423,7 @@ | |||||
if (this.$route.query.id && this.form.dklb === '10') { | if (this.$route.query.id && this.form.dklb === '10') { | ||||
this.$toast({ | this.$toast({ | ||||
icon: 'fail', | icon: 'fail', | ||||
message: '当前地块为承包地块,不能修改地块类别', | |||||
message: '当前地块为承包地块,不能更改地块类别', | |||||
duration: '2000' | duration: '2000' | ||||
}) | }) | ||||
return ; | return ; | ||||