From 2bced02c1156d7fdcea4310c389c01b5a674cb98 Mon Sep 17 00:00:00 2001
From: lin <sbla5888@163.com>
Date: Tue, 14 May 2024 15:12:39 +0800
Subject: [PATCH] 维修基金优化

---
 src/views/property/process/maintenanceFundApply/edit.vue |   90 +++++++++++++++++++++++++++++++++++----------
 1 files changed, 70 insertions(+), 20 deletions(-)

diff --git a/src/views/property/process/maintenanceFundApply/edit.vue b/src/views/property/process/maintenanceFundApply/edit.vue
index 7eb648f..e43ac00 100644
--- a/src/views/property/process/maintenanceFundApply/edit.vue
+++ b/src/views/property/process/maintenanceFundApply/edit.vue
@@ -78,8 +78,9 @@
       <el-button type="danger" @click="handleDisagree">关闭申请</el-button>
     </div>
 
-    <deitDiscussion ref="DeitDiscussion">
-    </deitDiscussion>
+    <deitDiscussion ref="DeitDiscussion"> </deitDiscussion>
+
+    <userList ref="userList" @selectPersonList="selectPersonList"></userList>
 
   </basic-container>
 </template>
@@ -89,6 +90,7 @@
     historyFlowList,
     leaveDetail
   } from "@/api/work/process";
+  import userList from "../../components/userList.vue";
 
   import {
     getList,
@@ -106,7 +108,8 @@
   import deitDiscussion from "../../components/deitDiscussion.vue"
   export default {
     components: {
-      deitDiscussion
+      deitDiscussion,
+      userList
     },
     data() {
       return {
@@ -162,6 +165,33 @@
                 message: "请选择小区",
                 trigger: "blur",
               }, ],
+            },
+            {
+              disabled: true,
+              label: "户室",
+              prop: "houseNames",
+              tags: true,
+              type: "input",
+              span: 12,
+              remote: true,
+              rules: [{
+                required: true,
+                message: '请选择户室',
+                trigger: 'blur'
+              }],
+              focus: ({
+                value,
+                column
+              }) => {
+                if (!this.form.districtId) {
+                  this.$message({
+                    type: "error",
+                    message: "请先选择小区后,再选择户室!",
+                  })
+                  return
+                }
+                this.$refs.userList.show(this.form.districtId)
+              },
             },
             {
               label: '维修项目名称',
@@ -291,7 +321,6 @@
               viewDisabled: false,
               type: 'select',
               dicUrl: `/api/blade-article/article/getArticleByDistrictId?type=4&eventType=1&districtIdList={{districtId}}`,
-              // slot: true,
               formslot: true,
               cascader: ['vote'],
               props: {
@@ -308,9 +337,6 @@
               }, ],
               change: (val) => {
                 console.log("val===>", val)
-                // console.log("form===>",this.form)
-
-
               }
             },
 
@@ -341,19 +367,6 @@
               labelWidth: 140,
               type: "textarea",
             },
-            // {
-            //   label: "批复意见",
-            //   span: 24,
-            //   hide: true,
-            //   prop: "comment",
-            //   labelWidth: 140,
-            //   type: "textarea",
-            //   rules: [{
-            //     required: true,
-            //     message: "请输入批复意见",
-            //     trigger: "blur",
-            //   }, ],
-            // },
             {
               label: '施工方案附件',
               prop: 'constructionSchemeUrls',
@@ -426,6 +439,43 @@
       }
     },
     methods: {
+
+      uploadAfter(res, done, loading, column) {
+        console.log(res, column)
+        // this.form.attachment = []
+        this.form.attachment.push({
+          fileName: column.label,
+          fileUrl: res.link,
+          fileType: this.getFileExtension(res.originalName),
+        })
+        done()
+        // this.$message.success('上传后的方法')
+      },
+
+      getFileExtension(filename) {
+        var lastDotIndex = filename.lastIndexOf('.');
+        if (lastDotIndex !== -1) {
+          return filename.substring(lastDotIndex + 1);
+        }
+        return '';
+      },
+
+      selectPersonList(personList) {
+        console.log(personList, "++++++++++++")
+        this.personList = personList
+        let houseNameList = personList.map(e => {
+          if (e.houseName) {
+            return e.houseName
+          }
+        })
+        this.form.houseName = houseNameList.join(",")
+        let addressCodeList = personList.map(e => {
+          if (e.addressCode) {
+            return e.addressCode
+          }
+        })
+        this.form.addressCodes = addressCodeList.join(",")
+      },
       handleSubmit(form, done, loading) {
         if (form.constructionSchemeUrls.length > 0) {
           var urls = []

--
Gitblit v1.9.3