|
@@ -823,6 +823,8 @@
|
|
|
<h3 class="title">
|
|
|
<div class="avatar-wrapper icon-title">产品</div>
|
|
|
<div class="icon-info">产品信息</div>
|
|
|
+ <el-button type="text" style="margin-left: 20px;" @click="generateAll()">一键生成</el-button>
|
|
|
+ <el-button type="text" style="margin-left: 20px;" @click="downloadAll()">全部下载</el-button>
|
|
|
</h3>
|
|
|
</el-divider>
|
|
|
</div>
|
|
@@ -2171,11 +2173,6 @@ export default {
|
|
|
this.selectRoll();
|
|
|
}
|
|
|
},
|
|
|
- downloadPkg() {
|
|
|
- if (this.target.id) {
|
|
|
- this.$api.personalProduction.downloadPkg(this.target.id);
|
|
|
- }
|
|
|
- },
|
|
|
doStamp(files) {
|
|
|
const file = files[0];
|
|
|
if (file) {
|
|
@@ -2506,6 +2503,68 @@ export default {
|
|
|
this.compareList.analysisData[3].compareA.valueA = new Date(currentYear,month-3,2)
|
|
|
}
|
|
|
|
|
|
+ },
|
|
|
+ generateAll(){
|
|
|
+ const certificates = this.personal.credentials
|
|
|
+ for (let i in certificates) {
|
|
|
+ if (certificates[i] === 'HOUSE_CERTIFICATE' && !this.target.houseCertificate) {
|
|
|
+ this.$message('房产证未点击保存');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (certificates[i] === 'LAND_CERTIFICATE' && !this.target.landCertificate) {
|
|
|
+ this.$message('国土证未点击保存');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (certificates[i] === 'IMMOVABLE_CERTIFICATE' && !this.target.immovableCertificate) {
|
|
|
+ this.$message('不动产权证未点击保存');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!this.target.entityInfo) {
|
|
|
+ this.$message('实物状况未点击保存');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (!this.target.backgroundInfo) {
|
|
|
+ this.$message('区位状况未点击保存');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (!this.target.sellingAbility) {
|
|
|
+ this.$message('变现能力未点击保存');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.$confirm('系统生成将会覆盖原有文档,请确认是否继续?', '提示', {
|
|
|
+ confirmButtonText: '确认',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ center: true
|
|
|
+ }).then(() => {
|
|
|
+ if (this.personal.id && this.target.id) {
|
|
|
+ this.$api.personalProduction.genFileAll(this.personal.id).then(res => {
|
|
|
+ if (res.code === 200 && res.data) {
|
|
|
+ this.$notify({
|
|
|
+ title: '成功',
|
|
|
+ message: '一键生成成功',
|
|
|
+ type: 'success',
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ this.getProductions();
|
|
|
+ this.getPersonalTarget();
|
|
|
+ } else {
|
|
|
+ this.$notify({
|
|
|
+ title: '失败',
|
|
|
+ message: '一键生成失败',
|
|
|
+ type: 'error',
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ downloadAll(){
|
|
|
+ if (this.target.id) {
|
|
|
+ this.$api.personalProduction.downloadPkg(this.target.id);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|