浏览代码

问题修改

liuyifan 5 年之前
父节点
当前提交
cefde98ac0

+ 8 - 0
CallCenterWeb.UI/src/api/commodityManagement/commodityList.js

@@ -61,4 +61,12 @@ export function updateCommodityTag(params) {
61 61
   })
62 62
 }
63 63
 
64
+// 更改商品是否赠品
65
+export function updateCommodityIsSale(params) {
66
+  return request({
67
+    url: 'api/Product/updateSale',
68
+    method: 'post',
69
+    params
70
+  })
71
+}
64 72
 

+ 128 - 239
CallCenterWeb.UI/src/components/Teloperation/index.vue

@@ -4,65 +4,44 @@
4 4
       <div class="call_icon">
5 5
         <transition-group type="transition" name="slide-list">
6 6
           <svg-icon v-show="!telIsLogin" key="0" icon-class="guaduan" />
7
-          <i
8
-            v-show="telIsLogin && (telSeatState===2 && telLineState===1)"
9
-            key="1"
10
-            class="calli free"
11
-          />
7
+          <i v-show="telIsLogin && telSeatState === 2 && telLineState === 1" key="1" class="calli free" />
12 8
           <!-- <svg-icon v-show="telIsLogin && (telSeatState===2 && telLineState===1)" icon-class="xiuxi" /> -->
13
-          <svg-icon
14
-            v-show="telIsLogin && (telSeatState===5 && telLineState===1)"
15
-            key="2"
16
-            icon-class="manglu01"
17
-          />
18
-          <svg-icon
19
-            v-show="telIsLogin && (telLineState===2)"
20
-            key="3"
21
-            icon-class="fenji"
22
-            class="ringing"
23
-          />
24
-          <svg-icon
25
-            v-show="telIsLogin && (telLineState===3)"
26
-            key="4"
27
-            icon-class="huchu"
28
-            class="ringing"
29
-          />
9
+          <svg-icon v-show="telIsLogin && telSeatState === 5 && telLineState === 1" key="2" icon-class="manglu01" />
10
+          <svg-icon v-show="telIsLogin && telLineState === 2" key="3" icon-class="fenji" class="ringing" />
11
+          <svg-icon v-show="telIsLogin && telLineState === 3" key="4" icon-class="huchu" class="ringing" />
30 12
           <!-- <svg-icon v-show="telIsLogin && (telLineState===4)" icon-class="zhenling" class="ringing" /> -->
31 13
           <!-- <svg-icon v-show="telIsLogin && (telLineState===6)" icon-class="tonghuazhong01" class="incall" /> -->
32 14
           <!-- <svg-icon v-show="telIsLogin && (telLineState===10)" icon-class="tonghuazhong01" class="incall" /> -->
33
-          <i v-show="telIsLogin && (telLineState===4)" key="5" class="calli callringing" />
34
-          <i v-show="telIsLogin && (telLineState===6)" key="6" class="calli incalling" />
35
-          <i v-show="telIsLogin && (telLineState===10)" key="7" class="calli incalling" />
15
+          <i v-show="telIsLogin && telLineState === 4" key="5" class="calli callringing" />
16
+          <i v-show="telIsLogin && telLineState === 6" key="6" class="calli incalling" />
17
+          <i v-show="telIsLogin && telLineState === 10" key="7" class="calli incalling" />
36 18
         </transition-group>
37 19
       </div>
38 20
       <div class="call_content">
39 21
         <p class="call_text">
40 22
           <!-- <transition-group type="transition" name="fade-text"> -->
41 23
           <span v-show="!telIsLogin" key="8">还未开始工作</span>
42
-          <span v-show="telIsLogin && (telSeatState===2 && telLineState===1)" key="9">空闲中</span>
43
-          <span v-show="telIsLogin && (telSeatState===5 && telLineState===1)" key="10">忙碌中</span>
44
-          <span v-show="telIsLogin && (telLineState===2)" key="11">摘机中</span>
45
-          <span v-show="telIsLogin && (telLineState===3)" key="12">拨号中</span>
46
-          <span v-show="telIsLogin && (telLineState===4)" key="13">振铃中</span>
47
-          <span v-show="telIsLogin && (telLineState===6)" key="14">通话中</span>
48
-          <span v-show="telIsLogin && (telLineState===10)" key="15">保持中</span>
24
+          <span v-show="telIsLogin && telSeatState === 2 && telLineState === 1" key="9">空闲中</span>
25
+          <span v-show="telIsLogin && telSeatState === 5 && telLineState === 1" key="10">忙碌中</span>
26
+          <span v-show="telIsLogin && telLineState === 2" key="11">摘机中</span>
27
+          <span v-show="telIsLogin && telLineState === 3" key="12">拨号中</span>
28
+          <span v-show="telIsLogin && telLineState === 4" key="13">振铃中</span>
29
+          <span v-show="telIsLogin && telLineState === 6" key="14">通话中</span>
30
+          <span v-show="telIsLogin && telLineState === 10" key="15">保持中</span>
49 31
           <!-- </transition-group>	 -->
50 32
           <svg-icon v-show="telIsLogin" icon-class="xinhao" />
51 33
         </p>
52
-        <p
53
-          v-show="(telSeatState===2 && telLineState < 6)|| (telSeatState === 5 && telLineState < 6)"
54
-          class="call_time"
55
-        >--:--:--</p>
56
-        <p v-show="telIsLogin && (telLineState===6 || telLineState===10)" class="call_time">
34
+        <p v-show="(telSeatState === 2 && telLineState < 6) || (telSeatState === 5 && telLineState < 6)" class="call_time">--:--:--</p>
35
+        <p v-show="telIsLogin && (telLineState === 6 || telLineState === 10)" class="call_time">
57 36
           <span v-show="Number(telCallTime.hh) === 0">{{ telCallTime.hh }}</span>
58 37
           <span v-show="Number(telCallTime.hh) > 0 && Number(telCallTime.hh) < 10">
59
-            <span>{{ telCallTime.hh.substr(0,1) }}</span>
38
+            <span>{{ telCallTime.hh.substr(0, 1) }}</span>
60 39
             <span class="blue_color">{{ telCallTime.hh.substr(1) }}</span>
61 40
           </span>
62 41
           <span v-show="Number(telCallTime.hh) > 9" class="blue_color">{{ telCallTime.hh }}</span>
63 42
           <span v-show="Number(telCallTime.mm) === 0">:{{ telCallTime.mm }}</span>
64 43
           <span v-show="Number(telCallTime.mm) > 0 && Number(telCallTime.mm) < 10">
65
-            <span>:{{ telCallTime.mm.substr(0,1) }}</span>
44
+            <span>:{{ telCallTime.mm.substr(0, 1) }}</span>
66 45
             <span class="blue_color">{{ telCallTime.mm.substr(1) }}</span>
67 46
           </span>
68 47
           <span v-show="Number(telCallTime.mm) > 9" class="blue_color">:{{ telCallTime.mm }}</span>
@@ -71,160 +50,70 @@
71 50
       </div>
72 51
     </div>
73 52
     <div v-show="telIsLogin" class="call_middle">
74
-      <el-input
75
-        :class="{no_write: true}"
76
-        :readonly="true"
77
-        v-model="telCallNum"
78
-        size="small"
79
-        placeholder
80
-      />
81
-      <i
82
-        v-show="telSeatState===2 && telLineState===1"
83
-        slot="reference"
84
-        class="dialicon"
85
-        @click="makeCall"
86
-      />
87
-      <el-popover
88
-        :value="telIsVisCallout"
89
-        :disabled="false"
90
-        trigger="manual"
91
-        popper-class="dial_popover"
92
-        placement="bottom-start"
93
-        width="300"
94
-        transition="fade-in-linear"
95
-        @after-leave="afterLeave"
96
-      >
53
+      <el-input :class="{ no_write: true }" :readonly="true" v-model="telCallNum" size="small" placeholder />
54
+      <i v-show="(telSeatState === 2 && telLineState === 1) || (telSeatState === 5 && telLineState === 1)" slot="reference" class="dialicon" @click="makeCall" />
55
+      <el-popover :value="telIsVisCallout" :disabled="false" trigger="manual" popper-class="dial_popover" placement="bottom-start" width="300" transition="fade-in-linear" @after-leave="afterLeave">
97 56
         <Dialplate />
