jiangping
2023-08-25 282e032b5771da13d224214d3b0b71f3efde9a42
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<template>
  <GlobalWindow
    :title="title"
    :visible.sync="visible"
    :confirm-working="isWorking"
    @confirm="confirm"
  >
    <div class="title-style">客户信息 <div class="tips">{{form.oepnType ? '正式' : '体验' }}</div><div class="tips">有效期:{{ form.oepnValidDate.substring(0, form.oepnValidDate.length-9) }}</div></div>
    <el-descriptions direction="horizontal" :column="1" :colon="false">
      <el-descriptions-item label="客户名称:">{{ form.orgName }}</el-descriptions-item>
      <el-descriptions-item label="客户简称:">{{ form.remark }}</el-descriptions-item>
      <el-descriptions-item label="主登录账号:">{{ form.phone }}</el-descriptions-item>
      <el-descriptions-item label="所在地址:">{{ form.addr }}</el-descriptions-item>
      <el-descriptions-item label="企业信用代码:">{{ form.creditCode }}</el-descriptions-item>
      <el-descriptions-item label="联系人:">{{ form.linkName }} {{ form.linkPhone }}</el-descriptions-item>
      <el-descriptions-item label="销售人员:">{{ form.salespersonName }} {{ form.salespersonmobile }}</el-descriptions-item>
      <el-descriptions-item label="营业执照:">
        <!-- {{ form.fileurlfull }} -->
        <el-image
          v-if="form.fileStoreAddr"
          style="width: 120px; height: 80px;"
          :src="form.fileurlfull" 
          :initial-index="0"
          :preview-src-list="[form.fileurlfull]"
        ></el-image>
      </el-descriptions-item>
      <el-descriptions-item label="系统访问地址:">
        <a :href="form.systemUrl" target="_blank" rel="noopener noreferrer">{{ form.systemUrl }}</a>
        <span style="cursor: pointer; margin-left: 10px;" @click="copy">复制</span>
      </el-descriptions-item>
    </el-descriptions>
    <div slot="footer"></div>
    
  </GlobalWindow>
</template>
 
<script>
import BaseOpera from '@/components/base/BaseOpera'
import GlobalWindow from '@/components/common/GlobalWindow'
export default {
  name: 'OperaClientDetailWindow',
  extends: BaseOpera,
  components: { GlobalWindow },
  data () {
    
    return {
      isUploading: false,
      // 表单数据
      form: {
        id: null,
        oepnType: 1,
        orgName: '',
        name: '',
        remark: '',
        phone: '',
        legalPerson: '',
        addr: '',
        salesperson: '',
        salespersonName: '',
        salespersonmobile: '',
        oepnValidDate: '',
        creditCode: '',
        linkName: '',
        linkPhone: '',
        fileStoreAddr: '',
        fileurlfull: '',
        systemUrl: ''
      },
    }
  },
  created () {
    this.config({
      api: '/business/clientManger',
      'field.id': 'id'
    })
  },
  methods: {
    open (target) {
      this.title = '客户资料'
      this.visible = true
      debugger
      // 编辑
      this.$nextTick(() => {
        for (const key in this.form) {
          this.form[key] = target[key]
        }
      })
    },
    copy() {
      // let text = `系统访问地址:${this.form.systemUrl}\n登录主账号:${this.form.phone}\n登录密码:123456\n`
      this.$copyText(this.form.systemUrl)
        .then(() => {
          this.$message.success('复制成功,去分享给同事吧~')
        })
        .catch(e => {
          this.$message.error(e)
        })
    },
  },
}
</script>
 
<style lang="scss" scoped>
::v-deep .el-descriptions-item__label {
  width: 85px;
  text-align: right;
  display: flex;
  flex-direction: row-reverse;
}
.title-style {
  font-weight: 500;
  font-size: 20px;
  display: flex;
  line-height: 32px;
  height: 32px;
  margin-bottom: 20px;
  .tips {
    margin-left: 10px;
    font-weight: normal;
    font-size: 16px;
    line-height:32px;
    height: 32px;
    padding: 0 5px;
    color: rgb(68, 87, 172);
    background-color: rgb(227, 230, 243);
  }
}
.image-style {
  width: 100px;
  height: 60px;
  margin-right: 8px;
}
</style>