scorpio 2 rokov pred
rodič
commit
f95d099c5a

+ 11 - 13
src/views/home/component/dash.vue

@@ -186,7 +186,15 @@
           </div>
         </div>
       </template>
-
+      <template #dict_key="{ row }">
+        <el-tag>
+          {{
+            typeof row.dict_key === 'object'
+              ? row.dict_key.map(ele => ele.title).join('/')
+              : ''
+          }}
+        </el-tag>
+      </template>
       <template #plan_commencement_time-header="{ column }">
         <div class="flex flex-center">
           <div class="mr-5">{{ (column || {}).label }}</div>
@@ -491,13 +499,8 @@ export default {
           {
             label: '行业分类',
             prop: 'dict_key',
-            width: 120,
-            dicUrl:
-              '/api/blade-system/dict-biz/dictionary?code=industry-classification',
-            props: {
-              label: 'dictValue',
-              value: 'dictKey'
-            }
+            width: 200,
+            slot: true
           },
           {
             label: '是否入库',
@@ -550,11 +553,6 @@ export default {
             prop: 'report_time',
             width: 120
           },
-          {
-            label: '认定时间',
-            prop: 'year',
-            width: 120
-          },
           {
             label: '项目状态',
             prop: 'report_type',

+ 6 - 7
src/views/project/componens/info1.vue

@@ -63,7 +63,7 @@
             <span class="title">责任单位:</span>
             <el-select
               v-model="form.responsible_unit"
-              placeholder="请选择项目标签"
+              placeholder="请选择责任单位"
               class="full-width"
             >
               <el-option
@@ -100,7 +100,7 @@
             <span class="title">所属行业:</span>
             <industry-picker
               :placeholder="
-                form.dict_key
+                form.dict_key && typeof form.dict_key === 'object'
                   ? form.dict_key.map(ele => ele.title).join('/')
                   : ''
               "
@@ -131,7 +131,7 @@
           <div class="flex flex-center full-width item">
             <span class="title">民间投资项目:</span>
             <el-select
-              v-model="form.social_investment"
+              v-model="form.industrial_investment"
               placeholder="是否民间投资项目"
               class="full-width"
             >
@@ -148,7 +148,7 @@
           <div class="flex flex-center full-width item">
             <span class="title">获得资金支持:</span>
             <el-select
-              v-model="form.social_investment"
+              v-model="form.is_funded_project"
               placeholder="是否获得资金支持"
               class="full-width"
             >
@@ -314,7 +314,6 @@ export default {
         value: this.form.competent_unit
       }
       this.deptDic.push(local)
-      console.log(this.deptDic)
       this.$api.system
         .getDeptLazy({ parentId: this.form.competent_unit, deptCategory: 3 })
         .then(res => {
@@ -348,7 +347,7 @@ export default {
       }
       this.$api.project.proUpdate(this.form).then(res => {
         if (res.code === 200) {
-          console.log(res)
+          this.form.dict_key = JSON.parse(this.form.dict_key)
         }
       })
     },
@@ -370,7 +369,7 @@ export default {
       this.photoList = list
     },
     changeIndustry(tmps) {
-      this.form.dict_key = tmps
+      this.form.dict_key = JSON.stringify(tmps)
       this.$emit('industry', tmps[0])
     }
   }

+ 1 - 1
src/views/project/componens/top.vue

@@ -67,7 +67,7 @@ export default {
     },
     changeStage(res) {
       const tmp = this.stages.find(ele => ele.id === res)
-      console.log(tmp)
+      this.$emit('filter', tmp.sort)
       this.$api.project
         .changeStage({ projectId: this.projectId, stageId: res })
         .then(res => {

+ 92 - 9
src/views/project/index.vue

@@ -7,34 +7,55 @@
         <el-tag class="ml-10">{{ detail.report_type_name }}</el-tag>
       </template>
       <template #default>
-        <top :project-id="projectId" @change="changeStage" />
+        <top
+          :project-id="projectId"
+          @change="changeStage"
+          @filter="filterStage"
+        />
       </template>
     </tips-custom>
     <!--    content-->
+    {{ currentStage }}
     <div style="margin-bottom: 65px">
-      {{ currentStage }}
       <div v-if="[1, 2].includes(currentStage)">
+        <!--        基础信息-->
         <info1 :info="detail" @industry="changeIndustry" />
       </div>
+      <!--      前期要件-->
       <info2
-        v-if="currentStage === 2"
+        v-if="[2, 3].includes(currentStage)"
         :project-id="projectId"
         :stage-id="stageId"
         :industry="industry"
       />
+      <!--      相关合同-->
       <info3 :project-id="projectId" :stage-id="stageId" />
-      <info4 :project-id="projectId" />
-      <info5 :info="detail" />
-      <info6 :project-id="projectId" />
-      <info7 :info="detail" />
+      <!--      投资基本情况-->
+      <info4 v-if="[4].includes(currentStage)" :project-id="projectId" />
+      <!--      建成投产后效益测算-->
+      <info5 v-if="currentStage === 2" :info="detail" />
+      <!--      年度投资情况-->
+      <info6 v-if="currentStage === 4" :project-id="projectId" />
+      <!--      其他信息-->
+      <info7 v-if="[2, 4, 5].includes(currentStage)" :info="detail" />
+      <!--      任务列表-->
       <info8 v-if="user.info.type === 4" :project-id="projectId" />
     </div>
     <!--    buttom-->
     <div class="bottom flex flex-center flex-justify-end">
       <div class="padding">
         <el-button type="primary" plain>退 库</el-button>
-        <el-button type="primary" plain>上报审核</el-button>
-        <el-button type="primary">上报到固定资产</el-button>
+        <el-button
+          type="primary"
+          v-if="detail.is_report === 0"
+          @click="projectReport"
+          plain
+          >上报审核</el-button
+        >
+        <el-button type="primary" plain v-if="detail.report_type === 3"
+          >上报到固定资产</el-button
+        >
+        <el-button type="primary" @click="nextStage">下一阶段</el-button>
       </div>
     </div>
   </div>
@@ -117,6 +138,68 @@ export default {
     },
     changeIndustry(industry) {
       this.industry = industry
+    },
+    filterStage(res) {
+      this.currentStage = res
+    },
+    nextStage() {
+      this.$confirm(
+        '请检查当前阶段信息是否完善,点击确定后项目将进行下一个阶段',
+        {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }
+      ).then(res => {
+        if (res === 'confirm') {
+          this.currentStage = this.currentStage + 1
+          this.detail.current_stage = this.currentStage
+          this.update()
+        }
+      })
+    },
+    update() {
+      this.$api.project.proUpdate(this.detail).then(res => {
+        if (res.code === 200) {
+          this.$message.success(res.msg)
+        } else {
+          this.$message.error(res.msg)
+        }
+      })
+    },
+    /**
+     * 股室上报项目到管理员
+     */
+    projectReport() {
+      this.$confirm('确认上报至管理员进行审核?').then(ele => {
+        if (ele === 'confirm') {
+          this.$api.project.upReportType({ id: this.projectId }).then(res => {
+            if (res.code === 200) {
+              this.$message.success(res.msg)
+            } else {
+              this.$message.error(res.msg)
+            }
+          })
+        }
+      })
+    },
+    /**
+     * 管理员已经审核通过的项目,上报到固定资产
+     */
+    projectReportFormal() {
+      this.$confirm('确定上报到固定资产?').then(res => {
+        if (res === 'confirm') {
+          this.$api.project
+            .reportToAssets({ ids: this.projectId })
+            .then(res => {
+              if (res.code === 200) {
+                this.$message.success(res.msg)
+              } else {
+                this.$message.error(res.msg)
+              }
+            })
+        }
+      })
     }
   }
 }