From e622bd5e3b2638b9ab9a712ed1160a66018d6fd7 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期四, 22 二月 2024 09:21:15 +0800
Subject: [PATCH] mrshi

---
 company/src/components/business/OperaCompanyDescWindow.vue |  305 ++++++++++++++++++++++++++------------------------
 1 files changed, 156 insertions(+), 149 deletions(-)

diff --git a/company/src/components/business/OperaCompanyDescWindow.vue b/company/src/components/business/OperaCompanyDescWindow.vue
index c647036..9577268 100644
--- a/company/src/components/business/OperaCompanyDescWindow.vue
+++ b/company/src/components/business/OperaCompanyDescWindow.vue
@@ -180,156 +180,163 @@
 </template>
 
 <script>
-    import BaseOpera from '@/components/base/BaseOpera'
-    import GlobalWindow from '@/components/common/GlobalWindow'
-    import OperaCompanyWindow from '@/components/business/OperaCompanyWindow'
-    import modification from '@/components/business/modification'
-    import { getById, updatePhone } from '@/api/business/company'
-    import { listForCompany } from '@/api/business/solutions'
-    import { sendSms } from '@/api/business/smsEmail'
-    export default {
-        name: 'OperaCompanyDescWindow',
-        extends: BaseOpera,
-        components: { GlobalWindow, OperaCompanyWindow, modification },
-        data () {
-            return {
-                ruleForm: {
-                    phone: '',
-                    code: ''
-                },
-                num: 0,
-                timer: null,
-                // 琛ㄥ崟鏁版嵁
-                form: {},
-                phone: '',
-                code: '',
-                visiblePhone: false,
-                options: [],
-                tableData: []
-            }
-        },
-        created () {
-            this.config({
-                api: '/business/company',
-                'field.id': 'id'
-            })
-        },
-        methods: {
-            close() {
-                this.visiblePhone = false
-                this.phone = ''
-                this.code = ''
-                clearInterval(this.timer)
-                this.num = 0
-            },
-            updatePhoneEvent() {
-                if (!this.phone) {
-                    this.$message.warning('璇疯緭鍏ユ墜鏈哄彿')
-                    return
-                }
-                if (!this.code) {
-                    this.$message.warning('璇疯緭鍏ラ獙璇佺爜')
-                    return
-                }
-                updatePhone({
-                    id: this.form.id,
-                    captche: this.code,
-                    phone: this.phone
-                }).then(res => {
-                    this.form.phone = JSON.parse(JSON.stringify(this.phone))
-                    this.$message.success('鎿嶄綔鎴愬姛')
-                    this.visiblePhone = false
-                    this.phone = ''
-                    this.code = ''
-                    clearInterval(this.timer)
-                    this.num = 0
-                })
-            },
-            send() {
-                if (!this.phone) {
-                    this.$message.warning('璇疯緭鍏ユ墜鏈哄彿')
-                    return
-                }
-                sendSms({ phone: this.phone })
-                    .then(res => {
-                        this.num = 60
-                        this.setTime()
-                    })
-            },
-            setTime() {
-                this.timer = setInterval(() => {
-                    this.num -= 1
-                    if (this.num === 0) {
-                        clearInterval(this.timer)
-                        this.num = 0
-                    }
-                }, 1000)
-            },
-            open (title, target) {
-                const that = this;
-                this.title = title
-                this.phone = ''
-                this.code = ''
-                clearInterval(this.timer)
-                this.num = 0
-                getById(target.id)
-                    .then(res => {
-                        this.form = res
-                        this.form.type = 1
-
-                        this.form.file = {
-                            imgurl: '',
-                            imgurlfull: ''
-                        }
-                        this.form.file1 = {
-                            imgurl: '',
-                            imgurlfull: ''
-                        }
-                        this.form.file2 = {
-                            imgurl: '',
-                            imgurlfull: ''
-                        }
-                        this.form.file3 = {
-                            imgurl: '',
-                            imgurlfull: ''
-                        }
-
-                        this.form.file.imgurl = res.businessImg.fileurl
-                        this.form.file.imgurlfull = res.businessImg.fileurlFull
-                        this.form.file1.imgurl = res.idcardImgList[0].fileurl
-                        this.form.file1.imgurlfull = res.idcardImgList[0].fileurlFull
-                        this.form.file2.imgurl = res.idcardImgList[1].fileurl
-                        this.form.file2.imgurlfull = res.idcardImgList[1].fileurlFull
-                        this.form.file3.imgurl = res.signImg.fileurl
-                        this.form.file3.imgurlfull = res.signImg.fileurlFull
-
-                        listForCompany({ companyId: target.id })
-                            .then(resa => {
-                                that.form.solutionList = resa.map(item => {
-                                    return {
-                                        solutionBaseId: item.solutionBaseId,
-                                        canAdd: item.canAdd,
-                                        canReduce: item.canReduce
-                                    }
-                                })
-                                that.form.solutionListName = resa.map(item => {
-                                    return {
-                                        solutionName: item.solutionName,
-                                        canAdd: item.canAdd,
-                                        canReduce: item.canReduce
-                                    }
-                                })
-                                console.log(that.form)
-                                that.visible = true
-                            })
-                    })
-            },
-            callback() {
-                this.$emit('success')
-                this.visible = false
-            }
-        }
+import BaseOpera from '@/components/base/BaseOpera'
+import GlobalWindow from '@/components/common/GlobalWindow'
+import OperaCompanyWindow from '@/components/business/OperaCompanyWindow'
+import modification from '@/components/business/modification'
+import { getById, updatePhone } from '@/api/business/company'
+import { listForCompany } from '@/api/business/solutions'
+import { sendSms } from '@/api/business/smsEmail'
+export default {
+  name: 'OperaCompanyDescWindow',
+  extends: BaseOpera,
+  components: { GlobalWindow, OperaCompanyWindow, modification },
+  data () {
+    return {
+      ruleForm: {
+        phone: '',
+        code: ''
+      },
+      dataId: null,
+      num: 0,
+      timer: null,
+      // 琛ㄥ崟鏁版嵁
+      form: {},
+      phone: '',
+      code: '',
+      visiblePhone: false,
+      options: [],
+      tableData: []
     }
+  },
+  created () {
+    this.config({
+      api: '/business/company',
+      'field.id': 'id'
+    })
+  },
+  methods: {
+    close () {
+      this.visiblePhone = false
+      this.phone = ''
+      this.code = ''
+      clearInterval(this.timer)
+      this.num = 0
+    },
+    updatePhoneEvent () {
+      if (!this.phone) {
+        this.$message.warning('璇疯緭鍏ユ墜鏈哄彿')
+        return
+      }
+      if (!this.code) {
+        this.$message.warning('璇疯緭鍏ラ獙璇佺爜')
+        return
+      }
+      updatePhone({
+        id: this.form.id,
+        captche: this.code,
+        phone: this.phone
+      }).then(res => {
+        this.form.phone = JSON.parse(JSON.stringify(this.phone))
+        this.$message.success('鎿嶄綔鎴愬姛')
+        this.visiblePhone = false
+        this.phone = ''
+        this.code = ''
+        clearInterval(this.timer)
+        this.num = 0
+      })
+    },
+    send () {
+      if (!this.phone) {
+        this.$message.warning('璇疯緭鍏ユ墜鏈哄彿')
+        return
+      }
+      sendSms({ phone: this.phone })
+        .then(res => {
+          this.num = 60
+          this.setTime()
+        })
+    },
+    setTime () {
+      this.timer = setInterval(() => {
+        this.num -= 1
+        if (this.num === 0) {
+          clearInterval(this.timer)
+          this.num = 0
+        }
+      }, 1000)
+    },
+    open (title, target) {
+      const that = this
+      this.title = title
+      this.dataId = target.id
+      this.phone = ''
+      this.code = ''
+      clearInterval(this.timer)
+      this.num = 0
+      this.getDetail()
+    },
+    getDetail () {
+      var that =this
+      getById(this.dataId)
+        .then(res => {
+          this.form = res
+          this.form.type = 1
+
+          this.form.file = {
+            imgurl: '',
+            imgurlfull: ''
+          }
+          this.form.file1 = {
+            imgurl: '',
+            imgurlfull: ''
+          }
+          this.form.file2 = {
+            imgurl: '',
+            imgurlfull: ''
+          }
+          this.form.file3 = {
+            imgurl: '',
+            imgurlfull: ''
+          }
+
+          this.form.file.imgurl = res.businessImg.fileurl
+          this.form.file.imgurlfull = res.businessImg.fileurlFull
+          this.form.file1.imgurl = res.idcardImgList[0].fileurl
+          this.form.file1.imgurlfull = res.idcardImgList[0].fileurlFull
+          this.form.file2.imgurl = res.idcardImgList[1].fileurl
+          this.form.file2.imgurlfull = res.idcardImgList[1].fileurlFull
+          this.form.file3.imgurl = res.signImg.fileurl
+          this.form.file3.imgurlfull = res.signImg.fileurlFull
+
+          listForCompany({ companyId: this.dataId })
+            .then(resa => {
+              that.form.solutionList = resa.map(item => {
+                return {
+                  solutionBaseId: item.solutionBaseId,
+                  canAdd: item.canAdd,
+                  canReduce: item.canReduce
+                }
+              })
+              that.form.solutionListName = resa.map(item => {
+                return {
+                  solutionName: item.solutionName,
+                  canAdd: item.canAdd,
+                  canReduce: item.canReduce
+                }
+              })
+              console.log(that.form)
+              that.visible = true
+            })
+        })
+    },
+    callback () {
+      this.getDetail()
+      this.$emit('success')
+      // this.visible = false
+    }
+  }
+}
 </script>
 
 <style lang="scss" scoped>

--
Gitblit v1.9.3