0d02bcba by zhen

fix:客户信息更新

1 parent 249be2df
1 <template> 1 <template>
2 <div> 2 <div class="iframe-wrapper">
3 <h2>客户端</h2> 3 <h2>客户端</h2>
4 <el-form size="mini" :model="orderInfo" style="width:200px">
5 <el-form-item label="申请人姓名">
6 <el-input v-model="orderInfo.appUserName"></el-input>
7 </el-form-item>
8 <el-form-item label="申请人手机号">
9 <el-input v-model="orderInfo.appUserPhone"></el-input>
10 </el-form-item>
11 <el-form-item label="订单号">
12 <el-input v-model="orderInfo.orderId"></el-input>
13 </el-form-item>
14 <el-form-item label="业务员工号">
15 <el-input v-model="orderInfo.webUserName"></el-input>
16 </el-form-item>
17 </el-form>
4 <p> 18 <p>
5 <el-button type="primary" @click="open">呼叫</el-button> 19 <el-button type="primary" @click="open">呼叫</el-button>
6 <el-button type="primary" @click="cancelCall">取消呼叫</el-button> 20 <el-button type="primary" @click="cancelCall">取消呼叫</el-button>
...@@ -13,10 +27,6 @@ ...@@ -13,10 +27,6 @@
13 frameborder="2" 27 frameborder="2"
14 allow="microphone;camera;midi;encrypted-media;fullscreen;" 28 allow="microphone;camera;midi;encrypted-media;fullscreen;"
15 ></iframe> 29 ></iframe>
16 <p>callback:{{ message }}</p>
17 <p>这还少恩位置</p>
18 <p>这还少恩位置</p>
19 <p>这还少恩位置</p>
20 </div> 30 </div>
21 </template> 31 </template>
22 32
...@@ -36,8 +46,12 @@ export default { ...@@ -36,8 +46,12 @@ export default {
36 toolbar=1, 46 toolbar=1,
37 fullscreen=1 47 fullscreen=1
38 `, 48 `,
39 message: '', 49 orderInfo: {
40 windowRef: '' 50 appUserName: '123',
51 appUserPhone: '16621043587',
52 orderId: '123213',
53 webUserName: 'lz'
54 }
41 } 55 }
42 }, 56 },
43 beforeMount() { 57 beforeMount() {
...@@ -54,14 +68,15 @@ export default { ...@@ -54,14 +68,15 @@ export default {
54 }) 68 })
55 }, 69 },
56 sendMessage() { 70 sendMessage() {
71 const { appUserName, appUserPhone, orderId, webUserName } = this.orderInfo
57 this.$refs.srtcIframe.contentWindow.postMessage( 72 this.$refs.srtcIframe.contentWindow.postMessage(
58 { 73 {
59 type: 'startCall', 74 type: 'startCall',
60 data: { 75 data: {
61 appUserName: '123', 76 appUserName,
62 appUserPhone: '16621043587', 77 appUserPhone,
63 orderId: '123213', 78 orderId,
64 webUserName: 'lz' 79 webUserName
65 } 80 }
66 }, 81 },
67 this.baseUrl 82 this.baseUrl
...@@ -104,6 +119,10 @@ export default { ...@@ -104,6 +119,10 @@ export default {
104 </script> 119 </script>
105 120
106 <style lang="scss" scoped> 121 <style lang="scss" scoped>
122 .iframe-wrapper {
123 text-align: left;
124 padding: 40px;
125 }
107 iframe { 126 iframe {
108 width: 500px; 127 width: 500px;
109 height: 600px; 128 height: 600px;
......
...@@ -4,12 +4,8 @@ ...@@ -4,12 +4,8 @@
4 <Card class="info"> 4 <Card class="info">
5 <h4 class="mb10">客户信息</h4> 5 <h4 class="mb10">客户信息</h4>
6 <div class="item">姓名:{{ custInfoCopy.custName }}</div> 6 <div class="item">姓名:{{ custInfoCopy.custName }}</div>
7 <div class="item"> 7 <div class="item">性别:{{ sexCom }}</div>
8 性别:{{ custInfoCopy.custGender - 0 === 0 ? '女' : '男' }} 8 <div class="item">证件类型:{{ custIdTypeCom }}</div>
9 </div>
10 <div class="item">
11 证件类型:{{ custInfoCopy.custIdType - 0 === 1 ? '身份证' : '其他' }}
12 </div>
13 <div class="item">证件号:{{ custInfoCopy.custIdNo }}</div> 9 <div class="item">证件号:{{ custInfoCopy.custIdNo }}</div>
14 <div class="item">微信昵称:{{ custInfoCopy.custWxName }}</div> 10 <div class="item">微信昵称:{{ custInfoCopy.custWxName }}</div>
15 <div class="item"> 11 <div class="item">
...@@ -75,6 +71,22 @@ export default { ...@@ -75,6 +71,22 @@ export default {
75 beforeMount() { 71 beforeMount() {
76 this.handleGetResourceDetail() 72 this.handleGetResourceDetail()
77 }, 73 },
74 computed: {
75 sexCom() {
76 if (this.custInfoCopy.custGender === '') {
77 return ''
78 } else {
79 return Number(this.custInfoCopy.custGender) === 0 ? '女' : '男'
80 }
81 },
82 custIdTypeCom() {
83 if (this.custInfoCopy.custIdType === '') {
84 return ''
85 } else {
86 return Number(this.custInfoCopy.custIdType) === 0 ? '身份证' : '其他'
87 }
88 }
89 },
78 methods: { 90 methods: {
79 transCustStatus(status) { 91 transCustStatus(status) {
80 const numStatus = status - 0 92 const numStatus = status - 0
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!