98 57
       </el-popover>
99 58
     </div>
100 59
     <div class="call_right">
101 60
       <transition-group type="transition" name="fade-list">
102
-        <button
103
-          v-waves
104
-          v-show="!telIsLogin"
105
-          key="27"
106
-          type="button"
107
-          class="start_btn"
108
-          @click="signIn"
109
-        >开始工作</button>
110
-        <button
111
-          v-waves
112
-          v-show="telIsLogin && (telSeatState===2 && telLineState===1)"
113
-          key="17"
114
-          type="button"
115
-          class="call_btn"
116
-          @click="setBusy"
117
-        >置忙</button>
118
-        <button
119
-          v-waves
120
-          v-show="telIsLogin && (telSeatState===5 && telLineState===1)"
121
-          key="18"
122
-          type="button"
123
-          class="call_btn"
124
-          @click="setFree"
125
-        >置闲</button>
126
-        <button
127
-          v-waves
128
-          v-show="telIsLogin && ((telSeatState===2 || telSeatState===5) && telLineState===1)"
129
-          key="19"
130
-          type="button"
131
-          class="call_btn"
132
-          @click="signOut"
133
-        >签出</button>
134
-        <button
135
-          v-waves
136
-          v-show="telIsLogin && (telLineState===6)"
137
-          key="20"
138
-          type="button"
139
-          class="call_btn yellow_bg"
140
-          @click="holdBack"
141
-        >保持通话</button>
142
-        <button
143
-          v-waves
144
-          v-show="telIsLogin && (telLineState===10)"
145
-          key="21"
146
-          type="button"
147
-          class="call_btn green_bg"
148
-          @click="retrieveBack"
149
-        >接回通话</button>
150
-        <button
151
-          v-waves
152
-          v-show="telIsLogin && (telLineState===6 || telLineState===10)"
153
-          key="24"
154
-          type="button"
155
-          class="call_btn"
156
-          @click="transferCall"
157
-        >转接</button>
158
-        <button
159
-          v-waves
160
-          v-show="telIsLogin && (telLineState===6 || telLineState===10)"
161
-          key="25"
162
-          type="button"
163
-          class="call_btn"
164
-          @click="meetingCall"
165
-        >多方通话</button>
166
-        <button
167
-          v-waves
168
-          v-show="telIsLogin && (telLineState>2)"
169
-          key="22"
170
-          type="button"
171
-          class="call_btn"
172
-          @click="btn_IVR"
173
-        >转IVR</button>
174
-        <button
175
-          v-waves
176
-          v-show="telIsLogin && (telLineState>2)"
177
-          key="23"
178
-          type="button"
179
-          class="call_btn red_bg"
180
-          @click="dropCall"
181
-        >挂断</button>
61
+        <button v-waves v-show="!telIsLogin" key="27" type="button" class="start_btn" @click="signIn">开始工作</button>
62
+        <button v-waves v-show="telIsLogin && telSeatState === 2 && telLineState === 1" key="17" type="button" class="call_btn" @click="setBusy">置忙</button>
63
+        <button v-waves v-show="telIsLogin && telSeatState === 5 && telLineState === 1" key="18" type="button" class="call_btn" @click="setFree">置闲</button>
64
+        <button v-waves v-show="telIsLogin && (telSeatState === 2 || telSeatState === 5) && telLineState === 1" key="19" type="button" class="call_btn" @click="signOut">签出</button>
65
+        <button v-waves v-show="telIsLogin && telLineState === 6" key="20" type="button" class="call_btn yellow_bg" @click="holdBack">保持通话</button>
66
+        <button v-waves v-show="telIsLogin && telLineState === 10" key="21" type="button" class="call_btn green_bg" @click="retrieveBack">接回通话</button>
67
+        <button v-waves v-show="telIsLogin && (telLineState === 6 || telLineState === 10)" key="24" type="button" class="call_btn" @click="transferCall">转接</button>
68
+        <button v-waves v-show="telIsLogin && (telLineState === 6 || telLineState === 10)" key="25" type="button" class="call_btn" @click="meetingCall">多方通话</button>
69
+        <button v-waves v-show="telIsLogin && telLineState > 2" key="22" type="button" class="call_btn" @click="btn_IVR">转IVR</button>
70
+        <button v-waves v-show="telIsLogin && telLineState > 2" key="23" type="button" class="call_btn red_bg" @click="dropCall">挂断</button>
182 71
       </transition-group>
183 72
     </div>
184 73
   </div>
185 74
 </template>
186 75
 
187 76
 <script>
188
-import { mapGetters } from 'vuex'
189
-import store from '@/store'
190
-import { Send } from '@/utils/telWebsocket'
191
-import Dialplate from '@/components/Dialplate'
77
+import { mapGetters } from "vuex"
78
+import store from "@/store"
79
+import { Send } from "@/utils/telWebsocket"
80
+import Dialplate from "@/components/Dialplate"
192 81
 export default {
193
-  name: 'Teloperation',
82
+  name: "Teloperation",
194 83
   components: {
195
-    Dialplate
84
+    Dialplate,
196 85
   },
197
-  data () {
86
+  data() {
198 87
     return {
199 88
       scoketDatas: {}, // 发送的数据
200
-      telNumber: '',
201
-      telTimer: null // 时间定时器
89
+      telNumber: "",
90
+      telTimer: null, // 时间定时器
202 91
     }
203 92
   },
204 93
   computed: {
205 94
     ...mapGetters([
206
-      'usercode', // 工号
207
-      'extension', // 分机号
208
-      'groupcode', // 坐席组code
209
-      'telIsLogin', // 是否签入
210
-      'telSeatState', // 坐席状态
211
-      'telLineState', // 线路状态
212
-      'telCallNum', // 电话号码
213
-      'telIsVisCallout', // 外呼操作面板是否显示
214
-      'telCallTime', // 通话时间
215
-      'telMessageData' // telwebsocket 接收的数据
216
-    ])
95
+      "usercode", // 工号
96
+      "extension", // 分机号
97
+      "groupcode", // 坐席组code
98
+      "telIsLogin", // 是否签入
99
+      "telSeatState", // 坐席状态
100
+      "telLineState", // 线路状态
101
+      "telCallNum", // 电话号码
102
+      "telIsVisCallout", // 外呼操作面板是否显示
103
+      "telCallTime", // 通话时间
104
+      "telMessageData", // telwebsocket 接收的数据
105
+    ]),
217 106
   },
218 107
   watch: {
219 108
     // 如果 `telLineState` 发生改变,这个函数就会运行
220 109
     telLineState: function (newT, oldT) {
221 110
       // console.log(newT, oldT);
222 111
       this.watchTelLineState(newT, oldT)
223
-    }
112
+    },
224 113
   },
