Explorar el Código

批量口估跑单&大中型产品备案报告号取号修改

wucl hace 1 semana
padre
commit
250d0433b5

+ 2 - 1
package.json

@@ -61,7 +61,8 @@
     "vue-router": "^3.2.0",
     "vuex": "^3.4.0",
     "webStorage": "^2.1.1",
-    "webpack-spritesmith": "^1.1.0"
+    "webpack-spritesmith": "^1.1.0",
+    "xlsx": "^0.18.5"
   },
   "devDependencies": {
     "@vue/cli-plugin-babel": "^4.4.0",

+ 7 - 2
src/api/modules/majorProduction.js

@@ -74,6 +74,11 @@ export default {
   },
   pendingList(params){
     return request.get(`majorProduction/pending`,{ params: params })
-  }
-
+  },
+  toNotRecord(params) {
+    return request.put(`majorProduction/notRecord/${params}`)
+  },
+  toRecord(params) {
+    return request.put(`majorProduction/record/${params}`)
+  },
 }

+ 7 - 1
src/components/excelImport.vue

@@ -13,7 +13,7 @@
       ref="uploadCtl"
       :data="data"
     >
-      <el-button type="primary" round>{{this.title}}</el-button>
+      <el-button type="primary" :round="round">{{this.title}}</el-button>
     </el-upload>
   </div>
 </template>
@@ -21,6 +21,7 @@
 <script>
   import { getToken } from '@/utils/auth'
   import { Loading } from 'element-ui'
