scorpioyq 2 years ago
parent
commit
c546caf2db

+ 38 - 6
src/views/project/componens/info2.vue

@@ -8,6 +8,7 @@
         v-model="form"
         v-model:page="page"
         :before-open="beforeOpen"
+        @row-update="rowUpdate"
         @row-del="rowDel"
         @current-change="currentChange"
         @size-change="sizeChange"
@@ -86,7 +87,8 @@ export default {
         menuWidth: 180,
         size: 'mini',
         addBtn: false,
-        editBtn: false,
+        editBtn: true,
+        editBtnText: '编辑文号',
         viewBtn: false,
         delBtn: true,
         columnBtn: false,
@@ -97,20 +99,24 @@ export default {
             label: '文件名称',
             prop: 'fileName',
             fixed: true,
-            width: 400
+            width: 400,
+            editDisplay: false
           },
           {
             label: '文号',
-            prop: 'docNumber'
+            prop: 'docNumber',
+            span: 16
           },
           {
             label: '上传人',
             prop: 'createUserName',
-            width: 120
+            width: 120,
+            editDisplay: false
           },
           {
             label: '上传时间',
-            prop: 'createDate'
+            prop: 'createDate',
+            editDisplay: false
           }
         ]
       },
@@ -122,7 +128,7 @@ export default {
     }
   },
   created() {
-    // this.getDic(this.industry.value)
+    this.getDic(this.industry.value)
   },
   methods: {
     getDic(code) {
@@ -149,6 +155,32 @@ export default {
           }
         })
     },
+    beforeOpen(done, type) {
+      if (type === 'edit') {
+        done()
+      }
+    },
+    rowUpdate(row, index, done, loading) {
+      console.log(row)
+      loading()
+      this.$api.common
+        .fileUpdate({ id: row.bladeFileId, copyNumber: row.docNumber })
+        .then(
+          res => {
+            if (res.code === 200) {
+              this.$message.success(res.msg)
+            } else {
+              this.$message.error(res.msg)
+            }
+            done(row)
+            this.onLoad()
+          },
+          error => {
+            window.console.log(error)
+            loading()
+          }
+        )
+    },
     rowDel(row, index, done) {
       this.$confirm('确定将选择数据删除?', {
         type: 'warning'

+ 0 - 1
src/views/project/componens/info5.vue

@@ -49,7 +49,6 @@ export default {
   watch: {
     info: {
       handler(val) {
-        console.log(val)
         this.form = val
       },
       immediate: true

+ 6 - 7
src/views/project/index.vue

@@ -16,7 +16,6 @@
       </template>
     </tips-custom>
     <!--    content-->
-    {{ currentStage }}
     <div style="margin-bottom: 65px">
       <div v-if="[1, 2].includes(currentStage)">
         <!--        基础信息-->
@@ -55,22 +54,22 @@
           v-if="[0, 1, 4].includes(detail.report_type)"
           @click="projectReport"
           plain
-          >上报审核</el-button
-        >
+          >上报审核
+        </el-button>
         <el-button
           type="primary"
           plain
           v-if="detail.report_type === 2"
           @click="$refs.approval.show()"
-          >审 核</el-button
-        >
+          >审 核
+        </el-button>
         <el-button
           type="primary"
           plain
           v-if="detail.report_type === 3"
           @click="projectReportFormal"
-          >上报到固定资产</el-button
-        >
+          >上报到固定资产
+        </el-button>
         <el-button type="primary" @click="nextStage">下一阶段</el-button>
       </div>
     </div>