225 114
   methods: {
226 115
     // 签入
227
-    signIn () {
116
+    signIn() {
228 117
       console.log(this.groupcode)
229 118
       console.log(this.extension)
230 119
       // if(!this.groupcode){
@@ -232,121 +121,122 @@ export default {
232 121
       //   return false
233 122
       // }
234 123
       if (!this.extension) {
235
-        this.$confirm('如果您想进行话务操作,请重新登录并且输入分机号, 是否重新登录?', '提示', {
236
-          confirmButtonText: '是',
237
-          cancelButtonText: '否',
238
-          type: 'warning'
239
-        }).then(() => {
240
-          this.$store.dispatch('FedLogOut').then(() => {
241
-            location.reload() // 为了重新实例化vue-router对象 避免bug
124
+        this.$confirm("如果您想进行话务操作,请重新登录并且输入分机号, 是否重新登录?", "提示", {
125
+          confirmButtonText: "是",
126
+          cancelButtonText: "否",
127
+          type: "warning",
128
+        })
129
+          .then(() => {
130
+            this.$store.dispatch("FedLogOut").then(() => {
131
+              location.reload() // 为了重新实例化vue-router对象 避免bug
132
+            })
242 133
           })
243
-        }).catch(() => {
244
-         })
134
+          .catch(() => {})
245 135
         return
246 136
       }
247 137
       this.scoketDatas = {
248
-        'Type': 'Login',
249
-        'AgentID': this.usercode,
250
-        'AgentExten': this.extension,
251
-        'AgentGroup': window.localStorage.getItem("groupCode"), // 坐席组id  
252
-        'AgentType': '0',
253
-        'DisposeTime': '0' // 话后处理时长设置,0代表一致话后处理,除非发送置闲 (按照历史习惯,字符串形式)
138
+        Type: "Login",
139
+        AgentID: this.usercode,
140
+        AgentExten: this.extension,
141
+        AgentGroup: window.localStorage.getItem("groupCode"), // 坐席组id
142
+        AgentType: "0",
143
+        DisposeTime: "0", // 话后处理时长设置,0代表一致话后处理,除非发送置闲 (按照历史习惯,字符串形式)
254 144
       }
255 145
       Send(this.scoketDatas)
256 146
     },
257 147
     // 签出
258
-    signOut () {
148
+    signOut() {
259 149
       this.scoketDatas = {
260
-        'Type': 'Logout',
261
-        'AgentID': this.usercode,
262
-        'AgentExten': this.extension
150
+        Type: "Logout",
151
+        AgentID: this.usercode,
152
+        AgentExten: this.extension,
263 153
       }
264 154
       Send(this.scoketDatas)
265
-      store.dispatch('UpdateCalloutScreen', false)
155
+      store.dispatch("UpdateCalloutScreen", false)
266 156
     },
267 157
     // 置忙
268
-    setBusy () {
158
+    setBusy() {
269 159
       this.scoketDatas = {
270
-        'Type': 'SayBusy',
271
-        'AgentID': this.usercode,
272
-        'AgentExten': this.extension
160
+        Type: "SayBusy",
161
+        AgentID: this.usercode,
162
+        AgentExten: this.extension,
273 163
       }
274 164
       Send(this.scoketDatas)
275 165
     },
276 166
     // 置闲
277
-    setFree () {
167
+    setFree() {
278 168
       this.scoketDatas = {
279
-        'Type': 'SayFree',
280
-        'AgentID': this.usercode,
281
-        'AgentExten': this.extension
169
+        Type: "SayFree",
170
+        AgentID: this.usercode,
171
+        AgentExten: this.extension,
282 172
       }
283 173
       Send(this.scoketDatas)
284 174
     },
285 175
     // 转IVR
286
-    btn_IVR () {
176
+    btn_IVR() {
287 177
       this.scoketDatas = {
288
-        'Type': 'TurnIvr',
289
-        'AgentID': this.usercode,
290
-        'AgentExten': this.extension,
291
-        'IvrName': 'MYD_ZXZ',
292
-        'IvrPos': '1'
178
+        Type: "TurnIvr",
179
+        AgentID: this.usercode,
180
+        AgentExten: this.extension,
181
+        IvrName: "MYD_ZXZ",
182
+        IvrPos: "1",
293 183
       }
294 184
       Send(this.scoketDatas)
295 185
     },
296 186
     // 挂断
297
-    dropCall () {
187
+    dropCall() {
298 188
       this.scoketDatas = {
299
-        'Type': 'DropCall',
300
-        'AgentID': this.usercode,
301
-        'AgentExten': this.extension
189
+        Type: "DropCall",
190
+        AgentID: this.usercode,
191
+        AgentExten: this.extension,
302 192
       }
303 193
       Send(this.scoketDatas)
304
-      store.dispatch('UpdateCalloutScreen', false)
194
+      store.dispatch("UpdateCalloutScreen", false)
305 195
     },
306 196
     // 保持通话
307
-    holdBack () {
197
+    holdBack() {
308 198
       this.scoketDatas = {
309
-        'Type': 'Hold',
310
-        'AgentID': this.usercode,
311
-        'AgentExten': this.extension
199
+        Type: "Hold",
200
+        AgentID: this.usercode,
201
+        AgentExten: this.extension,
312 202
       }
313 203
       Send(this.scoketDatas)
314 204
     },
315 205
     // 接回通话
316
-    retrieveBack () {
206
+    retrieveBack() {
317 207
       this.scoketDatas = {
318
-        'Type': 'Retrieve',
319
-        'AgentID': this.usercode,
320
-        'AgentExten': this.extension
208
+        Type: "Retrieve",
209
+        AgentID: this.usercode,
210
+        AgentExten: this.extension,
321 211
       }
322 212
       Send(this.scoketDatas)
323 213
     },
324 214
     // 外呼
325
-    makeCall () {
326
-      store.dispatch('ChangeCallType', 'MakeCall')
327
-      store.dispatch('UpdateCalloutScreen', !this.telIsVisCallout)
215
+    makeCall() {
216
+      store.dispatch("ChangeCallType", "MakeCall")
217
+      store.dispatch("UpdateCalloutScreen", !this.telIsVisCallout)
328 218
     },
329 219
     // 转接
330
-    transferCall () {
331
-      store.dispatch('ChangeCallType', 'Transfer')
332
-      store.dispatch('UpdateCalloutScreen', !this.telIsVisCallout)
220
+    transferCall() {
221
+      store.dispatch("ChangeCallType", "Transfer")
222
+      store.dispatch("UpdateCalloutScreen", !this.telIsVisCallout)
333 223
     },
334 224
     // 多方通话
335
-    meetingCall () {
336
-      store.dispatch('ChangeCallType', 'Meeting')
337
-      store.dispatch('UpdateCalloutScreen', !this.telIsVisCallout)
225
+    meetingCall() {
226
+      store.dispatch("ChangeCallType", "Meeting")
227
+      store.dispatch("UpdateCalloutScreen", !this.telIsVisCallout)
338 228
     },
339 229
     // 外呼操作面板 关闭后
340
-    afterLeave () {
341
-      store.dispatch('ChangeCallType', 'MakeCall')
230
+    afterLeave() {
231
+      store.dispatch("ChangeCallType", "MakeCall")
342 232
     },
343 233
     // 通话时间
344
-    callTime () {
234
+    callTime() {
345 235
       // 通话时间重置为00:00:00
346
-      store.dispatch('UpdateCallTime', {
347
-        hh: '00',
348
-        mm: '00',
349
-        ss: '00'
236
+      store.dispatch("UpdateCallTime", {
237
+        hh: "00",
238
+        mm: "00",
239
+        ss: "00",
350 240
       })
351 241
       // 时间 计时
352 242
       let _n = 0
@@ -356,23 +246,23 @@ export default {
356 246
       this.telTimer = setInterval(() => {
357 247
         _n++
358 248
 
359
-        store.dispatch('UpdateCallTime', {
360
-          hh: this.toDub(parseInt(_n / 60 / 60 % 60)), // 小时
361
-          mm: this.toDub(parseInt(_n / 60 % 60)), // 分钟
362
-          ss: this.toDub(parseInt(_n % 60)) // 秒
249
+        store.dispatch("UpdateCallTime", {
250
+          hh: this.toDub(parseInt((_n / 60 / 60) % 60)), // 小时
251
+          mm: this.toDub(parseInt((_n / 60) % 60)), // 分钟
252
+          ss: this.toDub(parseInt(_n % 60)), // 秒
363 253
         })
364 254
       }, 1000)
365 255
     },
366 256
     // 清除定时器
367
-    clearInter () {
257
+    clearInter() {
368 258
       clearInterval(this.telTimer)
369 259
     },
370 260
     // 小于10补0
371
-    toDub (i) {
372
-      return i < 10 ? '0' + i : '' + i
261
+    toDub(i) {
262
+      return i < 10 ? "0" + i : "" + i
373 263
     },
374 264
     // 监听 线路状态
375
-    watchTelLineState (newT, oldT) {
265
+    watchTelLineState(newT, oldT) {
376 266
       // 外呼
377 267
       if (newT === 6 && oldT === 4) {
378 268
         this.callTime()
@@ -393,8 +283,8 @@ export default {
393 283
           // 						});
394 284
         }
395 285
       }
396
-    }
397
-  }
286
+    },
287
+  },
398 288
 }
399 289
 </script>
400 290
 
@@ -483,8 +373,7 @@ export default {
483 373
         background: url(../../assets/imgs/incalling.gif) center center no-repeat;
484 374
       }
485 375
       .callringing {
486
-        background: url(../../assets/imgs/callringing.gif) center center
487
-          no-repeat;
376
+        background: url(../../assets/imgs/callringing.gif) center center no-repeat;
488 377
       }
489 378
 
490 379
       .svg-icon {

+ 5 - 0
CallCenterWeb.UI/src/utils/telWebsocket.js

@@ -295,6 +295,7 @@ function LineStateAgentBack (linedata) {
295 295
   switch (linedata.Result) {
296 296
     case '空闲':
297 297
       store.dispatch('ChangeLineState', 1)
298
+      store.dispatch('ChangeSeatState', 2) // 坐席状态
298 299
       store.dispatch('ChangeCallNum', '') // 顶部电话号码('')
299 300
       store.dispatch('ChangeTrunkNumber', '') // 中继号('')
300 301
       break
@@ -322,6 +323,10 @@ function LineStateAgentBack (linedata) {
322 323
     case '通话保持中':
323 324
       store.dispatch('ChangeLineState', 10)
324 325
       break
326
+    case '小休':
327
+      store.dispatch('ChangeLineState', 1)
328
+      store.dispatch('ChangeSeatState', 5) // 坐席状态
329
+      store.dispatch('ChangeCallNum', '') // 顶部电话号码('')
325 330
   }
326 331
 
327 332
 }

+ 9 - 5
CallCenterWeb.UI/src/views/afterSaleManagement/afterSaleOrderList/edit.vue

@@ -59,21 +59,21 @@
59 59
             <span>{{ stockQuantity.stockOne }}</span>
60 60
           </el-form-item>
61 61
         </el-col>
62
-        <el-col :span="6">
62
+        <!-- <el-col :span="6">
63 63
           <el-form-item label="山西仓可配量">
64 64
             <span>{{ stockQuantity.configurationQuantityOne }}</span>
65 65
           </el-form-item>
66
-        </el-col>
66
+        </el-col> -->
67 67
         <el-col :span="6">
68 68
           <el-form-item label="新乡仓">
69 69
             <span>{{ stockQuantity.stockTwo }}</span>
70 70
           </el-form-item>
71 71
         </el-col>
72
-        <el-col :span="6">
72
+        <!-- <el-col :span="6">
73 73
           <el-form-item label="新乡仓可配量">
74 74
             <span>{{ stockQuantity.configurationQuantityTwo }}</span>
75 75
           </el-form-item>
76
-        </el-col>
76
+        </el-col> -->
77 77
       </el-row>
78 78
       <el-form-item>
79 79
         <el-button type="primary" @click="addCommodity" :disabled="isAddCommodity">添加商品</el-button>
@@ -104,7 +104,6 @@
104 104
           <el-table-column type="selection" width="55"></el-table-column>
105 105
           <el-table-column prop="actname" label="活动名称" align="center"></el-table-column>
106 106
           <el-table-column prop="money" label="优惠金额" align="center"></el-table-column>
107
-          <el-table-column prop="gift" label="赠品" align="center"></el-table-column>
108 107
         </el-table>
109 108
       </el-form-item>
110 109
       <el-row>
@@ -855,6 +854,11 @@ export default {
855 854
       let index = this.commodityTableData.indexOf(val)
856 855
       this.commodityTableData.splice(index, 1)
857 856
       this.getTotalAmountFun()
857
+      if (this.activityAccountData.length > 0 && this.commodityTableData.length > 0) {
858
+        this.getActivityAccountList()
859
+      } else {
860
+        this.activityAccountData = []
861
+      }
858 862
     },
859 863
     activityAccountSelectionChange(selection) {
860 864
       this.ruleForm.UseActList = selection

+ 9 - 5
CallCenterWeb.UI/src/views/callScreen/components/createOrder.vue

@@ -65,21 +65,21 @@
65 65
                 <span>{{ stockQuantity.stockOne }}</span>
66 66
               </el-form-item>
67 67
             </el-col>
68
-            <el-col :span="6">
68
+            <!-- <el-col :span="6">
69 69
               <el-form-item label="山西仓可配量">
70 70
                 <span>{{ stockQuantity.configurationQuantityOne }}</span>
71 71
               </el-form-item>
72
-            </el-col>
72
+            </el-col> -->
73 73
             <el-col :span="6">
74 74
               <el-form-item label="新乡仓">
75 75
                 <span>{{ stockQuantity.stockTwo }}</span>
76 76
               </el-form-item>
77 77
             </el-col>
78
-            <el-col :span="6">
78
+            <!-- <el-col :span="6">
79 79
               <el-form-item label="新乡仓可配量">
80 80
                 <span>{{ stockQuantity.configurationQuantityTwo }}</span>
81 81
               </el-form-item>
82
-            </el-col>
82
+            </el-col> -->
83 83
           </el-row>
84 84
           <el-row>
85 85
             <el-form-item>
@@ -124,7 +124,6 @@
124 124
                   <el-table-column type="selection" width="55" />
125 125
                   <el-table-column prop="actname" label="活动名称" align="center"></el-table-column>
126 126
                   <el-table-column prop="money" label="优惠金额" align="center" />
127
-                  <el-table-column prop="gift" label="赠品" align="center" />
128 127
                 </el-table>
129 128
               </el-form-item>
130 129
             </el-col>
@@ -918,6 +917,11 @@ export default {
918 917
       const index = this.commodityTableData.indexOf(val)
919 918
       this.commodityTableData.splice(index, 1)
920 919
       this.getTotalAmountFun()
920
+      if (this.activityAccountData.length > 0 && this.commodityTableData.length > 0) {
921
+        this.getActivityAccountList()
922
+      } else {
923
+        this.activityAccountData = []
924
+      }
921 925
     },
922 926
     activityAccountSelectionChange(selection) {
923 927
       this.ruleForm.UseActList = selection

+ 11 - 8
CallCenterWeb.UI/src/views/callScreen/index.vue

@@ -56,14 +56,17 @@ export default {
56 56
   mounted() {},
57 57
   methods: {
58 58
     addTab() {
59
-      if (this.editableTabs.some((v) => v.name === this.telCallNum)) return
60
-      const newTabName = this.telCallNum
61
-      this.editableTabs.push({
62
-        title: newTabName,
63
-        name: newTabName,
64
-        // content: newTabName%2 == 0 ? 'test' : 'test2'
65
-      })
66
-      this.editableTabsValue = newTabName
59
+      if (this.editableTabs.some((v) => v.name === this.telCallNum)) {
60
+        this.editableTabsValue = this.telCallNum
61
+      } else {
62
+        const newTabName = this.telCallNum
63
+        this.editableTabs.push({
64
+          title: newTabName,
65
+          name: newTabName,
66
+          // content: newTabName%2 == 0 ? 'test' : 'test2'
67
+        })
68
+        this.editableTabsValue = newTabName
69
+      }
67 70
     },
68 71
     removeTab(targetName) {
69 72
       const tabs = this.editableTabs

+ 2 - 2
CallCenterWeb.UI/src/views/commodityManagement/commodityList/components/addOrEdit.vue

@@ -97,7 +97,7 @@
97 97
           <el-form-item label="是否赠品" prop="IsSale">
98 98
             <el-select v-model="ruleForm.IsSale" placeholder="是否赠品" class="form_select">
99 99
               <el-option label="赠品" value="0"></el-option>
100
-              <el-option label="不是赠品" value="1"></el-option>
100
+              <el-option label="正常" value="1"></el-option>
101 101
             </el-select>
102 102
           </el-form-item>
103 103
         </el-col>
@@ -350,7 +350,6 @@ export default {
350 350
           this.ruleForm.MemberPrice = res.F_MemberPrice //会员价格
351 351
           this.ruleForm.SpecialPrice = res.F_SpecialPrice //特惠价格
352 352
           this.ruleForm.PinyinShort = res.F_PinyinShort //拼音简写
353
-          this.ruleForm.tag = res.F_Tag && res.F_Tag.split(",") //商品标签
354 353
           this.ruleForm.Address = res.F_Address //产地
355 354
           this.ruleForm.Des = res.F_Des //描述
356 355
           this.ruleForm.F_MinimumStock = res.F_MinimumStock //销售不能下单数量
@@ -360,6 +359,7 @@ export default {
360 359
           this.ruleForm.OnSaleEnd = res.F_OnSaleEnd //下架时间
361 360
           this.ruleForm.IsSale = res.F_IsSale + "" //是否赠品
362 361
           this.ruleForm.F_Specifications = res.F_Specifications //商品规格
362
+          this.ruleForm.tag = res.F_Tag == "" ? [] : res.F_Tag.split(",") //商品标签
363 363
         }
364 364
       })
365 365
     },

+ 87 - 0
CallCenterWeb.UI/src/views/commodityManagement/commodityList/components/isSale.vue

@@ -0,0 +1,87 @@
1
+<template>
2
+  <div v-loading="loading">
3
+    <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="100px" class="order_form">
4
+      <el-form-item label="是否赠品" prop="isSale">
5
+        <el-select v-model="ruleForm.isSale" placeholder="请选择是否赠品" class="form_select" clearable>
6
+          <el-option label="赠品" value="0"></el-option>
7
+          <el-option label="正常" value="1"></el-option>
8
+        </el-select>
9
+      </el-form-item>
10
+      <el-form-item>
11
+        <el-button type="primary" @click="submitForm">保存</el-button>
12
+      </el-form-item>
13
+    </el-form>
14
+  </div>
15
+</template>
16
+
17
+<script>
18
+import { updateCommodityIsSale } from "@/api/commodityManagement/commodityList"
19
+
20
+export default {
21
+  name: 'EditLabel',
22
+  props: {
23
+    rowid: {
24
+      type: String,
25
+      default: ''
26
+    },
27
+    layerid: {
28
+      type: String,
29
+      default: ''
30
+    }
31
+  },
32
+  data() {
33
+    return {
34
+      ruleForm: {
35
+        orderids: "",
36
+        isSale: "", //商品标签
37
+      },
38
+      rules: {
39
+        isSale: [{
40
+          required: true,
41
+          trigger: 'change',
42
+          message: '请选择是否赠品',
43
+        }]
44
+      },
45
+      loading: false
46
+    }
47
+  },
48
+  created() {
49
+    if (this.rowid) {
50
+      this.ruleForm.orderids = this.rowid
51
+    }
52
+  },
53
+  methods: {
54
+    submitForm() {
55
+      this.$refs.ruleForm.validate((valid) => {
56
+        if (valid) {
57
+          this.loading = true
58
+          const params = {
59
+            orderids: this.ruleForm.orderids,
60
+            IsSale: this.ruleForm.isSale
61
+          }
62
+          updateCommodityIsSale(params).then(response => {
63
+            this.loading = false
64
+            if (response.state.toLowerCase() === 'success') {
65
+              this.$parent.$layer.close(this.layerid)
66
+              this.$parent.$parent.getList() // 重新加载父级数据
67
+              this.$message.success('修改成功!')
68
+            }
69
+          }).catch(() => {
70
+            this.loading = false
71
+          })
72
+          return
73
+        } else {
74
+          this.$message.error('请输入有效的必填项信息!')
75
+          return false
76
+        }
77
+      })
78
+    },
79
+  }
80
+}
81
+</script>
82
+
83
+<style rel="stylesheet/scss" lang="scss">
84
+.order_form .form_select{
85
+	width: 100%;
86
+}
87
+</style>

+ 27 - 0
CallCenterWeb.UI/src/views/commodityManagement/commodityList/components/searchFilter.vue

@@ -9,11 +9,17 @@
9 9
     <el-select v-model="searchDatas.tag" placeholder="请选择商品标签" class="filter-item form_select" clearable>
10 10
       <el-option v-for="item in commodityLabelLists" :key="item.F_ID" :label="item.F_TagName" :value="item.F_TagName" />
11 11
     </el-select>
12
+    <el-select v-model="searchDatas.IsSale" placeholder="请选择是否赠品" class="filter-item form_select">
13
+      <el-option label="全部" value="-1" />
14
+      <el-option label="赠品" value="0" />
15
+      <el-option label="正常" value="1" />
16
+    </el-select>
12 17
     <el-button type="primary" class="filter-item" icon="el-icon-search" @click="btn_search">搜索</el-button>
13 18
     <el-button v-permission="'HY_add'" type="primary" class="filter-item" icon="el-icon-plus" @click="btn_add">添加</el-button>
14 19
     <el-button v-permission="'HY_change_product_category'" type="primary" class="filter-item" @click="btn_change_product_category">更改商品分类</el-button>
15 20
     <el-button v-permission="'HY_change_shipping_template'" type="primary" class="filter-item" @click="btn_change_shipping_template">更改运费模板</el-button>
16 21
     <el-button v-permission="'HY_batch_label'" type="primary" class="filter-item" @click="btn_batch_label">批量更改标签</el-button>
22
+    <el-button v-permission="'HY_batch_issale'" type="primary" class="filter-item" @click="btn_batch_issale">批量更改是否赠品</el-button>
17 23
     <el-button v-permission="'HY_unified_inventory'" type="primary" class="filter-item" @click="btn_unified_inventory">统一库存</el-button>
18 24
     <el-button v-permission="'HY_bulk_listing'" type="primary" class="filter-item" @click="btn_bulk_listing">批量上架</el-button>
19 25
     <el-button v-permission="'HY_bulk_removal'" type="primary" class="filter-item" @click="btn_bulk_removal">批量下架</el-button>
@@ -34,6 +40,7 @@ import unifiedInventory from "./unifiedInventory"
34 40
 import bulkListing from "./bulkListing"
35 41
 import bulkRemoval from "./bulkRemoval"
36 42
 import importFile from "./importFile"
43
+import isSale from "./isSale"
37 44
 
38 45
 export default {
39 46
   name: "SearchFilter",
@@ -51,6 +58,7 @@ export default {
51 58
           productNumber: "", //商品编码
52 59
           productShortName: "", //商品简码
53 60
           tag: "", //商品标签
61
+          IsSale: "", //
54 62
         }
55 63
       },
56 64
     },
@@ -139,6 +147,25 @@ export default {
139 147
         title: "标签",
140 148
       })
141 149
     },
150
+    btn_batch_issale() {
151
+      if (this.selectedId.length <= 0) {
152
+        this.$message({
153
+          message: '请选择数据',
154
+          type: 'warning'
155
+        });
156
+        return
157
+      }
158
+      const ids = this.selectedId.join(",")
159
+      this.$layer.iframe({
160
+        content: {
161
+          content: isSale,
162
+          parent: this,
163
+          data: { rowid: ids },
164
+        },
165
+        area: ["30%", "30%"],
166
+        title: "是否赠品",
167
+      })
168
+    },
142 169
     btn_unified_inventory() {
143 170
       this.$layer.iframe({
144 171
         content: {

+ 2 - 1
CallCenterWeb.UI/src/views/commodityManagement/commodityList/index.vue

@@ -57,6 +57,7 @@ export default {
57 57
         productNumber: "", //商品编码
58 58
         productShortName: "", //商品副标题
59 59
         tag: "", //商品标签
60
+        IsSale: "-1", //是否赠品
60 61
       },
61 62
       multipleSelection: [], // 选中的数据
62 63
       selectedId: [], //选中的id
@@ -87,7 +88,7 @@ export default {
87 88
           ProductNumber: this.searchDatas.productNumber,
88 89
           ProductShortName: this.searchDatas.productShortName,
89 90
           tag: this.searchDatas.tag,
90
-          issale: -1,
91
+          IsSale: Number(this.searchDatas.IsSale),
91 92
           Stock: 0, //是否显示库存 0-不显示 1-显示
92 93
         }
93 94
         getCommodityList(params).then((response) => {

+ 0 - 1
CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceRhyme/index.vue

@@ -16,7 +16,6 @@
16 16
       <el-button v-permission="'HY_bulk_goback'" type="primary" class="filter-item" @click="btn_bulk_goback">批量退回</el-button>
17 17
       <el-button v-permission="'HY_export'" type="primary" class="filter-item" @click="btn_export">导出</el-button>
18 18
       <el-button v-permission="'HY_import_submit'" type="primary" class="filter-item" @click="btn_import_submit">导入附件提交</el-button>
19
-      <el-button v-permission="'HY_import_submit'" type="primary" class="filter-item" @click="btn_import_submit">导入附件退回</el-button>
20 19
       <el-button v-permission="'HY_import_goback'" type="primary" class="filter-item" @click="btn_import_goback">导入附件退回</el-button>
21 20
     </div>
22 21
     <el-tabs v-model="activeName" type="card" @tab-click="handleTabClick">

+ 13 - 3
CallCenterWeb.UI/src/views/layout/components/Navbar.vue

@@ -3,6 +3,9 @@
3 3
     <teloperation v-if="seatflag" />
4 4
     <!-- <outboundTask v-if="seatflag && telIsLogin" class="navar_item"/> -->
5 5
     <div v-if="seatflag" class="navar_item telState">
6
+      <span class="personalInfoText">登陆账号:{{ usercode }}</span>
7
+      <span class="personalInfoText">姓名:{{ username }}</span>
8
+      <span class="personalInfoText">分机号:{{ extension }}</span>
6 9
       <svg-icon :class="{ state_normal: telTopRightLamp, state_abnormal: !telTopRightLamp }" icon-class="zhuangtai" />
7 10
       {{ telTopRightState }}
8 11
     </div>
@@ -21,8 +24,8 @@
21 24
       </div>
22 25
     </el-popover>
23 26
     <div v-if="seatflag" class="navar_item close">
24
-      <!-- <svg-icon icon-class="el-icon-circle-close-outline" /> -->
25
-      <i class="el-icon-close" @click="logout"></i>
27
+      <span class="" @click="logout">退出</span>
28
+      <!-- <i class="el-icon-close">退出</i> -->
26 29
     </div>
27 30
     <el-dropdown class="avatar-container" trigger="click">
28 31
       <div class="avatar-wrapper">
@@ -68,6 +71,7 @@ export default {
68 71
     ...mapGetters([
69 72
       "usercode", // 工号
70 73
       "extension", // 分机号
74
+      "username", // 姓名
71 75
       "sidebar",
72 76
       "avatar",
73 77
       "seatflag",
@@ -184,6 +188,11 @@ export default {
184 188
       font-size: 16px;
185 189
       vertical-align: -0.17em;
186 190
     }
191
+    .personalInfoText {
192
+      margin-right: 12px;
193
+      font-size: 14px;
194
+      z-index: -1;
195
+    }
187 196
   }
188 197
   .seatState {
189 198
     font-size: 14px;
@@ -206,7 +215,8 @@ export default {
206 215
     width: 60px;
207 216
     right: 60px;
208 217
     cursor: pointer;
209
-    i {
218
+    span {
219
+      font-size: 14px;
210 220
       color: #ffffff;
211 221
     }
212 222
   }

+ 3 - 3
CallCenterWeb.UI/src/views/memberManagement/memberList/components/addOrEdit.vue

@@ -141,7 +141,7 @@
141 141
           </el-form-item>
142 142
         </el-col>
143 143
         <el-col :span="12">
144
-        <!-- <el-form-item label="邮编" prop="F_Postcode">
144
+          <!-- <el-form-item label="邮编" prop="F_Postcode">
145 145
           <el-input v-model="ruleForm.F_Postcode" placeholder="请输入邮编"/>
146 146
         </el-form-item> -->
147 147
         </el-col>
@@ -156,7 +156,7 @@
156 156
           </el-form-item>
157 157
         </el-col>
158 158
         <el-col :span="12">
159
-        <!-- <el-form-item label="会员积分" prop="F_Score" >
159
+          <!-- <el-form-item label="会员积分" prop="F_Score" >
160 160
           <el-input v-model="ruleForm.F_Score" placeholder="请输入会员积分" onkeyup="value=value.replace(/[^\d.]/g,'')" />
161 161
         </el-form-item> -->
162 162
         </el-col>
@@ -469,7 +469,7 @@ export default {
469 469
         this.ruleForm.F_Type = res.F_Label
470 470
         // this.ruleForm.F_Class = res.F_Class
471 471
         this.ruleForm.F_RecommenderID = res.F_RecommenderID + ""
472
-        this.ruleForm.F_Recommender = res.F_Recommender
472
+        this.ruleForm.F_RecommendName = res.F_Recommender
473 473
         this.ruleForm.F_RecommenderTel = res.F_RecommenderTel
474 474
         if (res.F_Mobile) {
475 475
           for (let i = 0; i < res.F_Mobile.split(",").length; i++) {

+ 11 - 5
CallCenterWeb.UI/src/views/memberManagement/memberList/components/addOrder.vue

@@ -65,21 +65,21 @@
65 65
                 <span>{{ stockQuantity.stockOne }}</span>
66 66
               </el-form-item>
67 67
             </el-col>
68
-            <el-col :span="6">
68
+            <!-- <el-col :span="6">
69 69
               <el-form-item label="山西仓可配量">
70 70
                 <span>{{ stockQuantity.configurationQuantityOne }}</span>
71 71
               </el-form-item>
72
-            </el-col>
72
+            </el-col> -->
73 73
             <el-col :span="6">
74 74
               <el-form-item label="新乡仓">
75 75
                 <span>{{ stockQuantity.stockTwo }}</span>
76 76
               </el-form-item>
77 77
             </el-col>
78
-            <el-col :span="6">
78
+            <!-- <el-col :span="6">
79 79
               <el-form-item label="新乡仓可配量">
80 80
                 <span>{{ stockQuantity.configurationQuantityTwo }}</span>
81 81
               </el-form-item>
82
-            </el-col>
82
+            </el-col> -->
83 83
           </el-row>
84 84
           <el-row>
85 85
             <el-form-item>
@@ -124,7 +124,7 @@
124 124
                   <el-table-column type="selection" width="55" />
125 125
                   <el-table-column prop="actname" label="活动名称" align="center"></el-table-column>
126 126
                   <el-table-column prop="money" label="优惠金额" align="center" />
127
-                  <el-table-column prop="gift" label="赠品" align="center" />
127
+                  <!-- <el-table-column prop="gift" label="赠品" align="center" /> -->
128 128
                 </el-table>
129 129
               </el-form-item>
130 130
             </el-col>
@@ -904,9 +904,15 @@ export default {
904 904
     btn_editCommodity() {},
905 905
     // 删除商品
906 906
     btn_deleteCommodity(val) {
907
+      console.log(val)
907 908
       const index = this.commodityTableData.indexOf(val)
908 909
       this.commodityTableData.splice(index, 1)
909 910
       this.getTotalAmountFun()
911
+      if (this.activityAccountData.length > 0 && this.commodityTableData.length > 0) {
912
+        this.getActivityAccountList()
913
+      } else {
914
+        this.activityAccountData = []
915
+      }
910 916
     },
911 917
     activityAccountSelectionChange(selection) {
912 918
       this.ruleForm.UseActList = selection

+ 9 - 5
CallCenterWeb.UI/src/views/orderManagement/orderList/edit.vue

@@ -59,21 +59,21 @@
59 59
             <span>{{ stockQuantity.stockOne }}</span>
60 60
           </el-form-item>
61 61
         </el-col>
62
-        <el-col :span="6">
62
+        <!-- <el-col :span="6">
63 63
           <el-form-item label="山西仓可配量">
64 64
             <span>{{ stockQuantity.configurationQuantityOne }}</span>
65 65
           </el-form-item>
66
-        </el-col>
66
+        </el-col> -->
67 67
         <el-col :span="6">
68 68
           <el-form-item label="新乡仓">
69 69
             <span>{{ stockQuantity.stockTwo }}</span>
70 70
           </el-form-item>
71 71
         </el-col>
72
-        <el-col :span="6">
72
+        <!-- <el-col :span="6">
73 73
           <el-form-item label="新乡仓可配量">
74 74
             <span>{{ stockQuantity.configurationQuantityTwo }}</span>
75 75
           </el-form-item>
76
-        </el-col>
76
+        </el-col> -->
77 77
       </el-row>
78 78
       <el-form-item>
79 79
         <el-button type="primary" @click="addCommodity" :disabled="isAddCommodity">添加商品</el-button>
@@ -104,7 +104,6 @@
104 104
           <el-table-column type="selection" width="55"></el-table-column>
105 105
           <el-table-column prop="actname" label="活动名称" align="center"></el-table-column>
106 106
           <el-table-column prop="money" label="优惠金额" align="center"></el-table-column>
107
-          <el-table-column prop="gift" label="赠品" align="center"></el-table-column>
108 107
         </el-table>
109 108
       </el-form-item>
110 109
       <el-row>
@@ -856,6 +855,11 @@ export default {
856 855
       let index = this.commodityTableData.indexOf(val)
857 856
       this.commodityTableData.splice(index, 1)
858 857
       this.getTotalAmountFun()
858
+      if (this.activityAccountData.length > 0 && this.commodityTableData.length > 0) {
859
+        this.getActivityAccountList()
860
+      } else {
861
+        this.activityAccountData = []
862
+      }
859 863
     },
860 864
     activityAccountSelectionChange(selection) {
861 865
       this.ruleForm.UseActList = selection

+ 91 - 113
CallCenterWeb.UI/src/views/personalInfo/index.vue

@@ -5,32 +5,22 @@
5 5
         <h1 class="title">基本资料</h1>
6 6
         <div class="clearfix">
7 7
           <el-col :md="4">
8
-            <img :src="!avatar ? '/static/img/user.png' : avatar" class="avatar" alt="头像">
8
+            <img :src="!avatar ? '/static/img/user.png' : avatar" class="avatar" alt="头像" />
9 9
             <div>
10 10
               <el-tooltip class="item" effect="dark" content="修改头像" placement="top-start">
11 11
                 <el-button type="text" class="btn_avat" @click="toggleShow">修改头像</el-button>
12 12
               </el-tooltip>
13
-              <avatar-upload
14
-                v-model="uploadAvatar.show"
15
-                :url="uploadUrl"
16
-                :params="uploadAvatar.params"
17
-                :width="200"
18
-                :height="200"
19
-                :no-rotate="false"
20
-                img-format="png"
21
-                :headers = "uploadData.uploadHeader"
22
-                @crop-success="cropSuccess"
23
-                @crop-upload-success="cropUploadSuccess"/>
13
+              <avatar-upload v-model="uploadAvatar.show" :url="uploadUrl" :params="uploadAvatar.params" :width="200" :height="200" :no-rotate="false" img-format="png" :headers="uploadData.uploadHeader" @crop-success="cropSuccess" @crop-upload-success="cropUploadSuccess" />
24 14
             </div>
25 15
           </el-col>
26 16
           <el-col :md="20">
27 17
             <p class="head_con">登录账号:{{ usercode }}</p>
28 18
             <p class="head_con">姓名:{{ username }}</p>
29
-            <p class="head_con">用户角色:{{ rolename }}</p>
19
+            <!-- <p class="head_con">用户角色:{{ rolename }}</p> -->
30 20
             <p v-if="seatflag" class="head_con">分机号:{{ extension }}</p>
31 21
           </el-col>
32 22
         </div>
33
-        <hr class="division">
23
+        <hr class="division" />
34 24
         <ul class="lists">
35 25
           <li class="list_item clearfix">
36 26
             <el-col :md="3">
@@ -46,7 +36,9 @@
46 36
               <label class="item_label">手机号码</label>
47 37
             </el-col>
48 38
             <el-col :md="21">
49
-              <span class="item_span">您已绑定了手机 <b>{{ mobile }}</b></span>
39
+              <span class="item_span"
40
+                >您已绑定了手机 <b>{{ mobile }}</b></span
41
+              >
50 42
               <!-- <el-tooltip class="item" effect="dark" content="暂未处理" placement="top-start">
51 43
                 <el-button type="text" class="btn_tel">修改</el-button>
52 44
               </el-tooltip> -->
@@ -70,47 +62,35 @@
70 62
 </template>
71 63
 
72 64
 <script>
73
-import { updateAvatar } from '@/api/systemSetup/roleSetting/userManage'
74
-import modifyPass from './components/modifyPass'
75
-import avatarUpload from 'vue-image-crop-upload'
76
-import { mapGetters } from 'vuex'
65
+import { updateAvatar } from "@/api/systemSetup/roleSetting/userManage"
66
+import modifyPass from "./components/modifyPass"
67
+import avatarUpload from "vue-image-crop-upload"
68
+import { mapGetters } from "vuex"
77 69
 
78 70
 export default {
79
-  name: 'PersonalInfo',
71
+  name: "PersonalInfo",
80 72
   components: {
81
-    'avatar-upload': avatarUpload
73
+    "avatar-upload": avatarUpload,
82 74
   },
83 75
   data() {
84 76
     return {
85
-      uploadUrl: this.$store.getters.serverConfig.BASE_API + 'Api/Upload',
77
+      uploadUrl: this.$store.getters.serverConfig.BASE_API + "Api/Upload",
86 78
       uploadData: {
87 79
         uploadHeader: {
88
-          Authorization: '',
80
+          Authorization: "",
89 81
         },
90 82
       },
91 83
       uploadAvatar: {
92 84
         show: false,
93 85
         params: {
94
-          uploadtype: 'avatar'
86
+          uploadtype: "avatar",
95 87
         },
96
-        imgDataUrl: '' // 头像剪切后生成的 datebase64格式的url
97
-      }
98
-
88
+        imgDataUrl: "", // 头像剪切后生成的 datebase64格式的url
89
+      },
99 90
     }
100 91
   },
101 92
   computed: {
102
-    ...mapGetters([
103
-      'token',
104
-      'userid',
105
-      'avatar',
106
-      'username',
107
-      'usercode',
108
-      'userRole',
109
-      'seatflag',
110
-      'extension',
111
-      'mobile',
112
-      'rolename',
113
-    ])
93
+    ...mapGetters(["token", "userid", "avatar", "username", "usercode", "userRole", "seatflag", "extension", "mobile", "rolename"]),
114 94
   },
115 95
   created() {
116 96
     this.uploadData.uploadHeader.Authorization = this.token
@@ -125,18 +105,18 @@ export default {
125 105
       // this.uploadAvatar.imgDataUrl = imgDataUrl;
126 106
     },
127 107
     cropUploadSuccess(jsonData, field) {
128
-      console.log("jsonData",jsonData)
129
-      if (jsonData.state.toLowerCase() === 'success') {
108
+      console.log("jsonData", jsonData)
109
+      if (jsonData.state.toLowerCase() === "success") {
130 110
         const avatarData = {
131 111
           usercode: this.usercode,
132 112
           headimg: jsonData.data[0].fileurl, //头像
133 113
           // head_img: jsonData.data[0].head_img, // 头像大图
134 114
           // head_small_img: jsonData.data[0].head_small_img // 头像缩略图
135 115
         }
136
-        updateAvatar(avatarData).then(response => {
137
-          if (response.state.toLowerCase() === 'success') {
116
+        updateAvatar(avatarData).then((response) => {
117
+          if (response.state.toLowerCase() === "success") {
138 118
             // 更新头像
139
-            this.$store.dispatch('SetAvatar', jsonData.data[0].head_img)
119
+            this.$store.dispatch("SetAvatar", jsonData.data[0].head_img)
140 120
             this.$message.success(`恭喜你,用户(${this.usercode}-${this.username})的头像修改成功!`)
141 121
           }
142 122
         })
@@ -148,80 +128,78 @@ export default {
148 128
         content: {
149 129
           content: modifyPass, // 传递的组件对象
150 130
           parent: this, // 当前的vue对象
151
-          data: { 'rowid': editId, 'ispersonal': true }// props
131
+          data: { rowid: editId, ispersonal: true }, // props
152 132
         },
153
-        area: ['40%', '360px'],
154
-        title: '修改密码'
133
+        area: ["40%", "360px"],
134
+        title: "修改密码",
155 135
       })
156
-    }
157
-
158
-  }
136
+    },
137
+  },
159 138
 }
160 139
 </script>
161 140
 
162 141
 <style rel="stylesheet/scss" lang="scss" scoped>
163
-	.personal{
164
-		height: 100%;
165
-		.title {
166
-			font-size: 18px;
167
-			padding-left: 10px;
168
-			border-left: 2px solid #069BFF;
169
-		}
170
-		.avatar{
171
-			width: 110px;
172
-			height: 110px;
173
-			background-color: #0086B3;
174
-			border-radius: 50%;
175
-		}
176
-		.btn_avat{
177
-			margin-left: 30px;
178
-		}
179
-		.head_con{
180
-			font-size: 12px;
181
-			color: #4c4c4c;
182
-			margin: 18px 0;
183
-		}
184
-		.division{
185
-			background-color: #d9e1eb;
186
-			height: 1px;
187
-			border: none;
188
-		}
189
-		.lists{
190
-			margin: 0;
191
-			padding: 0;
192
-			list-style: none;
193
-			.list_item{
194
-				border-bottom: 1px dashed #d9e1eb;
195
-				line-height: 70px;
196
-				.item_label{
197
-					padding-left: 10px;
198
-					font-size: 12px;
199
-					font-weight: bold;
200
-					color: #333333;
201
-				}
202
-				.item_span{
203
-					font-size: 14px;
204
-				}
205
-				.btn_pass{
206
-					margin-left: 70px;
207
-				}
208
-				.btn_tel{
209
-					margin-left: 44px;
210
-				}
211
-				.btn_trans{
212
-					margin-left: 54px;
213
-				}
214
-				.red{
215
-					color: #ff0000;
216
-				}
217
-			}
218
-		}
219
-	}
220
-
221
-	@media only screen and (max-width: 768px) {
222
-		.personal{
223
-			height: auto;
224
-		}
225
-	}
142
+.personal {
143
+  height: 100%;
144
+  .title {
145
+    font-size: 18px;
146
+    padding-left: 10px;
147
+    border-left: 2px solid #069bff;
148
+  }
149
+  .avatar {
150
+    width: 110px;
151
+    height: 110px;
152
+    background-color: #0086b3;
153
+    border-radius: 50%;
154
+  }
155
+  .btn_avat {
156
+    margin-left: 30px;
157
+  }
158
+  .head_con {
159
+    font-size: 12px;
160
+    color: #4c4c4c;
161
+    margin: 18px 0;
162
+  }
163
+  .division {
164
+    background-color: #d9e1eb;
165
+    height: 1px;
166
+    border: none;
167
+  }
168
+  .lists {
169
+    margin: 0;
170
+    padding: 0;
171
+    list-style: none;
172
+    .list_item {
173
+      border-bottom: 1px dashed #d9e1eb;
174
+      line-height: 70px;
175
+      .item_label {
176
+        padding-left: 10px;
177
+        font-size: 12px;
178
+        font-weight: bold;
179
+        color: #333333;
180
+      }
181
+      .item_span {
182
+        font-size: 14px;
183
+      }
184
+      .btn_pass {
185
+        margin-left: 70px;
186
+      }
187
+      .btn_tel {
188
+        margin-left: 44px;
189
+      }
190
+      .btn_trans {
191
+        margin-left: 54px;
192
+      }
193
+      .red {
194
+        color: #ff0000;
195
+      }
196
+    }
197
+  }
198
+}
226 199
 
200
+@media only screen and (max-width: 768px) {
201
+  .personal {
202
+    height: auto;
203
+  }
204
+}
227 205
 </style>

+ 11 - 5
CallCenterWeb.UI/src/views/telCall/seatMonitor/index.vue

@@ -97,8 +97,9 @@
97 97
                         <svg-icon v-show="item.isListen" icon-class="weibiaoti3" class="seat_listen el-icon-view" />
98 98
                       </el-col>
99 99
                     </div>
100
-                    <ul v-show="item.visible && (item.ext_state === '小休' || item.ext_state === '通话中' || item.ext_state === '来电振铃')" class="oparate_btn_lists">
101
-                      <li v-show="item.ext_state === '小休'" class="oparate_btn" @click="oparateSeats(item, 'ForceAgentState')"><svg-icon class="oparate_icon" icon-class="icon-test" />置闲</li>
100
+                    <ul v-show="item.visible && (item.ext_state === '小休' || item.ext_state === '通话中' || item.ext_state === '来电振铃' || item.ext_state === '空闲')" class="oparate_btn_lists">
101
+                      <li v-show="item.ext_state === '小休'" class="oparate_btn" @click="oparateSeats(item, 'ForceAgentState', '2')"><svg-icon class="oparate_icon" icon-class="icon-test" />置闲</li>
102
+                      <li v-show="item.ext_state === '空闲'" class="oparate_btn" @click="oparateSeats(item, 'ForceAgentState', '5')"><svg-icon class="oparate_icon" icon-class="manglu01" />置忙</li>
102 103
                       <li v-show="item.ext_state === '通话中'" class="oparate_btn" @click="oparateSeats(item, 'Listen')"><svg-icon class="oparate_icon" icon-class="erji" />监听</li>
103 104
                       <li v-show="item.ext_state === '来电振铃'" class="oparate_btn" @click="oparateSeats(item, 'Instead')"><svg-icon class="oparate_icon" icon-class="zhuanjie" />代接</li>
104 105
                       <li v-show="item.ext_state === '通话中'" class="oparate_btn oparate_divider" @click="oparateSeats(item, 'Insert')"><svg-icon class="oparate_icon" icon-class="qiangzhixiaxian" />强插</li>
@@ -428,7 +429,7 @@ export default {
428 429
         return
429 430
       }
430 431
       console.log(item.ext_state)
431
-      if (item.ext_state === "小休" || item.ext_state === "通话中" || item.ext_state === "来电振铃") {
432
+      if (item.ext_state === "小休" || item.ext_state === "通话中" || item.ext_state === "来电振铃" || item.ext_state === "空闲") {
432 433
         item.visible = !item.visible
433 434
         this.seatCardLists.forEach((v, i) => {
434 435
           if (item.id !== v.id) {
@@ -441,16 +442,21 @@ export default {
441 442
     },
442 443
 
443 444
     // 置闲 监听 代接 强插 拦截 强拆
444
-    oparateSeats(item, angenttype) {
445
+    oparateSeats(item, angenttype, targetAgentState) {
445 446
       // if (angenttype === 'Instead') {
446 447
       //   item.usercode = '8001'
447 448
       // }
448
-
449
+      if (targetAgentState) {
450
+        const targetAgentState = targetAgentState
451
+      } else {
452
+        const targetAgentState = ""
453
+      }
449 454
       this.scoketDatas = {
450 455
         AgentID: this.usercode,
451 456
         AgentExten: this.extension,
452 457
         Type: angenttype,
453 458
         TargetAgentID: item.usercode, // 目标座席工号
459
+        TargetAgentState: targetAgentState
454 460
       }
455 461
       Send(this.scoketDatas)
456 462
       item.visible = !item.visible