+import { round } from 'lodash'
   export default {
     data () {
       return {
@@ -88,6 +89,11 @@
         type:String,
         required:false,
         default:"primary"
+      },
+      round:{
+        type:Boolean,
+        required:false,
+        default:true
       }
 
     },

+ 78 - 16
src/views/major/todoDetail.vue

@@ -949,8 +949,8 @@
                       <el-form-item label="是否备案:" prop="isRecord" 
                         :rules="{ required: true, message: '是否备案不能为空', trigger: 'blur' }" label-width="120px"
                         :class="['postInfo-container-item','reason']">
-                        <el-radio v-model="props.row.isRecord" :label="true" size="medium" @change="saveProduction(props.row)">是</el-radio>
-                        <el-radio v-model="props.row.isRecord" :label="false" size="medium" @change="saveProduction(props.row)">否</el-radio>
+                        <el-radio v-model="props.row.isRecord" :label="true" size="medium" @change="updateIsRecord(props.row)" :disabled="currentNode.nodeCode!='RECHECK_REPORT'">是</el-radio>
+                        <el-radio v-model="props.row.isRecord" :label="false" size="medium" @change="updateIsRecord(props.row)" :disabled="currentNode.nodeCode!='RECHECK_REPORT'">否</el-radio>
                       </el-form-item>
                     </el-col>
                     <el-col :xs="24" :sm="12" :lg="18" :span="6" v-if="major.businessObjectType === '土地' && !props.row.isRecord">
@@ -1745,15 +1745,33 @@
         </el-form>
       </div>
     </el-dialog>
-    <el-dialog :visible.sync="takeNumberDialog" width="20%" title="请选择取号年份">
-      <el-card shadow="always">
-        <div>
-          <el-date-picker v-model="year" type="year" placeholder="请选择取号年份" :picker-options="pickerOptions" format="yyyy年"
-            value-format="yyyy">
-          </el-date-picker>
-          <el-button slot="append" @click="takeNumber">确认取号</el-button>
+    <el-dialog :visible.sync="takeNumberDialog" width="25%" title="取报告号" custom-class="doWarehouseClass">
+      <el-form ref="takeReportNoFrom" :model="takeReportNo" class="form-container">
+        <div class="createMajor-main-container">
+          <div class="postInfo-container">
+            <el-row v-if="this.major.businessObjectType==='土地'">
+              <el-col :xs="24" :sm="12" :lg="24" :span="6">
+                <el-form-item label="是否备案:" prop="isRecord" label-width="140px" :class="['postInfo-container-item']">
+                  <el-select v-model="takeReportNo.isRecord" disabled readonly>
+                     <el-option label="备案取号" :value="true">备案取号</el-option>
+                     <el-option label="不备案取号" :value="false">不备案取号</el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-row>
+              <el-col :xs="24" :sm="12" :lg="24" :span="6">
+                <el-form-item label="取号年份:" prop="year" label-width="140px" :class="['postInfo-container-item']">
+                  <el-date-picker v-model="takeReportNo.year" type="year" placeholder="请选择取号年份" :picker-options="pickerOptions" format="yyyy年"
+                    value-format="yyyy">
+                  </el-date-picker>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <el-button type="primary" @click="takeNumber" style="margin-left: 36.5%;">确认取号</el-button>
+          </div>
         </div>
-      </el-card>
+      </el-form>
     </el-dialog>
     <el-dialog :visible.sync="allotDialog" width="75%" center custom-class="doWarehouseClass">
       <el-form ref="allotPerformanceForm" :model="allotPerformance" class="form-container">
@@ -2332,7 +2350,7 @@ export default {
       refuseForm:{
         reason:null
       },
-      year: '2025',
+      
       allotPerformance: {
         performanceList: [],
         majorProductionId: null
@@ -2345,7 +2363,10 @@ export default {
         majorId:null
       },
       allotUnitDialog:false,
-      
+      takeReportNo:{
+        year: '2025',
+        isRecord:true,
+      }
     }
   },
   created() {
@@ -2998,7 +3019,7 @@ export default {
       })
     },
     takeNumber() {
-      if (!this.year) {
+      if (!this.takeReportNo.year) {
         this.$notify({
           title: '警告',
           message: '取号年份未选择,请选择再取号。',
@@ -3011,11 +3032,12 @@ export default {
       let takeNumberDTO = {
         businessId: this.majorId,
         businessType: "MAJOR_BUSINESS",
-        takeType: this.major.businessObjectType === '土地' ? 'LAND_NUMBER' : 'REALTY_NUMBER',
+        takeType: this.major.businessObjectType === '土地' ? (this.takeReportNo.isRecord==true?'LAND_NUMBER':'LAND_NO_NUMBER') : 'REALTY_NUMBER',
         targets: this.takeNumberItems,
-        year: this.year,
+        year: this.takeReportNo.year,
         productionType: "REPORT",
-        statementNo:this.statementNo
+        statementNo:this.statementNo,
+        isRecord : this.takeReportNo.isRecord
 
       }
       this.$api.majorTarget.takeNumber(takeNumberDTO).then(res => {
@@ -3072,6 +3094,7 @@ export default {
         production.owner = this.major.owner;
         production.name = this.major.name;
         production.statementNo = this.takeNumberItems[0].name;
+        production.isRecord = this.takeReportNo.isRecord;
         if (totalAcreage != 0) {
           production.evaluatePrice = (totalAmount * 10000 / totalAcreage).toFixed(4);
         } else {
@@ -4446,6 +4469,45 @@ export default {
       })
 
     },
+    updateIsRecord(row){
+      if (!row.isRecord){
+        this.$confirm('该产品已取土地备案报告号,若修改为不备案。为保证备案报告号连续性,系统将重新分配不备案报告号。', '重要提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'error'
+        }).then(() => {
+          this.$api.majorProduction.toNotRecord(row.id).then(res=>{
+            if (res.code === 200 && res.data){
+              this.$message({
+                type: 'success',
+                message: '产品已成功更改为不备案,并重新分配了报告号。'
+              });
+              this.goBack();
+            }
+          }).catch(()=>{
+            this.productions[0].isRecord = true;
+          })
+        })
+      }else {
+        this.$confirm('该产品已取不备案报告号,若修改为备案。为保证备案报告号连续性,系统将重新分配备案报告号。', '重要提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'error'
+        }).then(() => {
+          this.$api.majorProduction.toRecord(row.id).then(res=>{
+            if (res.code === 200 && res.data){
+              this.$message({
+                type: 'success',
+                message: '产品已成功更改为备案,并重新分配了报告号。'
+              });
+              this.goBack();
+            }
+          }).catch(()=>{
+            this.productions[0].isRecord = false;
+          })
+        })
+      }
+    }
   },
 }
 </script>

+ 1 - 1
src/views/mobile/prodValidate/index.vue

@@ -14,7 +14,7 @@
           <div>报告号</div>
           <div class="value">{{validateTarget.productionNo}}</div>
       </div>
-      <div class="base" v-if="validateTarget.clientName!=null && validateTarget.clientName!='建设银行' && validateTarget.clientName!='中信银行'">
+      <div class="base" v-if="validateTarget.clientName!=null && validateTarget.clientName!='建设银行' && validateTarget.clientName!='工商银行'">
           <div>产品类型</div>
           <div class="value">{{validateTarget.productions}}</div>
       </div>

+ 37 - 5
src/views/personal/facePrice.vue

@@ -1,5 +1,5 @@
 <template>
-    <div class="app-container">
+    <div class="app-container" v-loading="importLoading">
         <div class="title-container">
             <breadcrumb id="breadcrumb-container" class="breadcrumb-container" />
         </div>
@@ -28,6 +28,9 @@
                 <el-option key="6" label="不限" value="不限"></el-option>
 
             </el-select>
+            <!-- <el-input style="margin-left: 20px; width: 230px; color: red;" v-model="queryParam.acreage">
+                <template slot="prepend">查询面积</template>
+            </el-input> -->
             <el-input style="margin-left: 20px; width: 230px; color: red;" :value="currentDate" disabled readonly>
                 <template slot="prepend">价值时点</template>
             </el-input>
@@ -35,6 +38,19 @@
 
             <el-button style="margin-left: 20px;" type="danger" @click="openFacePrice()" :disabled="dyData.length==0 && queryParam.queryTarget==null || queryParam.queryTarget==''">执行口估</el-button>
 
+            <el-button style="margin-left: 20px;" type="primary" @click="downloadFaceTemp()">下载模版</el-button>
+            <div style="margin-right: 395px; float: right;">
+                <el-upload
+                :action="uploadFileApiUrl+'personalFacePrice/upload/temp'"
+                :show-file-list="false"
+                :on-success="handleSuccess"
+                title="批量执行"
+                ref="uploadCtl"
+                accept=".xlsx"
+                >
+                <el-button type="warning">批量执行</el-button>
+                </el-upload>
+            </div>
         </div>
 
         <el-card class="data-class" shadow="never">
@@ -404,12 +420,15 @@
 <script>
 import YPageListLayout from '@/components/YPageListLayout'
 import Breadcrumb from '@/components/Breadcrumb'
+import ExcelImport from '@/components/excelImport.vue'
+import * as XLSX from 'xlsx';
 
 export default {
     name: 'personalFacePrice',
     components: {
         Breadcrumb,
         YPageListLayout,
+        ExcelImport
     },
 
     watch: {
@@ -433,7 +452,8 @@ export default {
             queryType: 'location',
             queryParam: {
                 queryTarget: null,
-                limit: '一年内'
+                limit: '一年内',
+                acreage:null
             },
             communityName:null,
             showQueryTarget: null,
@@ -477,8 +497,8 @@ export default {
                 dyExampleNum:null,
                 externalExampleNum:null,
                 communityName:null
-            }
-
+            },
+            uploadFileApiUrl: process.env.VUE_APP_BASE_API
         }
     },
 
@@ -624,7 +644,19 @@ export default {
         },
         toke(){
             window.open("https://cd.ke.com/chengjiao/rs"+this.communityName+"/",'_blank')
-        }
+        },
+        downloadFaceTemp(){
+            window.location.href = '/api/personalFacePrice/download/temp'
+        },
+        handleSuccess(res, file, fileList) {
+            if (res.code === 200 && res.data){
+                this.importLoading = false;
+                let url = res.data;
+                url = url.replace("/opt","");
+                process.env.VUE_APP_API_SERVER
+                window.open(process.env.VUE_APP_API_SERVER+url,'_blank');
+            }
+        },
     },
 
 }