weirenchun 2 سال پیش
والد
کامیت
5f0b0ac79a
2فایلهای تغییر یافته به همراه32 افزوده شده و 29 حذف شده
  1. 31 28
      src/views/project/componens/info4.vue
  2. 1 1
      src/views/project/index.vue

+ 31 - 28
src/views/project/componens/info4.vue

@@ -5,6 +5,7 @@
     :edit-btn="true"
     @edit="change"
     @save="save"
+    @on-load="getFundsList(1)"
   >
     <div
       class="full-width text-right main-color pointer"
@@ -14,9 +15,15 @@
       更多到位资金>>
     </div>
     <el-form class="mt-20" :disabled="disabled">
-      <div class="flex">
-        <button style="margin-left: 10px">到位资金</button>
-        <button style="margin-left: 10px">筹措资金</button>
+      <div style="display: flex; align-items: center">
+        <el-button-group>
+          <el-button type="primary" @click="getFundsList(1)"
+            >到位资金</el-button
+          >
+          <el-button type="primary" @click="getFundsList(2)"
+            >筹措资金<i class="el-icon-arrow-right el-icon--right"></i
+          ></el-button>
+        </el-button-group>
         <div style="margin-left: 20px">
           * 点击对应按钮,查看到位资金、筹措资金详情
         </div>
@@ -27,11 +34,7 @@
         <el-form-item class="full-width flex-child-average">
           <div class="flex flex-center full-width item">
             <span class="title">中央预算内投资:</span>
-            <el-input
-              class="input"
-              placeholder="中央预算内投资"
-              v-model="form.investment_invest"
-            ></el-input>
+            <el-input class="input" placeholder="中央预算内投资"></el-input>
           </div>
         </el-form-item>
         <el-form-item class="full-width flex-child-average">
@@ -45,21 +48,13 @@
         <el-form-item class="full-width flex-child-average">
           <div class="flex flex-center full-width item">
             <span class="title">专项债券资金:</span>
-            <el-input
-              class="input"
-              placeholder="专项债券资金"
-              v-model="form.special_funds"
-            ></el-input>
+            <el-input class="input" placeholder="专项债券资金"></el-input>
           </div>
         </el-form-item>
         <el-form-item class="full-width flex-child-average">
           <div class="flex flex-center full-width item">
             <span class="title">抗疫特别国债资金:</span>
-            <el-input
-              class="input"
-              placeholder="抗疫特别国债资金"
-              v-model="form.epidemic_funds"
-            ></el-input>
+            <el-input class="input" placeholder="抗疫特别国债资金"></el-input>
           </div>
         </el-form-item>
       </div>
@@ -70,7 +65,6 @@
             <el-input
               class="input"
               placeholder="其他地方财政性建设资金"
-              v-model="form.other_funds"
             ></el-input>
           </div>
         </el-form-item>
@@ -80,7 +74,6 @@
             <el-input
               class="input"
               placeholder="政策性开发性金融工具(基金)投资"
-              v-model="form.policy_finance_funds"
             ></el-input>
           </div>
         </el-form-item>
@@ -123,17 +116,18 @@ export default {
     wtCard
   },
   props: {
-    info: {
-      type: Object,
-      default: () => {
-        return {}
-      }
+    projectId: {
+      required: true,
+      type: String,
+      default: ''
     }
   },
   watch: {
-    info: {
+    projectId: {
       handler(val) {
-        this.form = val
+        if (val.length > 0) {
+          this.getFundsList(1)
+        }
       },
       immediate: true
     }
@@ -141,10 +135,19 @@ export default {
   data() {
     return {
       disabled: true,
-      form: {}
+      data: {}
     }
   },
   methods: {
+    getFundsList(type) {
+      this.$api.funds
+        .fundsList({ projectId: this.projectId, type: type })
+        .then(res => {
+          if (res.code === 200) {
+            this.data = res.data
+          }
+        })
+    },
     save() {
       this.$api.project.proUpdate(this.form).then(res => {
         if (res.code === 200) {

+ 1 - 1
src/views/project/index.vue

@@ -15,7 +15,7 @@
       <info1 :info="detail" />
       <info2 :project-id="projectId" :stage-id="stageId" />
       <info3 :project-id="projectId" :stage-id="stageId" />
-      <info4 :info="detail" />
+      <info4 :project-id="projectId" />
       <info5 :info="detail" />
       <info6 :project-id="projectId" />
       <info7 :info="detail" />