Przeglądaj źródła

阜外预约管理代码提交

miaofuhao 5 lat temu
rodzic
commit
f18ef3fafd
19 zmienionych plików z 4961 dodań i 6 usunięć
  1. 2 2
      fuwaiCallCenterWeb.UI/config/dev.env.js
  2. 2 2
      fuwaiCallCenterWeb.UI/config/sit.env.js
  3. 327 0
      fuwaiCallCenterWeb.UI/src/views/appointment/VisitInformation/addOrEdit.vue
  4. 323 0
      fuwaiCallCenterWeb.UI/src/views/appointment/VisitInformation/detail.vue
  5. 261 0
      fuwaiCallCenterWeb.UI/src/views/appointment/VisitInformation/index.vue
  6. 699 0
      fuwaiCallCenterWeb.UI/src/views/appointment/components/addOrEdit.vue
  7. 136 0
      fuwaiCallCenterWeb.UI/src/views/appointment/components/deal.vue
  8. 506 0
      fuwaiCallCenterWeb.UI/src/views/appointment/components/detail.vue
  9. 147 0
      fuwaiCallCenterWeb.UI/src/views/appointment/components/searchFilter.vue
  10. 158 0
      fuwaiCallCenterWeb.UI/src/views/appointment/components/transfer.vue
  11. 327 0
      fuwaiCallCenterWeb.UI/src/views/appointment/departmentVisits/addOrEdit.vue
  12. 323 0
      fuwaiCallCenterWeb.UI/src/views/appointment/departmentVisits/detail.vue
  13. 261 0
      fuwaiCallCenterWeb.UI/src/views/appointment/departmentVisits/index.vue
  14. 327 0
      fuwaiCallCenterWeb.UI/src/views/appointment/doctorVisits/addOrEdit.vue
  15. 323 0
      fuwaiCallCenterWeb.UI/src/views/appointment/doctorVisits/detail.vue
  16. 261 0
      fuwaiCallCenterWeb.UI/src/views/appointment/doctorVisits/index.vue
  17. 304 0
      fuwaiCallCenterWeb.UI/src/views/appointment/orderCreate/index.1.vue
  18. 272 0
      fuwaiCallCenterWeb.UI/src/views/appointment/orderCreate/index.vue
  19. 2 2
      fuwaiCallCenterWeb.UI/static/config/serverConfig.json

+ 2 - 2
fuwaiCallCenterWeb.UI/config/dev.env.js

@@ -3,10 +3,10 @@
3 3
 module.exports = {
4 4
   NODE_ENV: '"development"',
5 5
   ENV_CONFIG: '"dev"',
6
-  BASE_API: '"http://192.168.5.42:28000/"', // 这里放测试API
6
+  BASE_API: '"http://192.168.5.60:28000/"', // 这里放测试API
7 7
   SOCKET_IP: '"192.168.5.41"', // WebSocket通讯ip
8 8
   SOCKET_PORT: '"28822"', // WebSocket通讯端口
9
-  LineChat_SOCKET_IP: '"192.168.5.42"', // 在线客服WebSocket通讯ip
9
+  LineChat_SOCKET_IP: '"192.168.5.60"', // 在线客服WebSocket通讯ip
10 10
   LineChat_SOCKET_PORT: '"28300"', // 在线客服WebSocket通讯端口
11 11
   PAGESIZES: '[10, 20, 50, 100]', // number[] 表格每页显示个数选择器的选项设置
12 12
   PAGESIZE: '10', // number 表格每页显示条目个数

+ 2 - 2
fuwaiCallCenterWeb.UI/config/sit.env.js

@@ -3,10 +3,10 @@
3 3
 module.exports = {
4 4
   NODE_ENV: '"production"',
5 5
   ENV_CONFIG: '"sit"',
6
-  BASE_API: '"http://192.168.5.42:28000/"', // API地址
6
+  BASE_API: '"http://192.168.5.60:28000/"', // API地址
7 7
   SOCKET_IP: '"192.168.5.41"', // WebSocket通讯ip
8 8
   SOCKET_PORT: '"28822"', // WebSocket通讯端口
9
-  LineChat_SOCKET_IP: '"192.168.5.42"', // 在线客服WebSocket通讯ip
9
+  LineChat_SOCKET_IP: '"192.168.5.60"', // 在线客服WebSocket通讯ip
10 10
   LineChat_SOCKET_PORT: '"28300"', // 在线客服WebSocket通讯端口
11 11
   PAGESIZES: '[10, 20, 50, 100]', // number[] 表格每页显示个数选择器的选项设置
12 12
   PAGESIZE: '10', // number 表格每页显示条目个数

+ 327 - 0
fuwaiCallCenterWeb.UI/src/views/appointment/VisitInformation/addOrEdit.vue

@@ -0,0 +1,327 @@
1
+<template>
2
+  <div v-loading="loading">
3
+    <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="150px" class="order_form">
4
+      <el-form-item label="工单来源" prop="sourceid">
5
+        <el-select v-model="ruleForm.sourceid" class="form_select" filterable clearable placeholder="请选择工单来源">
6
+          <el-option v-for="item in sourceOptions" :key="item.id" :label="item.name" :value="item.id"/>
7
+        </el-select>
8
+      </el-form-item>
9
+      <el-form-item label="工单类型" prop="typeid">
10
+        <el-select v-model="ruleForm.typeid" class="form_select" filterable clearable placeholder="请选择工单类型">
11
+          <el-option v-for="item in typeOptions" :key="item.id" :label="item.name" :value="item.id"/>
12
+        </el-select>
13
+      </el-form-item>
14
+      <el-form-item label="客户姓名" prop="name">
15
+        <el-input v-model="ruleForm.name" placeholder="请输入客户姓名"/>
16
+      </el-form-item>
17
+      <el-form-item label="客户电话" prop="phone">
18
+        <el-input v-model="ruleForm.phone" placeholder="请输入客户电话"/>
19
+      </el-form-item>
20
+      <el-form-item label="性别" prop="sex">
21
+        <el-radio-group v-model="ruleForm.sex">
22
+          <el-radio label="男">男</el-radio>
23
+          <el-radio label="女">女</el-radio>
24
+        </el-radio-group>
25
+      </el-form-item>
26
+      <el-form-item label="所在地" prop="provinceCity">
27
+        <el-cascader
28
+          v-model="provinceCity"
29
+          :options="provinceCityDatas"
30
+          :props="props"
31
+          placeholder="请选择省市"
32
+          class="form_select"
33
+          clearable
34
+          filterable
35
+          change-on-select/>
36
+      </el-form-item>
37
+      <el-form-item label="具体地址" prop="address">
38
+        <el-input v-model="ruleForm.address" placeholder="请输入具体地址"/>
39
+      </el-form-item>
40
+      <el-form-item label="工单内容" prop="content">
41
+        <el-input v-model="ruleForm.content" type="textarea" autosize placeholder="请输入工单内容"/>
42
+      </el-form-item>
43
+      <el-form-item label="附件" prop="files">
44
+        <el-upload
45
+          ref="upload"
46
+          :file-list="uploadData.fileList"
47
+          :action= "uploadData.uploadUrl"
48
+          :data = "uploadData.uploaderFiles"
49
+          :on-success="uploadSuccess"
50
+          :on-error="uploadError"
51
+          :on-remove="uploadRemove"
52
+          class="uploadFiles"
53
+          list-type="picture"
54
+          multiple>
55
+          <el-button size="small" type="primary">点击上传</el-button>
56
+          <!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div> -->
57
+          <!-- <i class="el-icon-plus"></i> -->
58
+        </el-upload>
59
+      </el-form-item>
60
+      <el-form-item>
61
+        <el-button type="primary" @click="submitForm">保存</el-button>
62
+        <el-button @click="resetForm">重置</el-button>
63
+      </el-form-item>
64
+    </el-form>
65
+  </div>
66
+</template>
67
+
68
+<script>
69
+import { getProviceCity, getDictionary } from '@/api/commonAPI'
70
+import { getOrder, addOrder, editOrder } from '@/api/order/orderSearch'
71
+import { validateTel } from '@/utils/validate'
72
+import { delFiles, filterContent } from '@/utils'
73
+
74
+const validateTelRule = (rule, value, callback) => {
75
+  if (!validateTel(value)) {
76
+    callback(new Error('请输入有效的客户电话!'))
77
+  } else {
78
+    callback()
79
+  }
80
+}
81
+
82
+export default {
83
+  name: 'AddOrEdit',
84
+  props: {
85
+    rowid: {
86
+      type: String,
87
+      default: ''
88
+    },
89
+    callid: {
90
+      type: Number,
91
+      default: 0
92
+    },
93
+    layerid: {
94
+      type: String,
95
+      default: ''
96
+    }
97
+  },
98
+  data() {
99
+    return {
100
+      uploadData: {// 文件上传数据
101
+        uploadUrl: this.$store.getters.serverConfig.BASE_API + 'fileserverapi/Api/Upload',
102
+        uploaderFiles: {// 上传文件的参数 //是	string	模块code,如:test
103
+          uploadtype: 'orderFiles'
104
+        },
105
+        fileList: [] // 展示文件的数据
106
+      },
107
+      provinceCity: [], // 省市下拉绑定的值
108
+      provinceCityDatas: [], // 省市下拉数据
109
+      props: { // 自定义省市下拉数据的key值
110
+        value: 'code',
111
+        label: 'name',
112
+        children: 'entityJson'
113
+      },
114
+      sourceOptions: [], // 工单来源下拉数据
115
+      typeOptions: [], // 工单类型下拉数据
116
+      ruleForm: {
117
+        unique_id: '', //		否	string	callid
118
+        ordercode: '',
119
+        sourceid: '', //	否	string	来源id
120
+        typeid: '', //	否	string	类型id
121
+        name: '', //	否	string	姓名
122
+        phone: '', //	是	string	号码
123
+        sex: '男', //	否	string	性别
124
+        province: '', //	否	string	省code
125
+        city: '', //	否	string	市code
126
+        address: '', //	否	string	地址
127
+        // deptid: '', //	否	string	部门id
128
+        content: '', //	是	string	工单内容
129
+        files: [] // 否	list	附件json
130
+      },
131
+      rules: {
132
+        sourceid: [{
133
+          required: true,
134
+          message: '请选择工单来源',
135
+          trigger: 'blur'
136
+        }],
137
+        typeid: [{
138
+          required: true,
139
+          message: '请选择工单类型',
140
+          trigger: 'blur'
141
+        }],
142
+        name: [{
143
+          required: true,
144
+          message: '请输入客户姓名',
145
+          trigger: 'blur'
146
+        }],
147
+        phone: [{
148
+          required: true,
149
+          trigger: 'blur',
150
+          validator: validateTelRule
151
+        }]
152
+      },
153
+      loading: false
154
+    }
155
+  },
156
+  created() {
157
+    if (this.callid) {
158
+      this.ruleForm.unique_id = this.callid
159
+    }
160
+    Promise.all([this.getOrderSource(), this.getOrderType(), this.getProCity()])
161
+      .then(() => {
162
+        if (this.rowid) {
163
+          this.ruleForm.ordercode = this.rowid
164
+          this.getDetail(this.rowid)
165
+        }
166
+      })
167
+  },
168
+  methods: {
169
+    submitForm() {
170
+      this.$refs.ruleForm.validate((valid) => {
171
+        if (valid) {
172
+          this.ruleForm.province = this.provinceCity && this.provinceCity[0]
173
+          this.ruleForm.city = this.provinceCity && this.provinceCity[1]
174
+          this.ruleForm.content = filterContent.delHtmlTag(this.ruleForm.content)// 保存内容时去掉 html 标签
175
+          this.loading = true
176
+          // 添加
177
+          if (!this.rowid) {
178
+            addOrder(this.ruleForm).then(response => {
179
+              this.loading = false
180
+              if (response.state.toLowerCase() === 'success') {
181
+                this.$parent.$layer.close(this.layerid)
182
+                if (this.callid) {
183
+                  this.$parent.getOrderRecord() // 重新加载来电弹屏工单记录
184
+                } else {
185
+                  this.$parent.getList() // 重新加载父级数据
186
+                }
187
+                this.$message.success('恭喜你,工单信息添加成功!')
188
+              }
189
+            }).catch(() => {
190
+              this.loading = false
191
+            })
192
+            return
193
+          }
194
+          // 编辑
195
+          editOrder(this.ruleForm).then(response => {
196
+            this.loading = false
197
+            if (response.state.toLowerCase() === 'success') {
198
+              this.$parent.$layer.close(this.layerid)
199
+              this.$parent.getList() // 重新加载父级数据
200
+              this.$message.success('恭喜你,工单信息编辑成功!')
201
+            }
202
+          }).catch(() => {
203
+            this.loading = false
204
+          })
205
+        } else {
206
+          this.$message.error('请输入有效的必填项信息!')
207
+          return false
208
+        }
209
+      })
210
+    },
211
+    resetForm() {
212
+      if (!this.rowid) {
213
+        if (this.ruleForm.files.length > 0) {
214
+          for (let i = this.ruleForm.files.length - 1; i >= 0; i--) {
215
+            delFiles(this.ruleForm.files[i].filesmallurl, this.ruleForm.files[i].fileurl)
216
+            this.ruleForm.files.splice(i, 1)
217
+          }
218
+        }
219
+        this.$refs.upload.clearFiles()	// 清空已上传的文件列表(该方法不支持在 before-upload 中调用)
220
+      }
221
+      this.provinceCity = []
222
+      this.$refs.ruleForm.resetFields()
223
+    },
224
+    // 详情
225
+    getDetail(rid) {
226
+      getOrder(rid).then(response => {
227
+        if (response.state.toLowerCase() === 'success') {
228
+          const res = response.data.model
229
+          this.ruleForm.sourceid = res.sourceid // 来源
230
+          this.ruleForm.typeid = res.typeid // 类型
231
+          this.ruleForm.name = res.name // 姓名
232
+          this.ruleForm.phone = res.phone // 电话
233
+          this.ruleForm.sex = res.sex // 性别
234
+          this.provinceCity = [res.province, res.city]
235
+          this.ruleForm.address = res.address // 具体地址
236
+          this.ruleForm.content = res.content // 内容
237
+
238
+          // 附件
239
+          if (res.files) {
240
+            for (let i = 0, len = res.files.length; i < len; i++) {
241
+              this.uploadData.fileList.push({
242
+                'name': res.files[i].filename,
243
+                'url': res.files[i].fileurl
244
+              })
245
+            }
246
+            this.ruleForm.files = res.files
247
+          }
248
+        }
249
+      })
250
+    },
251
+    // 获取省市下拉数据
252
+    getProCity() {
253
+      return new Promise(resolve => {
254
+        getProviceCity().then(response => {
255
+          if (response.state.toLowerCase() === 'success') {
256
+            this.provinceCityDatas = response.data
257
+          }
258
+        })
259
+        resolve()
260
+      })
261
+    },
262
+    // 获取工单来源
263
+    getOrderSource() {
264
+      return new Promise(resolve => {
265
+        getDictionary('GDLY').then(response => {
266
+          if (response.state.toLowerCase() === 'success') {
267
+            this.sourceOptions = response.data
268
+          }
269
+        })
270
+        resolve()
271
+      })
272
+    },
273
+    // 获取工单类型
274
+    getOrderType() {
275
+      return new Promise(resolve => {
276
+        getDictionary('GDLX').then(response => {
277
+          if (response.state.toLowerCase() === 'success') {
278
+            this.typeOptions = response.data
279
+          }
280
+        })
281
+        resolve()
282
+      })
283
+    },
284
+    // 文件上传
285
+    uploadSuccess(response, file, fileList) {
286
+      if (response.state.toLowerCase() === 'success') {
287
+        this.ruleForm.files.push(response.data[0])
288
+      } else {
289
+        this.$message.error(response.message)
290
+      }
291
+    },
292
+    uploadRemove(file, fileList) {
293
+      if (this.ruleForm.files.length > 0) {
294
+        for (let i = 0, len = this.ruleForm.files.length; i < len; i++) {
295
+          if (this.ruleForm.files[i].filename === file.name) {
296
+            delFiles(this.ruleForm.files[i].filesmallurl, this.ruleForm.files[i].fileurl)
297
+            this.ruleForm.files.splice(i, 1)
298
+            return
299
+          }
300
+        }
301
+      }
302
+    },
303
+    uploadError(err, file, fileList) {
304
+      // console.log(err)
305
+      this.$message.error(err)
306
+    }
307
+  }
308
+}
309
+</script>
310
+
311
+<style rel="stylesheet/scss" lang="scss">
312
+.order_form .form_select{
313
+	width: 100%;
314
+}
315
+.order_form .uploadFiles .el-upload-list--picture{
316
+	margin-right: -1%;
317
+}
318
+.order_form .el-upload-list--picture li{
319
+	width: 24%;
320
+	margin-right: 1%;
321
+	float: left;
322
+}
323
+</style>
324
+
325
+<style rel="stylesheet/scss" lang="scss" scoped>
326
+
327
+</style>

+ 323 - 0
fuwaiCallCenterWeb.UI/src/views/appointment/VisitInformation/detail.vue

@@ -0,0 +1,323 @@
1
+<template>
2
+  <div class="order_detail">
3
+    <el-row :gutter="20">
4
+      <el-col :md="24" class="order_detail_body">
5
+        <el-card shadow="hover">
6
+          <el-col :md="3">
7
+            <div class="round_img">
8
+              <img :src="avatar" alt="头像">
9
+            </div>
10
+          </el-col>
11
+          <el-col :md="21">
12
+            <h1 class="title"><svg-icon class="title_icon" icon-class="hongqi" />工单编号:{{ ordercode }}</h1>
13
+            <!-- <p class="title_sub"><span class="green">{{ name }}</span> {{ createtime }}</p> -->
14
+            <p class="title_sub"><span class="green">{{ name }}</span> 	河南阜外华中心血管病医院 {{ createtime }}</p>
15
+            <p class="title_sub">催单次数:<span class="red">10</span>次 | 工单状态: <span class="done">已完成</span></p>
16
+          </el-col>
17
+          <el-col :md="24" class="order_detail_content">
18
+            <el-col :md="6" class="order_detail_item">
19
+              客户电话:{{ phone }}
20
+            </el-col>
21
+            <el-col :md="6" class="order_detail_item">
22
+              客户性别:{{ sex }}
23
+            </el-col>
24
+            <el-col :md="6" class="order_detail_item">
25
+              工单来源:{{ sourcename }}
26
+            </el-col>
27
+            <el-col :md="6" class="order_detail_item">
28
+              工单类型:{{ sourcetype }}
29
+            </el-col>
30
+            <el-col :md="6" class="order_detail_item">
31
+              地址:{{ address }}
32
+            </el-col>
33
+            <el-col :md="6" class="order_detail_item">
34
+              创建人:{{ createuser }}
35
+            </el-col>
36
+            <el-col :md="24" class="order_detail_item">
37
+              工单内容:
38
+              <div class="order_content" v-html="content"/>
39
+            </el-col>
40
+            <el-col v-if="fileList.length > 0" :md="24" class="order_detail_item">
41
+              <p>附件:<span class="yellow">(可以下载查看)</span></p>
42
+
43
+              <el-col v-for="(item, index) in fileList" :md="3" :key="index">
44
+                <el-card class="order_file">
45
+                  <span class="img_mask">
46
+                    <a :href="item.fileurl" download="filename" title="点击下载">
47
+                      <i class="el-icon-download"/>
48
+                    </a>
49
+                  </span>
50
+                  <img v-if="item.filesmallurl" :src="item.filesmallurl" :large="item.fileurl" :preview-text="item.filename" preview="0" height="68" width="80%">
51
+                  <i v-else class="el-icon-document file_icon"/>
52
+                  <p :title="item.filename"> {{ item.filename }} </p>
53
+                </el-card>
54
+              </el-col>
55
+
56
+            </el-col>
57
+            <el-col :md="6">
58
+              <i class="el-icon-time"/>
59
+              已持续 <span class="red">20</span> 小时 <span class="red">20</span> 分 <span class="red">20</span> 秒
60
+            </el-col>
61
+            <el-col :md="6" :offset="12">
62
+              <el-button type="primary" size="mini" plain>催单</el-button>
63
+              <el-button type="primary" size="mini" plain>转派</el-button>
64
+              <el-button type="primary" size="mini" plain>完成</el-button>
65
+            </el-col>
66
+          </el-col>
67
+        </el-card>
68
+      </el-col>
69
+
70
+      <el-col :md="12">
71
+        <el-card shadow="hover">
72
+          <div slot="header" class="clearfix">
73
+            <span>工单动态</span>
74
+          </div>
75
+          <div class="order_steps">
76
+            <el-steps :active="0" :space="100" direction="vertical" process-status="success">
77
+              <el-step title="已完成" description="2018-10-23 10:30:20 这是一段很长很长很长的描述性文字"/>
78
+              <el-step title="已转派" description="2018-10-23 10:30:20 这是一段很长很长很长的描述性文字"/>
79
+              <el-step title="已创建" description="2018-10-23 10:30:20 这是一段很长很长很长的描述性文字"/>
80
+            </el-steps>
81
+          </div>
82
+        </el-card>
83
+      </el-col>
84
+      <el-col :md="12">
85
+        <el-card shadow="hover" class="order_record">
86
+          <el-tabs v-model="activeName" @tab-click="handleClick">
87
+            <el-tab-pane label="催单记录(2)" name="first">
88
+              <div class="tab_body">
89
+                催单记录
90
+              </div>
91
+            </el-tab-pane>
92
+            <el-tab-pane label="录音记录(3)" name="second">
93
+              <div class="tab_body">
94
+                录音记录
95
+              </div>
96
+            </el-tab-pane>
97
+          </el-tabs>
98
+        </el-card>
99
+      </el-col>
100
+    </el-row>
101
+  </div>
102
+</template>
103
+
104
+<script>
105
+import { getOrder } from '@/api/order/orderSearch'
106
+import { mapGetters } from 'vuex'
107
+import { filterContent } from '@/utils'
108
+
109
+export default {
110
+  name: 'Detail',
111
+  props: {
112
+    rowid: {
113
+      type: String,
114
+      default: ''
115
+    },
116
+    layerid: {
117
+      type: String,
118
+      default: ''
119
+    }
120
+  },
121
+  data() {
122
+    return {
123
+      activeName: 'first',
124
+      ordercode: '', // 工单编号
125
+      name: '', // 姓名
126
+      phone: '', // 电话
127
+      sex: '', // 性别
128
+      address: '', // 地址
129
+      sourcename: '', // 工单来源
130
+      sourcetype: '', // 工单类型
131
+      content: '', // 工单内容
132
+      createtime: '', // 创建时间
133
+      createuser: '', // 创建人
134
+      fileList: [] // 附件
135
+    }
136
+  },
137
+  computed: {
138
+    ...mapGetters([
139
+      'avatar'
140
+    ])
141
+  },
142
+  created() {
143
+    if (this.rowid) {
144
+      this.getDetail(this.rowid)
145
+    }
146
+  },
147
+  methods: {
148
+    handleClick(tab, event) {
149
+      console.log(tab, event)
150
+    },
151
+    // 详情
152
+    getDetail(rid) {
153
+      getOrder(rid).then(response => {
154
+        if (response.state.toLowerCase() === 'success') {
155
+          const res = response.data.model
156
+          this.ordercode = res.ordercode // 工单编号
157
+          this.name = res.name // 姓名
158
+          this.phone = res.phone // 电话
159
+          this.sex = res.sex // 性别
160
+          res.provincename = res.provincename === null ? '' : res.provincename
161
+          res.cityname = res.cityname === null ? '' : res.cityname
162
+          res.address = res.address === null ? '' : res.address
163
+          this.address = res.provincename + res.cityname + res.address // 地址
164
+          this.sourcename = res.sourcename // 工单来源
165
+          this.sourcetype = res.typename // 工单类型
166
+          this.content = filterContent.content(res.content) // 工单内容
167
+          this.createtime = res.createtime // 创建时间
168
+          this.createuser = res.createuser + '-' + res.createusername // 创建人
169
+          // 附件
170
+          if (res.files) {
171
+            this.fileList = res.files
172
+          }
173
+        }
174
+      })
175
+    }
176
+  }
177
+}
178
+</script>
179
+
180
+<style rel="stylesheet/scss" lang="scss">
181
+	.order_detail{
182
+		.el-col{
183
+			margin-bottom: 20px;
184
+		}
185
+		.el-icon-time{
186
+			color: #d81e06;
187
+		}
188
+		.el-card__header{
189
+			padding-top: 14px;
190
+			padding-bottom: 14px;
191
+			background-color: #F5F5F6;
192
+		}
193
+		.order_file{
194
+			.el-card__body{
195
+				padding: 22px 0 0 0;
196
+				text-align: center;
197
+			}
198
+		}
199
+		.order_steps{
200
+			.el-step__icon-inner{
201
+				display: none;
202
+			}
203
+		}
204
+		.order_record {
205
+			.el-card__body{
206
+				padding: 0;
207
+			}
208
+			.el-tabs__header{
209
+				padding: 0px 20px;
210
+				background-color: #F5F5F6;
211
+					.el-tabs__item{
212
+						font-size: 16px;
213
+						height: 47px;
214
+						line-height: 47px;
215
+					}
216
+			}
217
+		}
218
+	}
219
+</style>
220
+
221
+<style rel="stylesheet/scss" lang="scss" scoped>
222
+	.order_detail{
223
+		.order_detail_body{
224
+			margin-bottom: 20px;
225
+			.round_img{
226
+				width: 90px;
227
+				height: 90px;
228
+				border-radius: 50%;
229
+				overflow: hidden;
230
+				margin: 14px;
231
+				img{
232
+					width: 100%;
233
+					height: 100%;
234
+				}
235
+			}
236
+			.title{
237
+				font-size: 20px;
238
+				.title_icon{
239
+					color: #d81e06;
240
+					font-size: 16px;
241
+					margin-right: 20px;
242
+				}
243
+			}
244
+			.title_sub{
245
+				font-size: 14px;
246
+				color: #666666;
247
+			}
248
+			.order_detail_content{
249
+				background-color: #F5F5F6;
250
+				padding-top: 20px;
251
+				color: #4c4c4c;
252
+				font-size: 14px;
253
+				.order_detail_item{
254
+					margin-bottom: 10px;
255
+					.order_content{
256
+						margin-top: 10px;
257
+					}
258
+					.order_file {
259
+						position: relative;
260
+						cursor: pointer;
261
+						.img_mask {
262
+							display: none;
263
+							position: absolute;
264
+							left: 0px;
265
+							top: 0px;
266
+							background-color: rgba(0, 0, 0, 0.3);
267
+							width: 100%;
268
+							height: 22px;
269
+							text-align: right;
270
+							z-index: 1;
271
+							i {
272
+								font-size: 20px;
273
+								line-height: 22px;
274
+								display: inline-block;
275
+								margin-right: 15px;
276
+								color: #fff;
277
+							}
278
+						}
279
+						p {
280
+							margin-top: 5px;
281
+							padding-left: 14px;
282
+							padding-right: 14px;
283
+							white-space: nowrap;
284
+							overflow: hidden;
285
+							text-overflow: ellipsis;
286
+						}
287
+						.file_icon{
288
+							height: 68px;
289
+							line-height: 68px;
290
+							font-size: 68px;
291
+							color: #409EFF;
292
+						}
293
+					}
294
+					.order_file:hover .img_mask {
295
+						display: block;
296
+					}
297
+				}
298
+			}
299
+		}
300
+		.green {
301
+			color: #00c1de;
302
+		}
303
+		.done {
304
+			color: #198120;
305
+		}
306
+		.red {
307
+			color: #d81e06;
308
+		}
309
+		.yellow{
310
+			color: #e6a23c;
311
+		}
312
+		.order_steps{
313
+			// height: 240px;
314
+			.el-step__icon-inner{
315
+				display: none;
316
+			}
317
+		}
318
+
319
+		.tab_body{
320
+			padding: 0 20px 20px 20px;
321
+		}
322
+	}
323
+</style>

+ 261 - 0
fuwaiCallCenterWeb.UI/src/views/appointment/VisitInformation/index.vue

@@ -0,0 +1,261 @@
1
+<template>
2
+  <div class="app-container">
3
+    <div class="filter-container">
4
+      <el-cascader
5
+        v-model="provinceCity"
6
+        :options="provinceCityDatas"
7
+        :props="props"
8
+        placeholder="请选择省市"
9
+        class="filter-item"
10
+        clearable
11
+        filterable
12
+        change-on-select/>
13
+      <el-select v-model="sc_source" class="filter-item" filterable clearable placeholder="请选择工单来源">
14
+        <el-option
15
+          v-for="item in sourceOptions"
16
+          :key="item.id"
17
+          :label="item.name"
18
+          :value="item.id"/>
19
+      </el-select>
20
+      <el-select v-model="sc_type" class="filter-item" filterable clearable placeholder="请选择工单类型">
21
+        <el-option
22
+          v-for="item in typeOptions"
23
+          :key="item.id"
24
+          :label="item.name"
25
+          :value="item.id"/>
26
+      </el-select>
27
+      <el-date-picker
28
+        v-model="searchDate"
29
+        :picker-options="pickerOptions"
30
+        class="filter-item"
31
+        type="daterange"
32
+        format="yyyy年MM月dd日"
33
+        value-format="yyyy-MM-dd"
34
+        align="left"
35
+        unlink-panels
36
+        range-separator="至"
37
+        start-placeholder="开始日期"
38
+        end-placeholder="结束日期"/>
39
+      <el-input v-model="sc_tel" placeholder="请输入电话号码" class="filter-item"/>
40
+      <el-input v-model="sc_ordercode" placeholder="请输入工单编号" class="filter-item"/>
41
+      <el-button type="primary" class="filter-item" icon="el-icon-search" @click="btn_search">搜索</el-button>
42
+      <el-button v-permission="'HY_add'" type="primary" class="filter-item" icon="el-icon-plus" @click="btn_add">添加</el-button>
43
+    </div>
44
+
45
+    <el-table v-loading="loading" :data="dataLists" border stripe>
46
+      <el-table-column type="index" label="编号" align="center" fixed width="80"/>
47
+      <el-table-column prop="ordercode" label="工单编号" align="center" min-width="140"/>
48
+      <el-table-column prop="sourcename" label="工单来源" align="center" min-width=""/>
49
+      <el-table-column prop="typename" label="工单类型" align="center" min-width=""/>
50
+      <el-table-column prop="provincename" label="所在省" align="center"/>
51
+      <el-table-column prop="cityname" label="所在市" align="center"/>
52
+      <el-table-column prop="address" label="具体地址" align="center"/>
53
+      <el-table-column label="工单内容" align="center">
54
+        <template slot-scope="scope">
55
+          {{ scope.row.content | formatterContent }}
56
+        </template>
57
+      </el-table-column>
58
+      <el-table-column prop="name" label="姓名" align="center"/>
59
+      <el-table-column prop="phone" label="电话" align="center"/>
60
+      <el-table-column prop="sex" label="性别" align="center"/>
61
+      <el-table-column prop="createuser" label="创建人" align="center"/>
62
+      <el-table-column prop="createtime" label="创建时间" align="center" min-width="120"/>
63
+      <el-table-column label="操作" width="220" align="center" class-name="oparate_btn" fixed="right">
64
+        <template slot-scope="scope">
65
+          <el-button v-permission="'HY_detail'" size="mini" plain type="primary" @click="btn_detail(scope.row.ordercode)">详情</el-button>
66
+          <el-button v-permission="'HY_edit'" size="mini" plain type="primary" @click="btn_edit(scope.row.ordercode)">编辑</el-button>
67
+          <el-button v-permission="'HY_delete'" size="mini" plain type="danger" @click="btn_delete(scope.row.id)">删除</el-button>
68
+        </template>
69
+      </el-table-column>
70
+    </el-table>
71
+    <pagination
72
+      v-show="pageParams.total > 0"
73
+      :total="pageParams.total"
74
+      :pageindex.sync="pageParams.pageindex"
75
+      :pagesize.sync="pageParams.pagesize"
76
+      class="pagination"
77
+      @pagination="getList" />
78
+
79
+  </div>
80
+</template>
81
+
82
+<script>
83
+
84
+import { getProviceCity, getDictionary } from '@/api/commonAPI'
85
+import { getOrderLists, deleteOrder } from '@/api/order/orderSearch'
86
+import addOrEdit from './addOrEdit'
87
+import detail from './detail'
88
+import { pickerOptions, formatterContent } from '@/utils'
89
+import Pagination from '@/components/Pagination' // 对el-pagination 二次封装
90
+
91
+export default {
92
+  name: 'OrderSearch',
93
+  components: {
94
+    Pagination
95
+  },
96
+  filters: {
97
+    OrderTextFilter(status) {
98
+      const statusMap = {
99
+        0: '暂时',
100
+        1: '永久',
101
+        2: '已取消'
102
+      }
103
+      return statusMap[status]
104
+    }
105
+  },
106
+  data() {
107
+    return {
108
+      loading: false,
109
+      provinceCity: [], // 省市下拉绑定的值
110
+      provinceCityDatas: [], // 省市下拉数据
111
+      props: {// 自定义省市下拉数据的key值
112
+        value: 'code',
113
+        label: 'name',
114
+        children: 'entityJson'
115
+      },
116
+      sc_source: '', // 工单来源
117
+      sourceOptions: [], // 工单来源下拉数据
118
+      sc_type: '', // 工单类型
119
+      typeOptions: [], // 工单类型下拉数据
120
+      searchDate: '', // 日期
121
+      pickerOptions, // 日期数据
122
+      sc_tel: '', // 电话号码
123
+      sc_ordercode: '', // 工单编号
124
+      pageParams: {
125
+        pageindex: 1, // 当前第几页
126
+        pagesize: Number(this.$store.getters.serverConfig.PAGESIZE), // 每页几条数据
127
+        total: 0 // 总共多少数据
128
+      },
129
+      dataLists: [] // 列表数据
130
+    }
131
+  },
132
+  created() {
133
+    this.getProCity()
134
+    this.getOrderSource()
135
+    this.getOrderType()
136
+    this.getList()
137
+    document.onkeyup = (e) => {
138
+      if (e.keyCode === 13) {
139
+        this.getList()
140
+      }
141
+    }
142
+  },
143
+  methods: {
144
+    getList() {
145
+      this.loading = true
146
+      return new Promise(resolve => {
147
+        const params = {
148
+          pageindex: this.pageParams.pageindex, // int 第几页
149
+          pagesize: this.pageParams.pagesize, // int 每页几条信息
150
+          stime: this.searchDate && this.searchDate[0], // 开始时间
151
+          etime: this.searchDate && this.searchDate[1], // 结束时间
152
+          ordercode: this.sc_ordercode, //	否	string	模糊查询(工单编号)
153
+          phone: this.sc_tel, //	否	string	模糊查询(号码)
154
+          province: this.provinceCity && this.provinceCity[0], //	否	string	省code
155
+          city: this.provinceCity && this.provinceCity[1], //	否	string	市code
156
+          sourceid: this.sc_source, //	否	string	来源id
157
+          typeid: this.sc_type //	否	string	类型id
158
+        }
159
+        getOrderLists(params).then(response => {
160
+          this.loading = false
161
+          if (response.state.toLowerCase() === 'success') {
162
+            this.pageParams.total = response.data.total
163
+            this.dataLists = response.data.rows
164
+          }
165
+        })
166
+        resolve()
167
+      })
168
+    },
169
+    btn_search() {
170
+      this.pageParams.pageindex = 1
171
+      this.getList()
172
+    },
173
+    btn_add() {
174
+      this.$layer.iframe({
175
+        content: {
176
+          content: addOrEdit, // 传递的组件对象
177
+          parent: this, // 当前的vue对象
178
+          data: { 'rowid': '' }// props//该方法会自动添加一个key为layerid的值, 该值为创建层的id, 可以直接使用
179
+        },
180
+        area: ['80%', '90%'],
181
+        title: '添加工单'
182
+      })
183
+    },
184
+    btn_edit(editId) {
185
+      this.$layer.iframe({
186
+        content: {
187
+          content: addOrEdit, // 传递的组件对象
188
+          parent: this, // 当前的vue对象
189
+          data: { 'rowid': editId }// props
190
+        },
191
+        area: ['80%', '90%'],
192
+        title: '编辑工单'
193
+      })
194
+    },
195
+    btn_detail(editId) {
196
+      this.$layer.iframe({
197
+        content: {
198
+          content: detail, // 传递的组件对象
199
+          parent: this, // 当前的vue对象
200
+          data: { 'rowid': editId }// props
201
+        },
202
+        area: ['80%', '90%'],
203
+        title: '工单详情'
204
+      })
205
+    },
206
+    btn_delete(editId) {
207
+      this.$confirm('您确定要将此工单删除吗?', '提示', {
208
+        confirmButtonText: '确定',
209
+        cancelButtonText: '取消',
210
+        type: 'warning'
211
+      }).then(() => {
212
+        deleteOrder(editId).then(response => {
213
+          if (response.state.toLowerCase() === 'success') {
214
+            this.getList()
215
+            this.$message.success('删除成功!')
216
+          }
217
+        })
218
+      }).catch(() => {
219
+        this.$message.info('已取消删除')
220
+      })
221
+    },
222
+    // 获取省市下拉数据
223
+    getProCity() {
224
+      return new Promise(resolve => {
225
+        getProviceCity().then(response => {
226
+          if (response.state.toLowerCase() === 'success') {
227
+            this.provinceCityDatas = response.data
228
+          }
229
+        })
230
+        resolve()
231
+      })
232
+    },
233
+    // 获取工单来源
234
+    getOrderSource() {
235
+      return new Promise(resolve => {
236
+        getDictionary('GDLY').then(response => {
237
+          if (response.state.toLowerCase() === 'success') {
238
+            this.sourceOptions = response.data
239
+          }
240
+        })
241
+        resolve()
242
+      })
243
+    },
244
+    // 获取工单类型
245
+    getOrderType() {
246
+      return new Promise(resolve => {
247
+        getDictionary('GDLX').then(response => {
248
+          if (response.state.toLowerCase() === 'success') {
249
+            this.typeOptions = response.data
250
+          }
251
+        })
252
+        resolve()
253
+      })
254
+    }
255
+  }
256
+}
257
+</script>
258
+
259
+<style rel="stylesheet/scss" lang="scss" scoped>
260
+
261
+</style>

+ 699 - 0
fuwaiCallCenterWeb.UI/src/views/appointment/components/addOrEdit.vue

@@ -0,0 +1,699 @@
1
+<template>
2
+  <div v-loading="loading" class="creat_order">
3
+    <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="100px" class="order_form">
4
+      <el-row :gutter="24" class="clearfix">
5
+        <el-col :lg="24" :xl="24" class="col_item">
6
+          <el-form-item label="工单类型" prop="typeid">
7
+            <el-radio-group v-model="ruleForm.typeid" @change="changeOrderType">
8
+              <el-radio v-for="item in typeOptions" :key="item.id" :label="item.id" border>{{ item.name }}</el-radio>
9
+            </el-radio-group>
10
+          </el-form-item>
11
+        </el-col>
12
+        <el-col v-show="businIs" :lg="12" :xl="12" class="col_item">
13
+          <el-form-item :label="`业务办理`" prop="businesstype">
14
+            <el-select v-model="ruleForm.businesstype" :placeholder="`请选择业务办理`" class="form_select" filterable clearable>
15
+              <el-option v-for="item in busineData" :key="item.name" :label="item.name" :value="item.name"/>
16
+            </el-select>
17
+          </el-form-item>
18
+        </el-col>
19
+        <el-col :lg="12" :xl="12" class="col_item">
20
+          <el-form-item label="客户姓名" prop="name">
21
+            <el-input v-model="ruleForm.name" placeholder="请输入客户姓名"/>
22
+          </el-form-item>
23
+        </el-col>
24
+        <el-col :lg="12" :xl="12" class="col_item">
25
+          <el-form-item label="客户电话" prop="phone">
26
+            <el-input v-model="ruleForm.phone" placeholder="请输入客户电话"/>
27
+          </el-form-item>
28
+        </el-col>
29
+        <el-col :lg="12" :xl="12" class="col_item">
30
+          <el-form-item label="来电电话" prop="callintel">
31
+            <el-input v-model="ruleForm.callintel" placeholder="请输入客户来电电话"/>
32
+          </el-form-item>
33
+        </el-col>
34
+        <div v-show="afterSale">
35
+          <el-col v-if="afterSale" :lg="12" :xl="12" class="col_item">
36
+            <el-form-item label="售后来源" prop="sourceid">
37
+              <el-select v-model="ruleForm.sourceid" class="form_select" filterable clearable placeholder="请选择售后来源">
38
+                <el-option v-for="item in sourceOptions" :key="item.id" :label="item.name" :value="item.id"/>
39
+              </el-select>
40
+            </el-form-item>
41
+          </el-col>
42
+          <el-col :lg="12" :xl="12" class="col_item">
43
+            <el-form-item label="单位名称" prop="company">
44
+              <el-input v-model="ruleForm.company" placeholder="请输入客户单位名称"/>
45
+            </el-form-item>
46
+          </el-col>
47
+          <el-col :lg="12" :xl="12" class="col_item">
48
+            <el-form-item label="项目名称" prop="proid">
49
+              <el-select v-model="ruleForm.proid" class="form_select" filterable clearable placeholder="请选择项目" @change="selectGet">
50
+                <el-option v-for="item in proData" :key="item.id" :label="item.project_name" :value="item.id"/>
51
+              </el-select>
52
+            </el-form-item>
53
+          </el-col>
54
+          <el-col :lg="12" :xl="12" class="col_item">
55
+            <el-form-item label="所在地" prop="provinceCity">
56
+              <el-cascader
57
+                v-model="provinceCity"
58
+                :options="provinceCityDatas"
59
+                :props="props"
60
+                placeholder="请选择省市"
61
+                class="form_select"
62
+                clearable
63
+                filterable
64
+                change-on-select/>
65
+            </el-form-item>
66
+          </el-col>
67
+          <el-col :lg="12" :xl="12" class="col_item">
68
+            <el-form-item label="具体地址" prop="address">
69
+              <el-input v-model="ruleForm.address" placeholder="请输入具体地址"/>
70
+            </el-form-item>
71
+          </el-col>
72
+          <el-col :lg="12" :xl="12" class="col_item">
73
+            <el-form-item label="故障设备" prop="faulty_equipment">
74
+              <el-input v-model="ruleForm.faulty_equipment" placeholder="请输入故障设备"/>
75
+            </el-form-item>
76
+          </el-col>
77
+          <el-col :lg="24" :xl="24" class="col_item">
78
+            <el-form-item label="故障类型">
79
+              <el-row>
80
+                <el-col :lg="11">
81
+                  <el-select v-model="ruleForm.faulty_typeid" class="form_select" filterable clearable placeholder="请选择故障类型" @change="faultSelect">
82
+                    <el-option v-for="item in faultyTypeData" :key="item.id" :label="item.name" :value="item.id"/>
83
+                  </el-select>
84
+                </el-col>
85
+                <el-col :lg="2" class="text_center">——</el-col>
86
+                <el-col :lg="11">
87
+                  <el-select v-model="ruleForm.faulty_type2id" class="form_select" filterable clearable placeholder="请选择二级故障">
88
+                    <el-option v-for="item in faultyTypeData2" :key="item.id" :label="item.name" :value="item.id"/>
89
+                  </el-select>
90
+                </el-col>
91
+              </el-row>
92
+            </el-form-item>
93
+          </el-col>
94
+        </div>
95
+        <el-col v-show="ruleForm.isdesignate === '0'" :lg="12" :xl="8" class="col_item">
96
+          <el-form-item :label="`${deptContent.deptname}部门`" prop="deptid">
97
+            <el-select v-model="ruleForm.deptid" :placeholder="`请选择${deptContent.deptname}部门`" class="form_select" filterable clearable @change="deptChange">
98
+              <el-option v-for="item in deptData" :key="item.id" :label="item.name" :value="item.id"/>
99
+            </el-select>
100
+          </el-form-item>
101
+        </el-col>
102
+        <el-col v-show="ruleForm.isdesignate === '0'" :lg="12" :xl="12">
103
+          <el-form-item label="接收人" prop="touser" >
104
+            <el-select v-model="ruleForm.touser" class="form_select" filterable clearable placeholder="请选择接收人">
105
+              <el-option v-for="item in touserOptions" :key="item.id" :label="`${item.username}(${item.usercode})`" :value="item.usercode"/>
106
+            </el-select>
107
+          </el-form-item>
108
+        </el-col>
109
+        <el-col :lg="24" :xl="24">
110
+          <el-form-item :label="`${deptContent.contentName}内容`" prop="content" >
111
+            <el-input :autosize="{ minRows: 4}" v-model="ruleForm.content" :placeholder="`请输入${deptContent.contentName}内容`" type="textarea"/>
112
+          </el-form-item>
113
+        </el-col>
114
+
115
+        <el-col v-show="afterSale" :lg="24" :xl="24" class="col_item">
116
+          <el-form-item label="处理时效" prop="productive">
117
+            <el-radio-group v-model="ruleForm.productive">
118
+              <el-radio v-for="item in productiveData" :key="item.id" :label="item.id" border>{{ item.name }}</el-radio>
119
+            </el-radio-group>
120
+          </el-form-item>
121
+        </el-col>
122
+        <el-col :xl="24">
123
+          <el-form-item label="工单有效性" prop="iseffective">
124
+            <el-radio-group v-model="ruleForm.iseffective">
125
+              <el-radio label="0">无效</el-radio>
126
+              <el-radio label="1">有效</el-radio>
127
+            </el-radio-group>
128
+          </el-form-item>
129
+        </el-col>
130
+        <el-col :xl="24">
131
+          <el-form-item label="是否指派" prop="isdesignate">
132
+            <el-radio-group v-model="ruleForm.isdesignate">
133
+              <el-radio label="0">是</el-radio>
134
+              <el-radio label="1">否</el-radio>
135
+            </el-radio-group>
136
+          </el-form-item>
137
+        </el-col>
138
+        <el-col :xl="24">
139
+          <el-form-item label="立即处理" prop="dealinstantly">
140
+            <el-radio-group v-model="ruleForm.dealinstantly">
141
+              <el-radio label="0">否</el-radio>
142
+              <el-radio label="1">是</el-radio>
143
+            </el-radio-group>
144
+          </el-form-item>
145
+        </el-col>
146
+        <!-- <el-form-item label="附件" prop="files">
147
+								<el-upload
148
+									ref="upload"
149
+									class="uploadFiles"
150
+									list-type="picture"
151
+									multiple
152
+									:action= uploadData.uploadUrl
153
+									:data = uploadData.uploaderFiles
154
+									:on-success="uploadSuccess"
155
+									:on-error="uploadError"
156
+									:on-remove="uploadRemove">
157
+									<el-button size="small" type="primary">点击上传</el-button>
158
+								</el-upload>
159
+							</el-form-item> -->
160
+        <el-col :lg="24" :xl="24">
161
+          <el-form-item>
162
+            <el-button type="primary" @click="submitForm">保存</el-button>
163
+            <el-button @click="resetForm">重置</el-button>
164
+          </el-form-item>
165
+        </el-col>
166
+      </el-row>
167
+    </el-form>
168
+  </div>
169
+</template>
170
+
171
+<script>
172
+import { getProviceCity, getDictionary, getPro } from '@/api/commonAPI'
173
+import { getOrder, addOrder, editOrder } from '@/api/order/orderSearchHY'
174
+import { getUserSelects } from '@/api/systemSetup/roleSetting/userManage'
175
+import { validateTel } from '@/utils/validate'
176
+import { delFiles, filterContent } from '@/utils'
177
+
178
+const validateTelRule = (rule, value, callback) => {
179
+  if (!validateTel(value)) {
180
+    callback(new Error('请输入有效的客户电话!'))
181
+  } else {
182
+    callback()
183
+  }
184
+}
185
+export default {
186
+  name: 'AddOrEditOrder',
187
+  props: {
188
+    rowid: {
189
+      type: String,
190
+      default: ''
191
+    },
192
+    callid: {
193
+      type: String,
194
+      default: ''
195
+    },
196
+    callinNum: {
197
+      type: String,
198
+      default: ''
199
+    },
200
+    layerid: {
201
+      type: String,
202
+      default: ''
203
+    },
204
+    isCallin: {
205
+      type: Boolean,
206
+      default: false
207
+    }
208
+  },
209
+  data() {
210
+    return {
211
+      uploadData: {
212
+        // 文件上传数据
213
+        uploadUrl:
214
+          this.$store.getters.serverConfig.BASE_API +
215
+          'fileserverapi/Api/Upload',
216
+        uploaderFiles: {
217
+          // 上传文件的参数 //是	string	模块code,如:test
218
+          uploadtype: 'orderFiles'
219
+        }
220
+      },
221
+      consultation: false, // 是否是咨询
222
+      afterSale: false, // 是否是售后
223
+      // iseffective: false,
224
+      // dealinstantly: false,
225
+      complaint: false, // 是否是投诉
226
+      businIs: false,
227
+      provinceCity: [], // 省市下拉绑定的值
228
+      provinceCityDatas: [], // 省市下拉数据
229
+      props: { // 自定义省市下拉数据的key值
230
+        value: 'code',
231
+        label: 'name',
232
+        children: 'entityJson'
233
+      },
234
+      sourceOptions: [], // 售后来源下拉数据
235
+      typeOptions: [], // 工单类型下拉数据
236
+      busineData: [], // 业务办理类型下拉
237
+      touserOptions: [], // 接收人下拉数据
238
+      faultyTypeData: [], // 故障类型下拉数据
239
+      faultyTypeData2: [], // 故障类型2级下拉数据
240
+      productiveData: [], // 处理时效下拉数据
241
+      proData: [], // 项目下拉数据
242
+      deptData: [], // 咨询部门下拉数据
243
+      ruleForm: {
244
+        unique_id: '', // 通话唯一ID
245
+        ordercode: '', //
246
+        typeid: '5bf522f45a10b06b7a35a503', //	否	string	类型id 咨询
247
+        phone: this.callinNum, //	是	string	客户联系电话
248
+        name: '', //	否	string	客户姓名
249
+        callintel: this.callinNum, // 来电电话
250
+        businesstype: '',
251
+        iseffective: '1',
252
+        dealinstantly: '1',
253
+        isdesignate: '1',
254
+        touser: '', // 指派给的坐席工号
255
+        deptid: '', // 咨询部门id
256
+        content: '', //	是	string	故障内容
257
+        sourceid: '', //	否	string	售后来源id
258
+        company: '', // 单位名称
259
+        projectname: '', // 项目名称
260
+        proid: '', // 客户项目id
261
+        province: '', //	否	string	省code
262
+        city: '', //	否	string	市code
263
+        address: '', //	否	string	地址
264
+        faulty_equipment: '', // 故障设备
265
+        faulty_typeid: '', // 故障类型
266
+        faulty_type2id: '', // 故障类型2级
267
+        productive: '' // 处理时效
268
+        // files: [], //否	list	附件json
269
+      },
270
+      rules: {
271
+        sourceid: [
272
+          {
273
+            required: true,
274
+            message: '请选择售后来源',
275
+            trigger: 'blur'
276
+          }
277
+        ],
278
+        typeid: [
279
+          {
280
+            required: true,
281
+            message: '请选择工单类型',
282
+            trigger: 'blur'
283
+          }
284
+        ],
285
+        name: [
286
+          {
287
+            required: true,
288
+            message: '请输入客户姓名',
289
+            trigger: 'blur'
290
+          }
291
+        ],
292
+        phone: [
293
+          {
294
+            required: true,
295
+            trigger: 'blur',
296
+            validator: validateTelRule
297
+          }
298
+        ]
299
+      },
300
+      loading: false
301
+    }
302
+  },
303
+  computed: {
304
+    // 处理部门和内容的名字
305
+    deptContent() {
306
+      const deptCotentName = {
307
+        deptname: '接收',
308
+        contentName: '咨询'
309
+      }
310
+      // 咨询
311
+      if (this.consultation) {
312
+        deptCotentName.deptname = '接收'
313
+        deptCotentName.contentName = '咨询'
314
+      }
315
+      // 售后
316
+      if (this.afterSale) {
317
+        deptCotentName.deptname = '接收'
318
+        deptCotentName.contentName = '故障'
319
+      }
320
+      // 投诉
321
+      if (this.complaint) {
322
+        deptCotentName.deptname = '接收'
323
+        deptCotentName.contentName = '投诉'
324
+      }
325
+      return deptCotentName
326
+    }
327
+  },
328
+  created() {
329
+    if (this.callid) {
330
+      this.ruleForm.unique_id = this.callid
331
+    }
332
+    Promise.all([
333
+      this.getOrderType(), // 获取工单类型
334
+      this.getDeptData(), // 获取部门
335
+      this.getBusineData() // 获取业务类型
336
+    ]).then(() => {
337
+      if (this.rowid) {
338
+        this.ruleForm.ordercode = this.rowid
339
+        this.getDetail(this.rowid)
340
+      }
341
+    })
342
+  },
343
+  methods: {
344
+    submitForm() {
345
+      if (this.consultation || this.complaint) {
346
+        this.resetSale()
347
+      }
348
+      this.$refs.ruleForm.validate(valid => {
349
+        if (valid) {
350
+          this.ruleForm.province = this.provinceCity && this.provinceCity[0]
351
+          this.ruleForm.city = this.provinceCity && this.provinceCity[1]
352
+          this.ruleForm.content = filterContent.delHtmlTag(
353
+            this.ruleForm.content
354
+          ) // 保存内容时去掉 html 标签
355
+          this.loading = true
356
+          if (!this.rowid) {
357
+            addOrder(this.ruleForm)
358
+              .then(response => {
359
+                this.loading = false
360
+                if (response.state.toLowerCase() === 'success') {
361
+                  this.$parent.$layer.close(this.layerid)
362
+                  if (this.callid) {
363
+                    this.$parent.getOrderList() // 重新加载来电弹屏工单记录
364
+                  } else {
365
+                    this.$parent.getList() // 重新加载父级数据
366
+                  }
367
+                  this.$message.success('恭喜你,工单信息添加成功!')
368
+                }
369
+              })
370
+              .catch(() => {
371
+                this.loading = false
372
+              })
373
+            return
374
+          }
375
+          // 编辑
376
+          editOrder(this.ruleForm)
377
+            .then(response => {
378
+              this.loading = false
379
+              if (response.state.toLowerCase() === 'success') {
380
+                this.$parent.$layer.close(this.layerid)
381
+                if (this.isCallin) {
382
+                  this.$parent.getDetails(this.rowid) // 来电弹屏 工单列表详情工单动态
383
+                } else {
384
+                  this.$parent.getList() // 重新加载父级数据
385
+                }
386
+                this.$message.success('恭喜你,工单信息编辑成功!')
387
+              }
388
+            })
389
+            .catch(() => {
390
+              this.loading = false
391
+            })
392
+        } else {
393
+          this.$message.error('请输入有效的必填项信息!')
394
+          return false
395
+        }
396
+      })
397
+    },
398
+    resetForm() {
399
+      // if (this.ruleForm.files.length > 0) {
400
+      //   for (let i = this.ruleForm.files.length - 1; i >= 0; i--) {
401
+      //     delFiles(this.ruleForm.files[i].filesmallurl, this.ruleForm.files[i].fileurl)
402
+      //     this.ruleForm.files.splice(i, 1)
403
+      //   }
404
+      // }
405
+      // this.$refs.upload.clearFiles()	// 清空已上传的文件列表(该方法不支持在 before-upload 中调用)
406
+
407
+      this.provinceCity = []
408
+      this.ruleForm.faulty_typeid = '' // 故障类型
409
+      this.ruleForm.faulty_type2id = '' // 故障类型二级
410
+      this.$refs.ruleForm.resetFields()
411
+      this.consultation = true // 是否是咨询
412
+      this.afterSale = false // 是否是售后
413
+      this.complaint = false // 是否是投诉
414
+    },
415
+    // 当提交时不是售后的时候清空售后中部分字段的内容
416
+    resetSale() {
417
+      this.ruleForm.sourceid = '' //	否	string	售后来源id
418
+      this.ruleForm.company = '' // 单位名称
419
+      this.ruleForm.projectname = '' // 项目名称
420
+      this.ruleForm.proid = '' // 客户项目id
421
+      this.provinceCity = [] // 省code市code
422
+      this.ruleForm.address = '' //	否	string	地址
423
+      this.ruleForm.faulty_equipment = '' // 故障设备
424
+      this.ruleForm.faulty_typeid = '' // 故障类型
425
+      this.ruleForm.faulty_type2id = '' // 故障类型2级
426
+      this.ruleForm.productive = ''// 处理时效
427
+    },
428
+    // 获取详情
429
+    getDetail(rid) {
430
+      getOrder(rid).then(response => {
431
+        if (response.state.toLowerCase() === 'success') {
432
+          const res = response.data.model
433
+          this.ruleForm.typeid = res.typeid // 类型
434
+          this.ruleForm.iseffective === res.iseffective // 工单有效性
435
+          this.ruleForm.dealinstantly === res.dealinstantly // 是否立即处理
436
+          this.ruleForm.name = res.name // 姓名
437
+          this.ruleForm.phone = res.phone // 电话
438
+          this.ruleForm.callintel = res.callintel // 来电电话
439
+          this.ruleForm.deptid = res.deptid // 接收部门id
440
+          this.ruleForm.touser = res.touser // 接收人
441
+          this.ruleForm.content = res.content // 故障内容
442
+          if (res.typeid === '5bf522f45a10b06b7a35a503') { // 咨询
443
+            this.consultation = true // 是否是咨询
444
+          } else if (res.typeid === '5bf523015a10b06b7a35a504') { // 售后
445
+            this.afterSale = true
446
+            this.getOrderSource().then(() => {
447
+              this.ruleForm.sourceid = res.sourceid // 来源
448
+            })
449
+            this.ruleForm.company = res.company // 单位名称
450
+            this.getPros().then(() => {
451
+              this.ruleForm.proid = res.proid // 客户项目id
452
+              this.ruleForm.projectname = res.projectname // 客户项目名称
453
+            })
454
+            this.getProCity().then(() => {
455
+              this.provinceCity = [res.province, res.city] // 所在地
456
+            })
457
+            this.ruleForm.address = res.address // 具体地址
458
+            this.ruleForm.faulty_equipment = res.faulty_equipment // 故障设备
459
+            this.getFaultyType()
460
+              .then(() => {
461
+                this.ruleForm.faulty_typeid = res.faulty_typeid // 故障类型
462
+                const itemObj = this.faultyTypeData.find(item => item.id === res.faulty_typeid)
463
+                this.getFaultyType2(itemObj && itemObj.describe).then(() => {
464
+                  this.ruleForm.faulty_type2id = res.faulty_type2id // 故障类型
465
+                })
466
+              })
467
+            this.getProductive().then(() => {
468
+              this.ruleForm.productive = res.productive // 处理时效
469
+            })
470
+          } else if (res.typeid === '5c47d83fd2bc5f5d5907f296') { // 投诉
471
+            this.complaint = true
472
+          } else if (res.typeid === '5d0c9e21156ef38d2086d941') {
473
+            this.businIs = true // 是否是业务类型
474
+            this.getBusineData().then(() => {
475
+              this.businesstype = res.businesstype// 业务办理
476
+              // alert(this.businesstype)
477
+              this.ruleForm.businesstype = res.businesstype // 客户项目名称
478
+            })
479
+          }
480
+        }
481
+      })
482
+    },
483
+    // 工单类型改变的事件
484
+    changeOrderType(val) {
485
+      switch (val) {
486
+        case '5bf522f45a10b06b7a35a503': // 咨询
487
+          this.consultation = true // 是否是咨询
488
+          this.afterSale = false // 是否是售后
489
+          this.complaint = false // 是否是投诉
490
+          this.businIs = false // 是否是业务类型
491
+          break
492
+        case '5bf523015a10b06b7a35a504':// 售后
493
+          this.consultation = false
494
+          this.afterSale = true
495
+          this.complaint = false
496
+          this.getOrderSource() // 获取工单来源
497
+          this.getPros() // 获取项目下拉
498
+          this.getFaultyType() // 获取故障类型
499
+          this.getProCity() // 获取省市下拉数据
500
+          this.getProductive() // 获取处理时效
501
+          this.businIs = false // 是否是业务类型
502
+          break
503
+        case '5d0c9e21156ef38d2086d941':// 售后
504
+          this.businIs = true // 是否是业务类型
505
+          break
506
+        case '5c47d83fd2bc5f5d5907f296':// 投诉
507
+          this.consultation = false
508
+          this.afterSale = false
509
+          this.complaint = true
510
+          this.businIs = false // 是否是业务类型
511
+          break
512
+        default:
513
+          this.consultation = false
514
+          this.afterSale = false
515
+          this.complaint = false
516
+          this.businIs = false // 是否是业务类型
517
+          break
518
+      }
519
+    },
520
+    // 获取省市下拉数据
521
+    getProCity() {
522
+      return new Promise(resolve => {
523
+        getProviceCity().then(response => {
524
+          if (response.state.toLowerCase() === 'success') {
525
+            this.provinceCityDatas = response.data
526
+          }
527
+        })
528
+        resolve()
529
+      })
530
+    },
531
+    // 获取工单来源
532
+    getOrderSource() {
533
+      return new Promise(resolve => {
534
+        getDictionary('SHLY').then(response => {
535
+          if (response.state.toLowerCase() === 'success') {
536
+            this.sourceOptions = response.data
537
+          }
538
+        })
539
+        resolve()
540
+      })
541
+    },
542
+    // 获取工单类型
543
+    getOrderType() {
544
+      return new Promise(resolve => {
545
+        getDictionary('HYGDLX').then(response => {
546
+          if (response.state.toLowerCase() === 'success') {
547
+            this.typeOptions = response.data
548
+          }
549
+        })
550
+        resolve()
551
+      })
552
+    },
553
+    // 获取接收人
554
+    getUserDatas(code) {
555
+      return new Promise(resolve => {
556
+        getUserSelects(code).then(response => {
557
+          if (response.state.toLowerCase() === 'success') {
558
+            this.touserOptions = response.data
559
+          }
560
+        })
561
+      })
562
+    },
563
+    // 部门改变
564
+    deptChange(vId) {
565
+      this.ruleForm.touser = ''
566
+      if (vId) {
567
+        this.getUserDatas(vId)
568
+      } else {
569
+        this.touserOptions = []
570
+      }
571
+    },
572
+    // 获取故障类型一级数据
573
+    getFaultyType() {
574
+      return new Promise(resolve => {
575
+        getDictionary('HYGZLX').then(response => {
576
+          if (response.state.toLowerCase() === 'success') {
577
+            this.faultyTypeData = response.data
578
+            resolve(response.data)
579
+          }
580
+        })
581
+      })
582
+    },
583
+    // 获取故障类型二级数据
584
+    getFaultyType2(code) {
585
+      return new Promise(resolve => {
586
+        getDictionary(code).then(response => {
587
+          if (response.state.toLowerCase() === 'success') {
588
+            this.faultyTypeData2 = response.data
589
+          }
590
+        })
591
+        resolve()
592
+      })
593
+    },
594
+    faultSelect(vId) {
595
+      this.ruleForm.faulty_type2id = ''
596
+      if (vId) {
597
+        const itemObj = this.faultyTypeData.find(item => item.id === vId)
598
+        this.getFaultyType2(itemObj && itemObj.describe)
599
+      } else {
600
+        this.faultyTypeData2 = []
601
+      }
602
+    },
603
+    // 获取咨询部门数据
604
+    getDeptData() {
605
+      return new Promise(resolve => {
606
+        getDictionary('HYZXBM').then(response => {
607
+          if (response.state.toLowerCase() === 'success') {
608
+            this.deptData = response.data
609
+          }
610
+        })
611
+        resolve()
612
+      })
613
+    },
614
+    // 获取业务办理类型
615
+    getBusineData() {
616
+      return new Promise(resolve => {
617
+        getDictionary('YWBL').then(response => {
618
+          if (response.state.toLowerCase() === 'success') {
619
+            this.busineData = response.data
620
+          }
621
+        })
622
+        resolve()
623
+      })
624
+    },
625
+    // 获取处理时效
626
+    getProductive() {
627
+      return new Promise(resolve => {
628
+        getDictionary('CLSX').then(response => {
629
+          if (response.state.toLowerCase() === 'success') {
630
+            this.productiveData = response.data
631
+          }
632
+        })
633
+        resolve()
634
+      })
635
+    },
636
+    // 获取项目下拉
637
+    getPros() {
638
+      return new Promise(resolve => {
639
+        getPro().then(response => {
640
+          if (response.state.toLowerCase() === 'success') {
641
+            this.proData = response.data.rows
642
+          }
643
+        })
644
+        resolve()
645
+      })
646
+    },
647
+    selectGet(vId) {
648
+      if (vId) {
649
+        const projectName = this.proData.find(item => item.id === vId)
650
+        this.ruleForm.projectname = projectName.project_name
651
+      } else {
652
+        this.ruleForm.projectname = ''
653
+      }
654
+    },
655
+    // 文件上传
656
+    uploadSuccess(response, file, fileList) {
657
+      if (response.state.toLowerCase() === 'success') {
658
+        this.ruleForm.files.push(response.data[0])
659
+      } else {
660
+        this.$message.error(response.message)
661
+      }
662
+    },
663
+    uploadRemove(file, fileList) {
664
+      if (this.ruleForm.files.length > 0) {
665
+        for (let i = 0, len = this.ruleForm.files.length; i < len; i++) {
666
+          if (this.ruleForm.files[i].filename === file.name) {
667
+            delFiles(
668
+              this.ruleForm.files[i].filesmallurl,
669
+              this.ruleForm.files[i].fileurl
670
+            )
671
+            this.ruleForm.files.splice(i, 1)
672
+            return
673
+          }
674
+        }
675
+      }
676
+    },
677
+    uploadError(err, file, fileList) {
678
+      // console.log(err)
679
+      this.$message.error(err)
680
+    }
681
+  }
682
+}
683
+</script>
684
+
685
+<style rel="stylesheet/scss" lang="scss">
686
+	.order_form .form_select{
687
+		width: 100%;
688
+	}
689
+</style>
690
+
691
+<style rel="stylesheet/scss" lang="scss" scoped>
692
+	.creat_order{
693
+		margin-top: 20px;
694
+    // padding-top: 40px;
695
+    .col_item{
696
+			height: 51px;
697
+		}
698
+	}
699
+</style>

+ 136 - 0
fuwaiCallCenterWeb.UI/src/views/appointment/components/deal.vue

@@ -0,0 +1,136 @@
1
+<template>
2
+  <div v-loading="loading" class="dealOrder">
3
+    <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="100px" class="order_form">
4
+      <el-row :gutter="24" class="clearfix">
5
+        <el-col :lg="24" :xl="24">
6
+          <el-form-item label="处理内容" prop="result" >
7
+            <el-input :autosize="{ minRows: 4}" v-model="ruleForm.result" placeholder="请输入处理内容" type="textarea"/>
8
+          </el-form-item>
9
+        </el-col>
10
+        <el-col :lg="24" :xl="24">
11
+          <el-form-item label="增加协助人" prop="helper" >
12
+            <el-select v-model="ruleForm.helper" class="form_select" filterable clearable multiple placeholder="请选择要增加的协助人">
13
+              <el-option v-for="item in helperOptions" :key="item.id" :label="`${item.username}(${item.usercode})`" :value="item.username"/>
14
+            </el-select>
15
+          </el-form-item>
16
+        </el-col>
17
+        <el-col :lg="24" :xl="24">
18
+          <el-form-item label="协助内容" prop="helpcontent" >
19
+            <el-input :autosize="{ minRows: 4}" v-model="ruleForm.helpcontent" placeholder="请输入协助内容" type="textarea"/>
20
+          </el-form-item>
21
+        </el-col>
22
+        <el-col :lg="24" :xl="24">
23
+          <el-form-item>
24
+            <el-button type="primary" @click="submitForm">保存</el-button>
25
+            <el-button @click="resetForm">重置</el-button>
26
+          </el-form-item>
27
+        </el-col>
28
+      </el-row>
29
+    </el-form>
30
+  </div>
31
+</template>
32
+
33
+<script>
34
+import { dealOrderOperate } from '@/api/order/orderSearchHY'
35
+import { getUserSelects } from '@/api/systemSetup/roleSetting/userManage'
36
+import { filterContent } from '@/utils'
37
+
38
+export default {
39
+  name: 'DealOrder',
40
+  props: {
41
+    rowid: {
42
+      type: String,
43
+      default: ''
44
+    },
45
+    layerid: {
46
+      type: String,
47
+      default: ''
48
+    },
49
+    isCallin: {
50
+      type: Boolean,
51
+      default: false
52
+    }
53
+  },
54
+  data() {
55
+    return {
56
+      loading: false,
57
+      helperOptions: [], // 增加协助人下拉数据
58
+      ruleForm: {
59
+        result: '', // 处理内容
60
+        helper: [], // 增加协助人
61
+        helpcontent: ''// 协助内容
62
+      },
63
+      rules: {
64
+        result: [{
65
+          required: true,
66
+          message: '请输入处理内容',
67
+          trigger: 'blur'
68
+        }]
69
+        // helper: [{
70
+        //   required: true,
71
+        //   message: '请选择增加的协助人',
72
+        //   trigger: 'blur'
73
+        // }],
74
+        // helpcontent: [{
75
+        //   required: true,
76
+        //   message: '请输入协助内容',
77
+        //   trigger: 'blur'
78
+        // }]
79
+      }
80
+    }
81
+  },
82
+  created() {
83
+    if (this.rowid) {
84
+      this.getHelpUser()
85
+    }
86
+  },
87
+  methods: {
88
+    submitForm() {
89
+      this.$refs.ruleForm.validate(valid => {
90
+        if (valid) {
91
+          const params = {
92
+            ordercode: this.rowid, // 工单编号
93
+            result: filterContent.delHtmlTag(this.ruleForm.result), // 保存内容时去掉 html 标签
94
+            helpcontent: filterContent.delHtmlTag(this.ruleForm.helpcontent), // 保存内容时去掉 html 标签
95
+            helper: this.ruleForm.helper.join(','),
96
+            dealtype: 2 // 操作,值为0时指派,为1时接单,为2时处理,3为撤回,4为退回
97
+          }
98
+          this.loading = true
99
+          dealOrderOperate(params)
100
+            .then(response => {
101
+              this.loading = false
102
+              if (response.state.toLowerCase() === 'success') {
103
+                this.$parent.$layer.close(this.layerid)
104
+                if (this.isCallin) {
105
+                  this.$parent.getDetails(this.rowid)// 来电弹屏 工单列表详情 工单动态
106
+                } else {
107
+                  this.$parent.getList() // 重新加载父级数据
108
+                }
109
+                this.$message.success('恭喜你,工单处理成功!')
110
+              }
111
+            })
112
+            .catch(() => {
113
+              this.loading = false
114
+            })
115
+        }
116
+      })
117
+    },
118
+    resetForm() {
119
+      this.$refs.ruleForm.resetFields()
120
+    },
121
+    // 获取协助人
122
+    getHelpUser() {
123
+      return new Promise(resolve => {
124
+        getUserSelects().then(response => {
125
+          if (response.state.toLowerCase() === 'success') {
126
+            this.helperOptions = response.data
127
+          }
128
+        })
129
+      })
130
+    }
131
+  }
132
+}
133
+</script>
134
+<style lang="scss" scoped>
135
+</style>
136
+

+ 506 - 0
fuwaiCallCenterWeb.UI/src/views/appointment/components/detail.vue

@@ -0,0 +1,506 @@
1
+<template>
2
+  <div class="order_detail">
3
+    <el-row :gutter="20">
4
+      <el-col :md="24" class="order_detail_body">
5
+        <el-card shadow="hover">
6
+          <el-col :md="24">
7
+            <h1 class="title"><svg-icon class="title_icon" icon-class="hongqi" />工单编号:{{ ordercode }}</h1>
8
+            <p class="title_sub"><span class="green">{{ createuser }}</span> 	河南阜外华中心血管病医院 {{ createtime }}</p>
9
+            <p class="title_sub">
10
+              工单类型:<span class="red">{{ typename }} </span>
11
+              工单状态:
12
+              <el-tag :type="orderState | orderStateTypeFilter" size="mini" disable-transitions>
13
+                {{ orderState | orderStateFilter }}
14
+              </el-tag>
15
+            </p>
16
+          </el-col>
17
+          <el-col :md="24" class="order_detail_content">
18
+            <el-col :md="6" class="order_detail_item">
19
+              客户姓名:{{ name }}
20
+            </el-col>
21
+            <el-col :md="6" class="order_detail_item">
22
+              联系电话:{{ phone }}
23
+            </el-col>
24
+            <el-col :md="6" class="order_detail_item">
25
+              来电电话:{{ callintel }}
26
+            </el-col>
27
+            <el-col :md="6" class="order_detail_item">
28
+              {{ deptContent.deptname }}部门:{{ deptname }}
29
+            </el-col>
30
+
31
+            <template v-if="typeid === '5bf523015a10b06b7a35a504'">
32
+              <el-col :md="6" class="order_detail_item">
33
+                售后来源:{{ sourcename }}
34
+              </el-col>
35
+              <el-col :md="6" class="order_detail_item">
36
+                单位名称:{{ company }}
37
+              </el-col>
38
+              <el-col :md="12" class="order_detail_item">
39
+                项目名称:{{ projectname }}
40
+              </el-col>
41
+              <el-col :md="6" class="order_detail_item">
42
+                时效:{{ productivename }}
43
+              </el-col>
44
+              <el-col :md="12" class="order_detail_item">
45
+                地址:{{ address }}
46
+              </el-col>
47
+              <el-col :md="6" class="order_detail_item">
48
+                故障设备:{{ faulty_equipment }}
49
+              </el-col>
50
+              <el-col :md="12" class="order_detail_item">
51
+                故障类型:{{ faulty_typename }} <span v-if="faulty_typename2"> {{ faulty_typename2 }}</span>
52
+              </el-col>
53
+            </template>
54
+
55
+            <el-col :md="24" class="order_detail_item">
56
+              {{ deptContent.contentName }}内容:
57
+              <div class="order_content" v-html="content"/>
58
+            </el-col>
59
+            <el-col v-if="isCallin" :md="6" :offset="18">
60
+              <!-- 0待指派: 编辑 转派 处理
61
+              2待接单: 接单 退回 撤回
62
+              3待处理: 转派 处理 -->
63
+              <el-button v-if="orderState === 0 && createusercode === usercode" size="mini" plain type="primary" @click="btn_edit(ordercode)">编辑</el-button>
64
+
65
+              <template v-if="orderState === 0 || orderState === 3">
66
+                <el-button size="mini" plain type="primary" @click="btn_transfer(ordercode)">转派</el-button>
67
+                <el-button size="mini" plain type="primary" @click="btn_deal(ordercode)">处理</el-button>
68
+              </template>
69
+
70
+              <template v-if="orderState === 2">
71
+                <el-button size="mini" plain type="primary" @click="btn_receipt(ordercode)">接单</el-button>
72
+                <el-button size="mini" plain type="primary" @click="btn_return(ordercode)">退回</el-button>
73
+                <el-button v-if="zpusercode === usercode" size="mini" plain type="primary" @click="btn_withdraw(ordercode)">撤回</el-button>
74
+              </template>
75
+
76
+            </el-col>
77
+          </el-col>
78
+        </el-card>
79
+      </el-col>
80
+
81
+      <el-col v-if="orderItems.length" :md="24">
82
+        <el-card shadow="hover">
83
+          <div slot="header" class="clearfix">
84
+            <span>工单动态</span>
85
+          </div>
86
+          <div class="order_steps">
87
+            <el-steps :active="0" :space="100" direction="vertical" process-status="success">
88
+              <el-step
89
+                v-for="(activity, index) in orderItems"
90
+                :key="index"
91
+                :description="`${activity.timestamp} ${activity.content}`"
92
+                :title="activity.state | orderStateFilter"/>
93
+            </el-steps>
94
+          </div>
95
+        </el-card>
96
+      </el-col>
97
+    </el-row>
98
+  </div>
99
+</template>
100
+
101
+<script>
102
+import { mapGetters } from 'vuex'
103
+import { filterContent } from '@/utils'
104
+import { orderStateFilter, orderStateTypeFilter } from '@/filters'
105
+import { getOrder, getOrderDynamic, dealOrderOperate } from '@/api/order/orderSearchHY'
106
+import addOrEdit from './addOrEdit'
107
+import dealOrder from './deal'
108
+import transferOrder from './transfer'
109
+
110
+export default {
111
+  name: 'Detail',
112
+  filters: {},
113
+  props: {
114
+    rowid: {
115
+      type: String,
116
+      default: ''
117
+    },
118
+    layerid: {
119
+      type: String,
120
+      default: ''
121
+    },
122
+    callid: {
123
+      type: String,
124
+      default: ''
125
+    },
126
+    isCallin: {
127
+      type: Boolean,
128
+      default: false
129
+    }
130
+  },
131
+  data() {
132
+    return {
133
+      orderState: 0, // 工单状态
134
+      ordercode: '', // 工单编号
135
+      name: '', // 姓名
136
+      phone: '', // 电话
137
+      callintel: '', // 来电电话
138
+      typename: '', // 工单类型
139
+      typeid: '', // 工单类型id
140
+      sourcename: '', // 售后来源
141
+      company: '', // 单位名称
142
+      projectname: '', // 项目名称
143
+      address: '', // 地址
144
+      productivename: '', // 时效
145
+      faulty_equipment: '', // 故障设备
146
+      content: '', // 故障内容
147
+      faulty_typename: '', // 故障类型id(一级
148
+      faulty_typename2: '', // 故障类型(二级
149
+      deptname: '', // 咨询部门
150
+      createtime: '', // 创建时间
151
+      createuser: '', // 创建人
152
+      createusercode: '', // 创建人code
153
+      zpusercode: '', // 指派人
154
+      orderItems: [] // 工单流程
155
+    }
156
+  },
157
+  computed: {
158
+    ...mapGetters([
159
+      'avatar',
160
+      'usercode' // 工号
161
+    ]),
162
+    // 处理部门和内容的名字
163
+    deptContent() {
164
+      const deptCotentName = {
165
+        deptname: '咨询',
166
+        contentName: '咨询'
167
+      }
168
+      switch (this.typeid) {
169
+        case '5bf522f45a10b06b7a35a503': // 咨询
170
+          deptCotentName.deptname = '咨询'
171
+          deptCotentName.contentName = '咨询'
172
+          break
173
+        case '5bf523015a10b06b7a35a504':// 售后
174
+          deptCotentName.deptname = '咨询'
175
+          deptCotentName.contentName = '故障'
176
+          break
177
+        case '5c47d83fd2bc5f5d5907f296':// 投诉
178
+          deptCotentName.deptname = '投诉'
179
+          deptCotentName.contentName = '投诉'
180
+          break
181
+        default:
182
+          deptCotentName.deptname = '咨询'
183
+          deptCotentName.contentName = '咨询'
184
+          break
185
+      }
186
+      return deptCotentName
187
+    }
188
+  },
189
+  created() {
190
+    if (this.rowid) {
191
+      this.getDetails(this.rowid)
192
+    }
193
+  },
194
+  methods: {
195
+    getDetails(code) {
196
+      this.getDetail(code) // 获取详情
197
+      this.getDynamicList(code) // 获取工单动态
198
+    },
199
+    // 详情
200
+    getDetail(rid) {
201
+      getOrder(rid).then(response => {
202
+        if (response.state.toLowerCase() === 'success') {
203
+          const res = response.data.model
204
+          if (res) {
205
+            this.ordercode = res.ordercode // 工单编号
206
+            this.createusercode = res.createuser // 创建人code
207
+            this.createuser = res.createuser + '-' + res.createusername // 创建人
208
+            this.createtime = res.createtime // 创建时间
209
+            this.typename = res.typename// 工单类型
210
+            this.typeid = res.typeid// 工单类型id
211
+            this.orderState = res.state // 工单状态
212
+            this.name = res.name // 姓名
213
+            this.phone = res.phone // 电话
214
+            this.callintel = res.callintel // 电话
215
+            this.deptname = res.deptname // 咨询部门
216
+            this.content = filterContent.content(res.content) // 工单内容
217
+            this.sourcename = res.sourcename// 售后来源
218
+            this.company = res.company// 单位名称
219
+            this.projectname = res.projectname// 项目名称
220
+            this.productivename = res.productivename// 时效
221
+            res.provincename = res.provincename === null ? '' : res.provincename
222
+            res.cityname = res.cityname === null ? '' : res.cityname
223
+            res.address = res.address === null ? '' : res.address
224
+            this.address = res.provincename + res.cityname + res.address // 地址
225
+            this.faulty_equipment = res.faulty_equipment// 故障设备
226
+            res.faulty_typename2 = res.faulty_typename2 === null ? '' : res.faulty_typename2
227
+            this.faulty_typename = res.faulty_typename // 故障类型id(一级
228
+            this.faulty_typename2 = res.faulty_typename2 // 故障类型(二级
229
+            this.zpusercode = res.zpusercode // 指派人
230
+          }
231
+        }
232
+      })
233
+    },
234
+    // 获取工单动态
235
+    getDynamicList(rid) {
236
+      getOrderDynamic(rid).then(response => {
237
+        if (response.state.toLowerCase() === 'success') {
238
+          const resItems = response.data
239
+          if (resItems && resItems.length) {
240
+            this.orderItems = []
241
+            resItems.forEach(element => {
242
+              if (element.detail) {
243
+                this.orderItems.unshift({
244
+                  content: element.detail,
245
+                  timestamp: element.createtime,
246
+                  state: element.state
247
+                })
248
+              }
249
+            })
250
+          }
251
+        }
252
+      })
253
+    },
254
+    // 编辑
255
+    btn_edit(editId) {
256
+      this.$layer.iframe({
257
+        content: {
258
+          content: addOrEdit, // 传递的组件对象
259
+          parent: this, // 当前的vue对象
260
+          data: { 'rowid': editId, 'isCallin': this.isCallin, 'callid': this.callid }// props
261
+        },
262
+        area: ['80%', '90%'],
263
+        title: '编辑工单'
264
+      })
265
+    },
266
+    // 处理
267
+    btn_deal(editId) {
268
+      this.$layer.iframe({
269
+        content: {
270
+          content: dealOrder, // 传递的组件对象
271
+          parent: this, // 当前的vue对象
272
+          data: { 'rowid': editId, 'isCallin': this.isCallin }// props
273
+        },
274
+        area: ['40%', '50%'],
275
+        title: '处理工单'
276
+      })
277
+    },
278
+    // 转派
279
+    btn_transfer(editId) {
280
+      this.$layer.iframe({
281
+        content: {
282
+          content: transferOrder, // 传递的组件对象
283
+          parent: this, // 当前的vue对象
284
+          data: { 'rowid': editId, 'isCallin': this.isCallin } // props
285
+        },
286
+        area: ['40%', '50%'],
287
+        title: '转派工单'
288
+      })
289
+    },
290
+    // 接单
291
+    btn_receipt(editId) {
292
+      this.$confirm('您确定要接单吗?', '提示', {
293
+        confirmButtonText: '确定',
294
+        cancelButtonText: '取消',
295
+        type: 'warning'
296
+      })
297
+        .then(() => {
298
+          const data = {
299
+            ordercode: editId, // 工单编号
300
+            dealtype: 1 // 操作,值为0时指派,为1时接单,为2时处理,3为撤回,4为退回
301
+          }
302
+          dealOrderOperate(data).then(res => {
303
+            if (res.state.toLowerCase() === 'success') {
304
+              this.getDetails(this.rowid)
305
+              this.$message.success('接单操作成功!')
306
+            }
307
+          })
308
+        })
309
+        .catch(() => {
310
+          this.$message.info('已取消接单操作!')
311
+        })
312
+    },
313
+    // 退回
314
+    btn_return(editId) {
315
+      this.$confirm('您确定要将此工单退回吗?', '提示', {
316
+        confirmButtonText: '确定',
317
+        cancelButtonText: '取消',
318
+        type: 'warning'
319
+      })
320
+        .then(() => {
321
+          const data = {
322
+            ordercode: editId, // 工单编号
323
+            dealtype: 4 // 操作,值为0时指派,为1时接单,为2时处理,3为撤回,4为退回
324
+          }
325
+          dealOrderOperate(data).then(res => {
326
+            if (res.state.toLowerCase() === 'success') {
327
+              this.getDetails(this.rowid)
328
+              this.$message.success('退回操作成功!')
329
+            }
330
+          })
331
+        })
332
+        .catch(() => {
333
+          this.$message.info('已取消退回操作!')
334
+        })
335
+    },
336
+    // 撤回
337
+    btn_withdraw(editId) {
338
+      this.$confirm('您确定要将此工单撤回吗?', '提示', {
339
+        confirmButtonText: '确定',
340
+        cancelButtonText: '取消',
341
+        type: 'warning'
342
+      })
343
+        .then(() => {
344
+          const data = {
345
+            ordercode: editId, // 工单编号
346
+            dealtype: 3 // 操作,值为0时指派,为1时接单,为2时处理,3为撤回,4为退回
347
+          }
348
+          dealOrderOperate(data).then(res => {
349
+            if (res.state.toLowerCase() === 'success') {
350
+              this.getDetails(this.rowid)
351
+              this.$message.success('撤回操作成功!')
352
+            }
353
+          })
354
+        })
355
+        .catch(() => {
356
+          this.$message.info('已取消撤回操作!')
357
+        })
358
+    }
359
+  }
360
+}
361
+</script>
362
+
363
+<style rel="stylesheet/scss" lang="scss">
364
+	.order_detail{
365
+		.el-col{
366
+			margin-bottom: 20px;
367
+		}
368
+		.el-icon-time{
369
+			color: #d81e06;
370
+		}
371
+		.el-card__header{
372
+			padding-top: 14px;
373
+			padding-bottom: 14px;
374
+			background-color: #F5F5F6;
375
+		}
376
+		.order_file{
377
+			.el-card__body{
378
+				padding: 22px 0 0 0;
379
+				text-align: center;
380
+			}
381
+		}
382
+		.order_steps{
383
+			.el-step__icon-inner{
384
+				display: none;
385
+			}
386
+		}
387
+		.order_record {
388
+			.el-card__body{
389
+				padding: 0;
390
+			}
391
+			.el-tabs__header{
392
+				padding: 0px 20px;
393
+				background-color: #F5F5F6;
394
+					.el-tabs__item{
395
+						font-size: 16px;
396
+						height: 47px;
397
+						line-height: 47px;
398
+					}
399
+			}
400
+		}
401
+	}
402
+</style>
403
+
404
+<style rel="stylesheet/scss" lang="scss" scoped>
405
+	.order_detail{
406
+		.order_detail_body{
407
+			margin-bottom: 20px;
408
+			.round_img{
409
+				width: 90px;
410
+				height: 90px;
411
+				border-radius: 50%;
412
+				overflow: hidden;
413
+				margin: 14px;
414
+				img{
415
+					width: 100%;
416
+					height: 100%;
417
+				}
418
+			}
419
+			.title{
420
+				font-size: 20px;
421
+				.title_icon{
422
+					color: #d81e06;
423
+					font-size: 16px;
424
+					margin-right: 20px;
425
+				}
426
+			}
427
+			.title_sub{
428
+				font-size: 14px;
429
+				color: #666666;
430
+			}
431
+			.order_detail_content{
432
+				background-color: #F5F5F6;
433
+				padding-top: 20px;
434
+				color: #4c4c4c;
435
+				font-size: 14px;
436
+				.order_detail_item{
437
+					margin-bottom: 10px;
438
+					.order_content{
439
+						margin-top: 10px;
440
+					}
441
+					.order_file {
442
+						position: relative;
443
+						cursor: pointer;
444
+						.img_mask {
445
+							display: none;
446
+							position: absolute;
447
+							left: 0px;
448
+							top: 0px;
449
+							background-color: rgba(0, 0, 0, 0.3);
450
+							width: 100%;
451
+							height: 22px;
452
+							text-align: right;
453
+							z-index: 1;
454
+							i {
455
+								font-size: 20px;
456
+								line-height: 22px;
457
+								display: inline-block;
458
+								margin-right: 15px;
459
+								color: #fff;
460
+							}
461
+						}
462
+						p {
463
+							margin-top: 5px;
464
+							padding-left: 14px;
465
+							padding-right: 14px;
466
+							white-space: nowrap;
467
+							overflow: hidden;
468
+							text-overflow: ellipsis;
469
+						}
470
+						.file_icon{
471
+							height: 68px;
472
+							line-height: 68px;
473
+							font-size: 68px;
474
+							color: #409EFF;
475
+						}
476
+					}
477
+					.order_file:hover .img_mask {
478
+						display: block;
479
+					}
480
+				}
481
+			}
482
+		}
483
+		.green {
484
+			color: #00c1de;
485
+		}
486
+		.done {
487
+			color: #198120;
488
+		}
489
+		.red {
490
+			color: #d81e06;
491
+		}
492
+		.yellow{
493
+			color: #e6a23c;
494
+		}
495
+		.order_steps{
496
+			// height: 240px;
497
+			.el-step__icon-inner{
498
+				display: none;
499
+			}
500
+		}
501
+
502
+		.tab_body{
503
+			padding: 0 20px 20px 20px;
504
+		}
505
+	}
506
+</style>

+ 147 - 0
fuwaiCallCenterWeb.UI/src/views/appointment/components/searchFilter.vue

@@ -0,0 +1,147 @@
1
+<template>
2
+  <div class="filter-container">
3
+    <el-date-picker
4
+      v-model="searchDatas.searchDate"
5
+      :picker-options="pickerOptions"
6
+      class="filter-item"
7
+      type="daterange"
8
+      format="yyyy年MM月dd日"
9
+      value-format="yyyy-MM-dd"
10
+      align="left"
11
+      unlink-panels
12
+      range-separator="至"
13
+      start-placeholder="开始日期"
14
+      end-placeholder="结束日期" />
15
+    <el-select v-model="searchDatas.sc_type" class="filter-item" filterable clearable placeholder="请选择工单类型">
16
+      <el-option v-for="item in typeOptions" :key="item.id" :label="item.name" :value="item.id" />
17
+    </el-select>
18
+    <el-select v-model="searchDatas.sc_deptid" class="filter-item" filterable clearable placeholder="请选择咨询/投诉部门">
19
+      <el-option v-for="item in deptOptions" :key="item.id" :label="item.name" :value="item.id" />
20
+    </el-select>
21
+    <el-cascader
22
+      v-model="searchDatas.provinceCity"
23
+      :options="provinceCityDatas"
24
+      :props="props"
25
+      placeholder="请选择省市"
26
+      class="filter-item"
27
+      clearable
28
+      filterable
29
+      change-on-select />
30
+    <el-input v-model="searchDatas.sc_ordercode" placeholder="请输入工单编号" class="filter-item" />
31
+    <el-input v-model="searchDatas.sc_tel" placeholder="请输入电话号码" class="filter-item" />
32
+    <el-button type="primary" class="filter-item" icon="el-icon-search" @click="btn_search">搜索</el-button>
33
+    <el-button v-permission="'HY_add'" v-if="showadd" type="primary" class="filter-item" icon="el-icon-plus" @click="btn_add">添加</el-button>
34
+    <el-button v-permission="'HY_deletes'" v-if="showdeletes" type="primary" class="filter-item" icon="el-icon-delete" @click="btn_deletes">批量删除</el-button>
35
+    <el-button type="primary" class="filter-item" icon="el-icon-upload2" @click="btn_export()">导出</el-button>
36
+  </div>
37
+</template>
38
+
39
+<script>
40
+import { getProviceCity, getDictionary } from '@/api/commonAPI'
41
+import { pickerOptions } from '@/utils'
42
+import addOrEdit from './addOrEdit'
43
+
44
+export default {
45
+  name: 'SearchFilter',
46
+  props: {
47
+    searchDatas: {
48
+      required: true,
49
+      type: Object,
50
+      default() {
51
+        return {
52
+          provinceCity: [], // 省市下拉绑定的值
53
+          sc_deptid: '', // 咨询/投诉部门
54
+          sc_type: '', // 工单类型
55
+          searchDate: '', // 日期
56
+          sc_tel: '', // 电话号码
57
+          sc_ordercode: '' // 工单编号
58
+        }
59
+      }
60
+    },
61
+    // 是否显示 添加
62
+    showadd: {
63
+      type: Boolean,
64
+      default: false
65
+    },
66
+    // 是否显示 批量删除
67
+    showdeletes: {
68
+      type: Boolean,
69
+      default: true
70
+    }
71
+  },
72
+  data() {
73
+    return {
74
+      provinceCityDatas: [], // 省市下拉数据
75
+      props: {
76
+        // 自定义省市下拉数据的key值
77
+        value: 'code',
78
+        label: 'name',
79
+        children: 'entityJson'
80
+      },
81
+      deptOptions: [], // 咨询/投诉下拉数据
82
+      typeOptions: [], // 工单类型下拉数据
83
+      pickerOptions // 日期数据
84
+    }
85
+  },
86
+  created() {
87
+    this.getProCity()
88
+    this.getOrderType()
89
+    this.getDeptData()// 获取咨询/投诉部门
90
+  },
91
+  methods: {
92
+    btn_search() {
93
+      this.$emit('search', this.searchDatas)
94
+    },
95
+    btn_export() {
96
+      this.$emit('export', this.searchDatas)
97
+    },
98
+    btn_deletes() {
99
+      this.$emit('delorders')
100
+    },
101
+    btn_add() {
102
+      this.$layer.iframe({
103
+        content: {
104
+          content: addOrEdit, // 传递的组件对象
105
+          parent: this, // 当前的vue对象
106
+          data: { rowid: '' } // props//该方法会自动添加一个key为layerid的值, 该值为创建层的id, 可以直接使用
107
+        },
108
+        area: ['80%', '90%'],
109
+        title: '添加工单'
110
+      })
111
+    },
112
+    // 获取省市下拉数据
113
+    getProCity() {
114
+      return new Promise(resolve => {
115
+        getProviceCity().then(response => {
116
+          if (response.state.toLowerCase() === 'success') {
117
+            this.provinceCityDatas = response.data
118
+          }
119
+        })
120
+        resolve()
121
+      })
122
+    },
123
+    // 获取工单类型
124
+    getOrderType() {
125
+      return new Promise(resolve => {
126
+        getDictionary('HYGDLX').then(response => {
127
+          if (response.state.toLowerCase() === 'success') {
128
+            this.typeOptions = response.data
129
+          }
130
+        })
131
+        resolve()
132
+      })
133
+    },
134
+    // 获取咨询/投诉部门
135
+    getDeptData() {
136
+      return new Promise(resolve => {
137
+        getDictionary('HYZXBM').then(response => {
138
+          if (response.state.toLowerCase() === 'success') {
139
+            this.deptOptions = response.data
140
+          }
141
+        })
142
+        resolve()
143
+      })
144
+    }
145
+  }
146
+}
147
+</script>

+ 158 - 0
fuwaiCallCenterWeb.UI/src/views/appointment/components/transfer.vue

@@ -0,0 +1,158 @@
1
+<template>
2
+  <div v-loading="loading" class="transfer">
3
+    <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="100px" class="order_form">
4
+      <el-row :gutter="24" class="clearfix">
5
+        <el-col :lg="24" :xl="24">
6
+          <el-form-item label="接收部门" prop="todept" >
7
+            <el-select v-model="ruleForm.todept" class="form_select" filterable clearable placeholder="请选择接收部门" @change="deptChange">
8
+              <el-option v-for="item in todeptOptions" :key="item.id" :label="item.name" :value="item.id"/>
9
+            </el-select>
10
+          </el-form-item>
11
+        </el-col>
12
+        <el-col :lg="24" :xl="24">
13
+          <el-form-item label="接收人" prop="touser" >
14
+            <el-select v-model="ruleForm.touser" class="form_select" filterable clearable placeholder="请选择接收人">
15
+              <el-option v-for="item in touserOptions" :key="item.id" :label="`${item.username}(${item.usercode})`" :value="item.usercode"/>
16
+            </el-select>
17
+          </el-form-item>
18
+        </el-col>
19
+        <el-col :lg="24" :xl="24">
20
+          <el-form-item label="处理内容" prop="result" >
21
+            <el-input :autosize="{ minRows: 4}" v-model="ruleForm.result" placeholder="请输入处理内容" type="textarea"/>
22
+          </el-form-item>
23
+        </el-col>
24
+        <el-col :lg="24" :xl="24">
25
+          <el-form-item>
26
+            <el-button type="primary" @click="submitForm">保存</el-button>
27
+            <el-button @click="resetForm">重置</el-button>
28
+          </el-form-item>
29
+        </el-col>
30
+      </el-row>
31
+    </el-form>
32
+  </div>
33
+</template>
34
+
35
+<script>
36
+import { dealOrderOperate } from '@/api/order/orderSearchHY'
37
+import { getDictionary } from '@/api/commonAPI'
38
+import { getUserSelects } from '@/api/systemSetup/roleSetting/userManage'
39
+import { filterContent } from '@/utils'
40
+
41
+export default {
42
+  name: 'TransferOrder',
43
+  props: {
44
+    rowid: {
45
+      type: String,
46
+      default: ''
47
+    },
48
+    layerid: {
49
+      type: String,
50
+      default: ''
51
+    },
52
+    isCallin: {
53
+      type: Boolean,
54
+      default: false
55
+    }
56
+  },
57
+  data() {
58
+    return {
59
+      loading: false,
60
+      todeptOptions: [], // 接收部门下拉数据
61
+      touserOptions: [], // 接收人下拉数据
62
+      ruleForm: {
63
+        ordercode: '', // 工单编号
64
+        todept: '', // 指派给部门
65
+        touser: '', // 指派给的坐席工号
66
+        result: '', // 处理结果
67
+        dealtype: 0 // 操作,值为0时指派,为1时接单,为2时处理,3为撤回,4为退回
68
+      },
69
+      rules: {
70
+        todept: [{
71
+          required: true,
72
+          message: '请选择接收部门',
73
+          trigger: 'blur'
74
+        }],
75
+        touser: [{
76
+          required: true,
77
+          message: '请选择接收人',
78
+          trigger: 'blur'
79
+        }],
80
+        result: [{
81
+          required: true,
82
+          message: '请输入处理内容',
83
+          trigger: 'blur'
84
+        }]
85
+      }
86
+    }
87
+  },
88
+  created() {
89
+    if (this.rowid) {
90
+      this.ruleForm.ordercode = this.rowid
91
+      this.getDeptDatas()
92
+      this.getUserDatas()
93
+    }
94
+  },
95
+  methods: {
96
+    submitForm() {
97
+      this.$refs.ruleForm.validate(valid => {
98
+        if (valid) {
99
+          this.ruleForm.result = filterContent.delHtmlTag(this.ruleForm.result)
100
+          this.loading = true
101
+          dealOrderOperate(this.ruleForm)
102
+            .then(response => {
103
+              this.loading = false
104
+              if (response.state.toLowerCase() === 'success') {
105
+                this.$parent.$layer.close(this.layerid)
106
+                if (this.isCallin) {
107
+                  this.$parent.getDetails(this.rowid)// 来电弹屏 工单列表详情 工单动态
108
+                } else {
109
+                  this.$parent.getList() // 重新加载父级数据
110
+                }
111
+                this.$message.success('恭喜你,工单转派成功!')
112
+              }
113
+            })
114
+            .catch(() => {
115
+              this.loading = false
116
+            })
117
+        }
118
+      })
119
+    },
120
+    resetForm() {
121
+      this.$refs.ruleForm.resetFields()
122
+    },
123
+    // 获取部门
124
+    getDeptDatas() {
125
+      return new Promise(resolve => {
126
+        getDictionary('HYZXBM').then(response => {
127
+          if (response.state.toLowerCase() === 'success') {
128
+            this.todeptOptions = response.data
129
+          }
130
+        })
131
+        resolve()
132
+      })
133
+    },
134
+    // 获取接收人
135
+    getUserDatas(code) {
136
+      return new Promise(resolve => {
137
+        getUserSelects(code).then(response => {
138
+          if (response.state.toLowerCase() === 'success') {
139
+            this.touserOptions = response.data
140
+          }
141
+        })
142
+      })
143
+    },
144
+    // 部门改变
145
+    deptChange(vId) {
146
+      this.ruleForm.touser = ''
147
+      if (vId) {
148
+        this.getUserDatas(vId)
149
+      } else {
150
+        this.touserOptions = []
151
+      }
152
+    }
153
+  }
154
+}
155
+</script>
156
+<style lang="scss" scoped>
157
+</style>
158
+

+ 327 - 0
fuwaiCallCenterWeb.UI/src/views/appointment/departmentVisits/addOrEdit.vue

@@ -0,0 +1,327 @@
1
+<template>
2
+  <div v-loading="loading">
3
+    <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="150px" class="order_form">
4
+      <el-form-item label="工单来源" prop="sourceid">
5
+        <el-select v-model="ruleForm.sourceid" class="form_select" filterable clearable placeholder="请选择工单来源">
6
+          <el-option v-for="item in sourceOptions" :key="item.id" :label="item.name" :value="item.id"/>
7
+        </el-select>
8
+      </el-form-item>
9
+      <el-form-item label="工单类型" prop="typeid">
10
+        <el-select v-model="ruleForm.typeid" class="form_select" filterable clearable placeholder="请选择工单类型">
11
+          <el-option v-for="item in typeOptions" :key="item.id" :label="item.name" :value="item.id"/>
12
+        </el-select>
13
+      </el-form-item>
14
+      <el-form-item label="客户姓名" prop="name">
15
+        <el-input v-model="ruleForm.name" placeholder="请输入客户姓名"/>
16
+      </el-form-item>
17
+      <el-form-item label="客户电话" prop="phone">
18
+        <el-input v-model="ruleForm.phone" placeholder="请输入客户电话"/>
19
+      </el-form-item>
20
+      <el-form-item label="性别" prop="sex">
21
+        <el-radio-group v-model="ruleForm.sex">
22
+          <el-radio label="男">男</el-radio>
23
+          <el-radio label="女">女</el-radio>
24
+        </el-radio-group>
25
+      </el-form-item>
26
+      <el-form-item label="所在地" prop="provinceCity">
27
+        <el-cascader
28
+          v-model="provinceCity"
29
+          :options="provinceCityDatas"
30
+          :props="props"
31
+          placeholder="请选择省市"
32
+          class="form_select"
33
+          clearable
34
+          filterable
35
+          change-on-select/>
36
+      </el-form-item>
37
+      <el-form-item label="具体地址" prop="address">
38
+        <el-input v-model="ruleForm.address" placeholder="请输入具体地址"/>
39
+      </el-form-item>
40
+      <el-form-item label="工单内容" prop="content">
41
+        <el-input v-model="ruleForm.content" type="textarea" autosize placeholder="请输入工单内容"/>
42
+      </el-form-item>
43
+      <el-form-item label="附件" prop="files">
44
+        <el-upload
45
+          ref="upload"
46
+          :file-list="uploadData.fileList"
47
+          :action= "uploadData.uploadUrl"
48
+          :data = "uploadData.uploaderFiles"
49
+          :on-success="uploadSuccess"
50
+          :on-error="uploadError"
51
+          :on-remove="uploadRemove"
52
+          class="uploadFiles"
53
+          list-type="picture"
54
+          multiple>
55
+          <el-button size="small" type="primary">点击上传</el-button>
56
+          <!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div> -->
57
+          <!-- <i class="el-icon-plus"></i> -->
58
+        </el-upload>
59
+      </el-form-item>
60
+      <el-form-item>
61
+        <el-button type="primary" @click="submitForm">保存</el-button>
62
+        <el-button @click="resetForm">重置</el-button>
63
+      </el-form-item>
64
+    </el-form>
65
+  </div>
66
+</template>
67
+
68
+<script>
69
+import { getProviceCity, getDictionary } from '@/api/commonAPI'
70
+import { getOrder, addOrder, editOrder } from '@/api/order/orderSearch'
71
+import { validateTel } from '@/utils/validate'
72
+import { delFiles, filterContent } from '@/utils'
73
+
74
+const validateTelRule = (rule, value, callback) => {
75
+  if (!validateTel(value)) {
76
+    callback(new Error('请输入有效的客户电话!'))
77
+  } else {
78
+    callback()
79
+  }
80
+}
81
+
82
+export default {
83
+  name: 'AddOrEdit',
84
+  props: {
85
+    rowid: {
86
+      type: String,
87
+      default: ''
88
+    },
89
+    callid: {
90
+      type: Number,
91
+      default: 0
92
+    },
93
+    layerid: {
94
+      type: String,
95
+      default: ''
96
+    }
97
+  },
98
+  data() {
99
+    return {
100
+      uploadData: {// 文件上传数据
101
+        uploadUrl: this.$store.getters.serverConfig.BASE_API + 'fileserverapi/Api/Upload',
102
+        uploaderFiles: {// 上传文件的参数 //是	string	模块code,如:test
103
+          uploadtype: 'orderFiles'
104
+        },
105
+        fileList: [] // 展示文件的数据
106
+      },
107
+      provinceCity: [], // 省市下拉绑定的值
108
+      provinceCityDatas: [], // 省市下拉数据
109
+      props: { // 自定义省市下拉数据的key值
110
+        value: 'code',
111
+        label: 'name',
112
+        children: 'entityJson'
113
+      },
114
+      sourceOptions: [], // 工单来源下拉数据
115
+      typeOptions: [], // 工单类型下拉数据
116
+      ruleForm: {
117
+        unique_id: '', //		否	string	callid
118
+        ordercode: '',
119
+        sourceid: '', //	否	string	来源id
120
+        typeid: '', //	否	string	类型id
121
+        name: '', //	否	string	姓名
122
+        phone: '', //	是	string	号码
123
+        sex: '男', //	否	string	性别
124
+        province: '', //	否	string	省code
125
+        city: '', //	否	string	市code
126
+        address: '', //	否	string	地址
127
+        // deptid: '', //	否	string	部门id
128
+        content: '', //	是	string	工单内容
129
+        files: [] // 否	list	附件json
130
+      },
131
+      rules: {
132
+        sourceid: [{
133
+          required: true,
134
+          message: '请选择工单来源',
135
+          trigger: 'blur'
136
+        }],
137
+        typeid: [{
138
+          required: true,
139
+          message: '请选择工单类型',
140
+          trigger: 'blur'
141
+        }],
142
+        name: [{
143
+          required: true,
144
+          message: '请输入客户姓名',
145
+          trigger: 'blur'
146
+        }],
147
+        phone: [{
148
+          required: true,
149
+          trigger: 'blur',
150
+          validator: validateTelRule
151
+        }]
152
+      },
153
+      loading: false
154
+    }
155
+  },
156
+  created() {
157
+    if (this.callid) {
158
+      this.ruleForm.unique_id = this.callid
159
+    }
160
+    Promise.all([this.getOrderSource(), this.getOrderType(), this.getProCity()])
161
+      .then(() => {
162
+        if (this.rowid) {
163
+          this.ruleForm.ordercode = this.rowid
164
+          this.getDetail(this.rowid)
165
+        }
166
+      })
167
+  },
168
+  methods: {
169
+    submitForm() {
170
+      this.$refs.ruleForm.validate((valid) => {
171
+        if (valid) {
172
+          this.ruleForm.province = this.provinceCity && this.provinceCity[0]
173
+          this.ruleForm.city = this.provinceCity && this.provinceCity[1]
174
+          this.ruleForm.content = filterContent.delHtmlTag(this.ruleForm.content)// 保存内容时去掉 html 标签
175
+          this.loading = true
176
+          // 添加
177
+          if (!this.rowid) {
178
+            addOrder(this.ruleForm).then(response => {
179
+              this.loading = false
180
+              if (response.state.toLowerCase() === 'success') {
181
+                this.$parent.$layer.close(this.layerid)
182
+                if (this.callid) {
183
+                  this.$parent.getOrderRecord() // 重新加载来电弹屏工单记录
184
+                } else {
185
+                  this.$parent.getList() // 重新加载父级数据
186
+                }
187
+                this.$message.success('恭喜你,工单信息添加成功!')
188
+              }
189
+            }).catch(() => {
190
+              this.loading = false
191
+            })
192
+            return
193
+          }
194
+          // 编辑
195
+          editOrder(this.ruleForm).then(response => {
196
+            this.loading = false
197
+            if (response.state.toLowerCase() === 'success') {
198
+              this.$parent.$layer.close(this.layerid)
199
+              this.$parent.getList() // 重新加载父级数据
200
+              this.$message.success('恭喜你,工单信息编辑成功!')
201
+            }
202
+          }).catch(() => {
203
+            this.loading = false
204
+          })
205
+        } else {
206
+          this.$message.error('请输入有效的必填项信息!')
207
+          return false
208
+        }
209
+      })
210
+    },
211
+    resetForm() {
212
+      if (!this.rowid) {
213
+        if (this.ruleForm.files.length > 0) {
214
+          for (let i = this.ruleForm.files.length - 1; i >= 0; i--) {
215
+            delFiles(this.ruleForm.files[i].filesmallurl, this.ruleForm.files[i].fileurl)
216
+            this.ruleForm.files.splice(i, 1)
217
+          }
218
+        }
219
+        this.$refs.upload.clearFiles()	// 清空已上传的文件列表(该方法不支持在 before-upload 中调用)
220
+      }
221
+      this.provinceCity = []
222
+      this.$refs.ruleForm.resetFields()
223
+    },
224
+    // 详情
225
+    getDetail(rid) {
226
+      getOrder(rid).then(response => {
227
+        if (response.state.toLowerCase() === 'success') {
228
+          const res = response.data.model
229
+          this.ruleForm.sourceid = res.sourceid // 来源
230
+          this.ruleForm.typeid = res.typeid // 类型
231
+          this.ruleForm.name = res.name // 姓名
232
+          this.ruleForm.phone = res.phone // 电话
233
+          this.ruleForm.sex = res.sex // 性别
234
+          this.provinceCity = [res.province, res.city]
235
+          this.ruleForm.address = res.address // 具体地址
236
+          this.ruleForm.content = res.content // 内容
237
+
238
+          // 附件
239
+          if (res.files) {
240
+            for (let i = 0, len = res.files.length; i < len; i++) {
241
+              this.uploadData.fileList.push({
242
+                'name': res.files[i].filename,
243
+                'url': res.files[i].fileurl
244
+              })
245
+            }
246
+            this.ruleForm.files = res.files
247
+          }
248
+        }
249
+      })
250
+    },
251
+    // 获取省市下拉数据
252
+    getProCity() {
253
+      return new Promise(resolve => {
254
+        getProviceCity().then(response => {
255
+          if (response.state.toLowerCase() === 'success') {
256
+            this.provinceCityDatas = response.data
257
+          }
258
+        })
259
+        resolve()
260
+      })
261
+    },
262
+    // 获取工单来源
263
+    getOrderSource() {
264
+      return new Promise(resolve => {
265
+        getDictionary('GDLY').then(response => {
266
+          if (response.state.toLowerCase() === 'success') {
267
+            this.sourceOptions = response.data
268
+          }
269
+        })
270
+        resolve()
271
+      })
272
+    },
273
+    // 获取工单类型
274
+    getOrderType() {
275
+      return new Promise(resolve => {
276
+        getDictionary('GDLX').then(response => {
277
+          if (response.state.toLowerCase() === 'success') {
278
+            this.typeOptions = response.data
279
+          }
280
+        })
281
+        resolve()
282
+      })
283
+    },
284
+    // 文件上传
285
+    uploadSuccess(response, file, fileList) {
286
+      if (response.state.toLowerCase() === 'success') {
287
+        this.ruleForm.files.push(response.data[0])
288
+      } else {
289
+        this.$message.error(response.message)
290
+      }
291
+    },
292
+    uploadRemove(file, fileList) {
293
+      if (this.ruleForm.files.length > 0) {
294
+        for (let i = 0, len = this.ruleForm.files.length; i < len; i++) {
295
+          if (this.ruleForm.files[i].filename === file.name) {
296
+            delFiles(this.ruleForm.files[i].filesmallurl, this.ruleForm.files[i].fileurl)
297
+            this.ruleForm.files.splice(i, 1)
298
+            return
299
+          }
300
+        }
301
+      }
302
+    },
303
+    uploadError(err, file, fileList) {
304
+      // console.log(err)
305
+      this.$message.error(err)
306
+    }
307
+  }
308
+}
309
+</script>
310
+
311
+<style rel="stylesheet/scss" lang="scss">
312
+.order_form .form_select{
313
+	width: 100%;
314
+}
315
+.order_form .uploadFiles .el-upload-list--picture{
316
+	margin-right: -1%;
317
+}
318
+.order_form .el-upload-list--picture li{
319
+	width: 24%;
320
+	margin-right: 1%;
321
+	float: left;
322
+}
323
+</style>
324
+
325
+<style rel="stylesheet/scss" lang="scss" scoped>
326
+
327
+</style>

+ 323 - 0
fuwaiCallCenterWeb.UI/src/views/appointment/departmentVisits/detail.vue

@@ -0,0 +1,323 @@
1
+<template>
2
+  <div class="order_detail">
3
+    <el-row :gutter="20">
4
+      <el-col :md="24" class="order_detail_body">
5
+        <el-card shadow="hover">
6
+          <el-col :md="3">
7
+            <div class="round_img">
8
+              <img :src="avatar" alt="头像">
9
+            </div>
10
+          </el-col>
11
+          <el-col :md="21">
12
+            <h1 class="title"><svg-icon class="title_icon" icon-class="hongqi" />工单编号:{{ ordercode }}</h1>
13
+            <!-- <p class="title_sub"><span class="green">{{ name }}</span> {{ createtime }}</p> -->
14
+            <p class="title_sub"><span class="green">{{ name }}</span> 	河南阜外华中心血管病医院 {{ createtime }}</p>
15
+            <p class="title_sub">催单次数:<span class="red">10</span>次 | 工单状态: <span class="done">已完成</span></p>
16
+          </el-col>
17
+          <el-col :md="24" class="order_detail_content">
18
+            <el-col :md="6" class="order_detail_item">
19
+              客户电话:{{ phone }}
20
+            </el-col>
21
+            <el-col :md="6" class="order_detail_item">
22
+              客户性别:{{ sex }}
23
+            </el-col>
24
+            <el-col :md="6" class="order_detail_item">
25
+              工单来源:{{ sourcename }}
26
+            </el-col>
27
+            <el-col :md="6" class="order_detail_item">
28
+              工单类型:{{ sourcetype }}
29
+            </el-col>
30
+            <el-col :md="6" class="order_detail_item">
31
+              地址:{{ address }}
32
+            </el-col>
33
+            <el-col :md="6" class="order_detail_item">
34
+              创建人:{{ createuser }}
35
+            </el-col>
36
+            <el-col :md="24" class="order_detail_item">
37
+              工单内容:
38
+              <div class="order_content" v-html="content"/>
39
+            </el-col>
40
+            <el-col v-if="fileList.length > 0" :md="24" class="order_detail_item">
41
+              <p>附件:<span class="yellow">(可以下载查看)</span></p>
42
+
43
+              <el-col v-for="(item, index) in fileList" :md="3" :key="index">
44
+                <el-card class="order_file">
45
+                  <span class="img_mask">
46
+                    <a :href="item.fileurl" download="filename" title="点击下载">
47
+                      <i class="el-icon-download"/>
48
+                    </a>
49
+                  </span>
50
+                  <img v-if="item.filesmallurl" :src="item.filesmallurl" :large="item.fileurl" :preview-text="item.filename" preview="0" height="68" width="80%">
51
+                  <i v-else class="el-icon-document file_icon"/>
52
+                  <p :title="item.filename"> {{ item.filename }} </p>
53
+                </el-card>
54
+              </el-col>
55
+
56
+            </el-col>
57
+            <el-col :md="6">
58
+              <i class="el-icon-time"/>
59
+              已持续 <span class="red">20</span> 小时 <span class="red">20</span> 分 <span class="red">20</span> 秒
60
+            </el-col>
61
+            <el-col :md="6" :offset="12">
62
+              <el-button type="primary" size="mini" plain>催单</el-button>
63
+              <el-button type="primary" size="mini" plain>转派</el-button>
64
+              <el-button type="primary" size="mini" plain>完成</el-button>
65
+            </el-col>
66
+          </el-col>
67
+        </el-card>
68
+      </el-col>
69
+
70
+      <el-col :md="12">
71
+        <el-card shadow="hover">
72
+          <div slot="header" class="clearfix">
73
+            <span>工单动态</span>
74
+          </div>
75
+          <div class="order_steps">
76
+            <el-steps :active="0" :space="100" direction="vertical" process-status="success">
77
+              <el-step title="已完成" description="2018-10-23 10:30:20 这是一段很长很长很长的描述性文字"/>
78
+              <el-step title="已转派" description="2018-10-23 10:30:20 这是一段很长很长很长的描述性文字"/>
79
+              <el-step title="已创建" description="2018-10-23 10:30:20 这是一段很长很长很长的描述性文字"/>
80
+            </el-steps>
81
+          </div>
82
+        </el-card>
83
+      </el-col>
84
+      <el-col :md="12">
85
+        <el-card shadow="hover" class="order_record">
86
+          <el-tabs v-model="activeName" @tab-click="handleClick">
87
+            <el-tab-pane label="催单记录(2)" name="first">
88
+              <div class="tab_body">
89
+                催单记录
90
+              </div>
91
+            </el-tab-pane>
92
+            <el-tab-pane label="录音记录(3)" name="second">
93
+              <div class="tab_body">
94
+                录音记录
95
+              </div>
96
+            </el-tab-pane>
97
+          </el-tabs>
98
+        </el-card>
99
+      </el-col>
100
+    </el-row>
101
+  </div>
102
+</template>
103
+
104
+<script>
105
+import { getOrder } from '@/api/order/orderSearch'
106
+import { mapGetters } from 'vuex'
107
+import { filterContent } from '@/utils'
108
+
109
+export default {
110
+  name: 'Detail',
111
+  props: {
112
+    rowid: {
113
+      type: String,
114
+      default: ''
115
+    },
116
+    layerid: {
117
+      type: String,
118
+      default: ''
119
+    }
120
+  },
121
+  data() {
122
+    return {
123
+      activeName: 'first',
124
+      ordercode: '', // 工单编号
125
+      name: '', // 姓名
126
+      phone: '', // 电话
127
+      sex: '', // 性别
128
+      address: '', // 地址
129
+      sourcename: '', // 工单来源
130
+      sourcetype: '', // 工单类型
131
+      content: '', // 工单内容
132
+      createtime: '', // 创建时间
133
+      createuser: '', // 创建人
134
+      fileList: [] // 附件
135
+    }
136
+  },
137
+  computed: {
138
+    ...mapGetters([
139
+      'avatar'
140
+    ])
141
+  },
142
+  created() {
143
+    if (this.rowid) {
144
+      this.getDetail(this.rowid)
145
+    }
146
+  },
147
+  methods: {
148
+    handleClick(tab, event) {
149
+      console.log(tab, event)
150
+    },
151
+    // 详情
152
+    getDetail(rid) {
153
+      getOrder(rid).then(response => {
154
+        if (response.state.toLowerCase() === 'success') {
155
+          const res = response.data.model
156
+          this.ordercode = res.ordercode // 工单编号
157
+          this.name = res.name // 姓名
158
+          this.phone = res.phone // 电话
159
+          this.sex = res.sex // 性别
160
+          res.provincename = res.provincename === null ? '' : res.provincename
161
+          res.cityname = res.cityname === null ? '' : res.cityname
162
+          res.address = res.address === null ? '' : res.address
163
+          this.address = res.provincename + res.cityname + res.address // 地址
164
+          this.sourcename = res.sourcename // 工单来源
165
+          this.sourcetype = res.typename // 工单类型
166
+          this.content = filterContent.content(res.content) // 工单内容
167
+          this.createtime = res.createtime // 创建时间
168
+          this.createuser = res.createuser + '-' + res.createusername // 创建人
169
+          // 附件
170
+          if (res.files) {
171
+            this.fileList = res.files
172
+          }
173
+        }
174
+      })
175
+    }
176
+  }
177
+}
178
+</script>
179
+
180
+<style rel="stylesheet/scss" lang="scss">
181
+	.order_detail{
182
+		.el-col{
183
+			margin-bottom: 20px;
184
+		}
185
+		.el-icon-time{
186
+			color: #d81e06;
187
+		}
188
+		.el-card__header{
189
+			padding-top: 14px;
190
+			padding-bottom: 14px;
191
+			background-color: #F5F5F6;
192
+		}
193
+		.order_file{
194
+			.el-card__body{
195
+				padding: 22px 0 0 0;
196
+				text-align: center;
197
+			}
198
+		}
199
+		.order_steps{
200
+			.el-step__icon-inner{
201
+				display: none;
202
+			}
203
+		}
204
+		.order_record {
205
+			.el-card__body{
206
+				padding: 0;
207
+			}
208
+			.el-tabs__header{
209
+				padding: 0px 20px;
210
+				background-color: #F5F5F6;
211
+					.el-tabs__item{
212
+						font-size: 16px;
213
+						height: 47px;
214
+						line-height: 47px;
215
+					}
216
+			}
217
+		}
218
+	}
219
+</style>
220
+
221
+<style rel="stylesheet/scss" lang="scss" scoped>
222
+	.order_detail{
223
+		.order_detail_body{
224
+			margin-bottom: 20px;
225
+			.round_img{
226
+				width: 90px;
227
+				height: 90px;
228
+				border-radius: 50%;
229
+				overflow: hidden;
230
+				margin: 14px;
231
+				img{
232
+					width: 100%;
233
+					height: 100%;
234
+				}
235
+			}
236
+			.title{
237
+				font-size: 20px;
238
+				.title_icon{
239
+					color: #d81e06;
240
+					font-size: 16px;
241
+					margin-right: 20px;
242
+				}
243
+			}
244
+			.title_sub{
245
+				font-size: 14px;
246
+				color: #666666;
247
+			}
248
+			.order_detail_content{
249
+				background-color: #F5F5F6;
250
+				padding-top: 20px;
251
+				color: #4c4c4c;
252
+				font-size: 14px;
253
+				.order_detail_item{
254
+					margin-bottom: 10px;
255
+					.order_content{
256
+						margin-top: 10px;
257
+					}
258
+					.order_file {
259
+						position: relative;
260
+						cursor: pointer;
261
+						.img_mask {
262
+							display: none;
263
+							position: absolute;
264
+							left: 0px;
265
+							top: 0px;
266
+							background-color: rgba(0, 0, 0, 0.3);
267
+							width: 100%;
268
+							height: 22px;
269
+							text-align: right;
270
+							z-index: 1;
271
+							i {
272
+								font-size: 20px;
273
+								line-height: 22px;
274
+								display: inline-block;
275
+								margin-right: 15px;
276
+								color: #fff;
277
+							}
278
+						}
279
+						p {
280
+							margin-top: 5px;
281
+							padding-left: 14px;
282
+							padding-right: 14px;
283
+							white-space: nowrap;
284
+							overflow: hidden;
285
+							text-overflow: ellipsis;
286
+						}
287
+						.file_icon{
288
+							height: 68px;
289
+							line-height: 68px;
290
+							font-size: 68px;
291
+							color: #409EFF;
292
+						}
293
+					}
294
+					.order_file:hover .img_mask {
295
+						display: block;
296
+					}
297
+				}
298
+			}
299
+		}
300
+		.green {
301
+			color: #00c1de;
302
+		}
303
+		.done {
304
+			color: #198120;
305
+		}
306
+		.red {
307
+			color: #d81e06;
308
+		}
309
+		.yellow{
310
+			color: #e6a23c;
311
+		}
312
+		.order_steps{
313
+			// height: 240px;
314
+			.el-step__icon-inner{
315
+				display: none;
316
+			}
317
+		}
318
+
319
+		.tab_body{
320
+			padding: 0 20px 20px 20px;
321
+		}
322
+	}
323
+</style>

+ 261 - 0
fuwaiCallCenterWeb.UI/src/views/appointment/departmentVisits/index.vue

@@ -0,0 +1,261 @@
1
+<template>
2
+  <div class="app-container">
3
+    <div class="filter-container">
4
+      <el-cascader
5
+        v-model="provinceCity"
6
+        :options="provinceCityDatas"
7
+        :props="props"
8
+        placeholder="请选择省市"
9
+        class="filter-item"
10
+        clearable
11
+        filterable
12
+        change-on-select/>
13
+      <el-select v-model="sc_source" class="filter-item" filterable clearable placeholder="请选择工单来源">
14
+        <el-option
15
+          v-for="item in sourceOptions"
16
+          :key="item.id"
17
+          :label="item.name"
18
+          :value="item.id"/>
19
+      </el-select>
20
+      <el-select v-model="sc_type" class="filter-item" filterable clearable placeholder="请选择工单类型">
21
+        <el-option
22
+          v-for="item in typeOptions"
23
+          :key="item.id"
24
+          :label="item.name"
25
+          :value="item.id"/>
26
+      </el-select>
27
+      <el-date-picker
28
+        v-model="searchDate"
29
+        :picker-options="pickerOptions"
30
+        class="filter-item"
31
+        type="daterange"
32
+        format="yyyy年MM月dd日"
33
+        value-format="yyyy-MM-dd"
34
+        align="left"
35
+        unlink-panels
36
+        range-separator="至"
37
+        start-placeholder="开始日期"
38
+        end-placeholder="结束日期"/>
39
+      <el-input v-model="sc_tel" placeholder="请输入电话号码" class="filter-item"/>
40
+      <el-input v-model="sc_ordercode" placeholder="请输入工单编号" class="filter-item"/>
41
+      <el-button type="primary" class="filter-item" icon="el-icon-search" @click="btn_search">搜索</el-button>
42
+      <el-button v-permission="'HY_add'" type="primary" class="filter-item" icon="el-icon-plus" @click="btn_add">添加</el-button>
43
+    </div>
44
+
45
+    <el-table v-loading="loading" :data="dataLists" border stripe>
46
+      <el-table-column type="index" label="编号" align="center" fixed width="80"/>
47
+      <el-table-column prop="ordercode" label="工单编号" align="center" min-width="140"/>
48
+      <el-table-column prop="sourcename" label="工单来源" align="center" min-width=""/>
49
+      <el-table-column prop="typename" label="工单类型" align="center" min-width=""/>
50
+      <el-table-column prop="provincename" label="所在省" align="center"/>
51
+      <el-table-column prop="cityname" label="所在市" align="center"/>
52
+      <el-table-column prop="address" label="具体地址" align="center"/>
53
+      <el-table-column label="工单内容" align="center">
54
+        <template slot-scope="scope">
55
+          {{ scope.row.content | formatterContent }}
56
+        </template>
57
+      </el-table-column>
58
+      <el-table-column prop="name" label="姓名" align="center"/>
59
+      <el-table-column prop="phone" label="电话" align="center"/>
60
+      <el-table-column prop="sex" label="性别" align="center"/>
61
+      <el-table-column prop="createuser" label="创建人" align="center"/>
62
+      <el-table-column prop="createtime" label="创建时间" align="center" min-width="120"/>
63
+      <el-table-column label="操作" width="220" align="center" class-name="oparate_btn" fixed="right">
64
+        <template slot-scope="scope">
65
+          <el-button v-permission="'HY_detail'" size="mini" plain type="primary" @click="btn_detail(scope.row.ordercode)">详情</el-button>
66
+          <el-button v-permission="'HY_edit'" size="mini" plain type="primary" @click="btn_edit(scope.row.ordercode)">编辑</el-button>
67
+          <el-button v-permission="'HY_delete'" size="mini" plain type="danger" @click="btn_delete(scope.row.id)">删除</el-button>
68
+        </template>
69
+      </el-table-column>
70
+    </el-table>
71
+    <pagination
72
+      v-show="pageParams.total > 0"
73
+      :total="pageParams.total"
74
+      :pageindex.sync="pageParams.pageindex"
75
+      :pagesize.sync="pageParams.pagesize"
76
+      class="pagination"
77
+      @pagination="getList" />
78
+
79
+  </div>
80
+</template>
81
+
82
+<script>
83
+
84
+import { getProviceCity, getDictionary } from '@/api/commonAPI'
85
+import { getOrderLists, deleteOrder } from '@/api/order/orderSearch'
86
+import addOrEdit from './addOrEdit'
87
+import detail from './detail'
88
+import { pickerOptions, formatterContent } from '@/utils'
89
+import Pagination from '@/components/Pagination' // 对el-pagination 二次封装
90
+
91
+export default {
92
+  name: 'OrderSearch',
93
+  components: {
94
+    Pagination
95
+  },
96
+  filters: {
97
+    OrderTextFilter(status) {
98
+      const statusMap = {
99
+        0: '暂时',
100
+        1: '永久',
101
+        2: '已取消'
102
+      }
103
+      return statusMap[status]
104
+    }
105
+  },
106
+  data() {
107
+    return {
108
+      loading: false,
109
+      provinceCity: [], // 省市下拉绑定的值
110
+      provinceCityDatas: [], // 省市下拉数据
111
+      props: {// 自定义省市下拉数据的key值
112
+        value: 'code',
113
+        label: 'name',
114
+        children: 'entityJson'
115
+      },
116
+      sc_source: '', // 工单来源
117
+      sourceOptions: [], // 工单来源下拉数据
118
+      sc_type: '', // 工单类型
119
+      typeOptions: [], // 工单类型下拉数据
120
+      searchDate: '', // 日期
121
+      pickerOptions, // 日期数据
122
+      sc_tel: '', // 电话号码
123
+      sc_ordercode: '', // 工单编号
124
+      pageParams: {
125
+        pageindex: 1, // 当前第几页
126
+        pagesize: Number(this.$store.getters.serverConfig.PAGESIZE), // 每页几条数据
127
+        total: 0 // 总共多少数据
128
+      },
129
+      dataLists: [] // 列表数据
130
+    }
131
+  },
132
+  created() {
133
+    this.getProCity()
134
+    this.getOrderSource()
135
+    this.getOrderType()
136
+    this.getList()
137
+    document.onkeyup = (e) => {
138
+      if (e.keyCode === 13) {
139
+        this.getList()
140
+      }
141
+    }
142
+  },
143
+  methods: {
144
+    getList() {
145
+      this.loading = true
146
+      return new Promise(resolve => {
147
+        const params = {
148
+          pageindex: this.pageParams.pageindex, // int 第几页
149
+          pagesize: this.pageParams.pagesize, // int 每页几条信息
150
+          stime: this.searchDate && this.searchDate[0], // 开始时间
151
+          etime: this.searchDate && this.searchDate[1], // 结束时间
152
+          ordercode: this.sc_ordercode, //	否	string	模糊查询(工单编号)
153
+          phone: this.sc_tel, //	否	string	模糊查询(号码)
154
+          province: this.provinceCity && this.provinceCity[0], //	否	string	省code
155
+          city: this.provinceCity && this.provinceCity[1], //	否	string	市code
156
+          sourceid: this.sc_source, //	否	string	来源id
157
+          typeid: this.sc_type //	否	string	类型id
158
+        }
159
+        getOrderLists(params).then(response => {
160
+          this.loading = false
161
+          if (response.state.toLowerCase() === 'success') {
162
+            this.pageParams.total = response.data.total
163
+            this.dataLists = response.data.rows
164
+          }
165
+        })
166
+        resolve()
167
+      })
168
+    },
169
+    btn_search() {
170
+      this.pageParams.pageindex = 1
171
+      this.getList()
172
+    },
173
+    btn_add() {
174
+      this.$layer.iframe({
175
+        content: {
176
+          content: addOrEdit, // 传递的组件对象
177
+          parent: this, // 当前的vue对象
178
+          data: { 'rowid': '' }// props//该方法会自动添加一个key为layerid的值, 该值为创建层的id, 可以直接使用
179
+        },
180
+        area: ['80%', '90%'],
181
+        title: '添加工单'
182
+      })
183
+    },
184
+    btn_edit(editId) {
185
+      this.$layer.iframe({
186
+        content: {
187
+          content: addOrEdit, // 传递的组件对象
188
+          parent: this, // 当前的vue对象
189
+          data: { 'rowid': editId }// props
190
+        },
191
+        area: ['80%', '90%'],
192
+        title: '编辑工单'
193
+      })
194
+    },
195
+    btn_detail(editId) {
196
+      this.$layer.iframe({
197
+        content: {
198
+          content: detail, // 传递的组件对象
199
+          parent: this, // 当前的vue对象
200
+          data: { 'rowid': editId }// props
201
+        },
202
+        area: ['80%', '90%'],
203
+        title: '工单详情'
204
+      })
205
+    },
206
+    btn_delete(editId) {
207
+      this.$confirm('您确定要将此工单删除吗?', '提示', {
208
+        confirmButtonText: '确定',
209
+        cancelButtonText: '取消',
210
+        type: 'warning'
211
+      }).then(() => {
212
+        deleteOrder(editId).then(response => {
213
+          if (response.state.toLowerCase() === 'success') {
214
+            this.getList()
215
+            this.$message.success('删除成功!')
216
+          }
217
+        })
218
+      }).catch(() => {
219
+        this.$message.info('已取消删除')
220
+      })
221
+    },
222
+    // 获取省市下拉数据
223
+    getProCity() {
224
+      return new Promise(resolve => {
225
+        getProviceCity().then(response => {
226
+          if (response.state.toLowerCase() === 'success') {
227
+            this.provinceCityDatas = response.data
228
+          }
229
+        })
230
+        resolve()
231
+      })
232
+    },
233
+    // 获取工单来源
234
+    getOrderSource() {
235
+      return new Promise(resolve => {
236
+        getDictionary('GDLY').then(response => {
237
+          if (response.state.toLowerCase() === 'success') {
238
+            this.sourceOptions = response.data
239
+          }
240
+        })
241
+        resolve()
242
+      })
243
+    },
244
+    // 获取工单类型
245
+    getOrderType() {
246
+      return new Promise(resolve => {
247
+        getDictionary('GDLX').then(response => {
248
+          if (response.state.toLowerCase() === 'success') {
249
+            this.typeOptions = response.data
250
+          }
251
+        })
252
+        resolve()
253
+      })
254
+    }
255
+  }
256
+}
257
+</script>
258
+
259
+<style rel="stylesheet/scss" lang="scss" scoped>
260
+
261
+</style>

+ 327 - 0
fuwaiCallCenterWeb.UI/src/views/appointment/doctorVisits/addOrEdit.vue

@@ -0,0 +1,327 @@
1
+<template>
2
+  <div v-loading="loading">
3
+    <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="150px" class="order_form">
4
+      <el-form-item label="工单来源" prop="sourceid">
5
+        <el-select v-model="ruleForm.sourceid" class="form_select" filterable clearable placeholder="请选择工单来源">
6
+          <el-option v-for="item in sourceOptions" :key="item.id" :label="item.name" :value="item.id"/>
7
+        </el-select>
8
+      </el-form-item>
9
+      <el-form-item label="工单类型" prop="typeid">
10
+        <el-select v-model="ruleForm.typeid" class="form_select" filterable clearable placeholder="请选择工单类型">
11
+          <el-option v-for="item in typeOptions" :key="item.id" :label="item.name" :value="item.id"/>
12
+        </el-select>
13
+      </el-form-item>
14
+      <el-form-item label="客户姓名" prop="name">
15
+        <el-input v-model="ruleForm.name" placeholder="请输入客户姓名"/>
16
+      </el-form-item>
17
+      <el-form-item label="客户电话" prop="phone">
18
+        <el-input v-model="ruleForm.phone" placeholder="请输入客户电话"/>
19
+      </el-form-item>
20
+      <el-form-item label="性别" prop="sex">
21
+        <el-radio-group v-model="ruleForm.sex">
22
+          <el-radio label="男">男</el-radio>
23
+          <el-radio label="女">女</el-radio>
24
+        </el-radio-group>
25
+      </el-form-item>
26
+      <el-form-item label="所在地" prop="provinceCity">
27
+        <el-cascader
28
+          v-model="provinceCity"
29
+          :options="provinceCityDatas"
30
+          :props="props"
31
+          placeholder="请选择省市"
32
+          class="form_select"
33
+          clearable
34
+          filterable
35
+          change-on-select/>
36
+      </el-form-item>
37
+      <el-form-item label="具体地址" prop="address">
38
+        <el-input v-model="ruleForm.address" placeholder="请输入具体地址"/>
39
+      </el-form-item>
40
+      <el-form-item label="工单内容" prop="content">
41
+        <el-input v-model="ruleForm.content" type="textarea" autosize placeholder="请输入工单内容"/>
42
+      </el-form-item>
43
+      <el-form-item label="附件" prop="files">
44
+        <el-upload
45
+          ref="upload"
46
+          :file-list="uploadData.fileList"
47
+          :action= "uploadData.uploadUrl"
48
+          :data = "uploadData.uploaderFiles"
49
+          :on-success="uploadSuccess"
50
+          :on-error="uploadError"
51
+          :on-remove="uploadRemove"
52
+          class="uploadFiles"
53
+          list-type="picture"
54
+          multiple>
55
+          <el-button size="small" type="primary">点击上传</el-button>
56
+          <!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div> -->
57
+          <!-- <i class="el-icon-plus"></i> -->
58
+        </el-upload>
59
+      </el-form-item>
60
+      <el-form-item>
61
+        <el-button type="primary" @click="submitForm">保存</el-button>
62
+        <el-button @click="resetForm">重置</el-button>
63
+      </el-form-item>
64
+    </el-form>
65
+  </div>
66
+</template>
67
+
68
+<script>
69
+import { getProviceCity, getDictionary } from '@/api/commonAPI'
70
+import { getOrder, addOrder, editOrder } from '@/api/order/orderSearch'
71
+import { validateTel } from '@/utils/validate'
72
+import { delFiles, filterContent } from '@/utils'
73
+
74
+const validateTelRule = (rule, value, callback) => {
75
+  if (!validateTel(value)) {
76
+    callback(new Error('请输入有效的客户电话!'))
77
+  } else {
78
+    callback()
79
+  }
80
+}
81
+
82
+export default {
83
+  name: 'AddOrEdit',
84
+  props: {
85
+    rowid: {
86
+      type: String,
87
+      default: ''
88
+    },
89
+    callid: {
90
+      type: Number,
91
+      default: 0
92
+    },
93
+    layerid: {
94
+      type: String,
95
+      default: ''
96
+    }
97
+  },
98
+  data() {
99
+    return {
100
+      uploadData: {// 文件上传数据
101
+        uploadUrl: this.$store.getters.serverConfig.BASE_API + 'fileserverapi/Api/Upload',
102
+        uploaderFiles: {// 上传文件的参数 //是	string	模块code,如:test
103
+          uploadtype: 'orderFiles'
104
+        },
105
+        fileList: [] // 展示文件的数据
106
+      },
107
+      provinceCity: [], // 省市下拉绑定的值
108
+      provinceCityDatas: [], // 省市下拉数据
109
+      props: { // 自定义省市下拉数据的key值
110
+        value: 'code',
111
+        label: 'name',
112
+        children: 'entityJson'
113
+      },
114
+      sourceOptions: [], // 工单来源下拉数据
115
+      typeOptions: [], // 工单类型下拉数据
116
+      ruleForm: {
117
+        unique_id: '', //		否	string	callid
118
+        ordercode: '',
119
+        sourceid: '', //	否	string	来源id
120
+        typeid: '', //	否	string	类型id
121
+        name: '', //	否	string	姓名
122
+        phone: '', //	是	string	号码
123
+        sex: '男', //	否	string	性别
124
+        province: '', //	否	string	省code
125
+        city: '', //	否	string	市code
126
+        address: '', //	否	string	地址
127
+        // deptid: '', //	否	string	部门id
128
+        content: '', //	是	string	工单内容
129
+        files: [] // 否	list	附件json
130
+      },
131
+      rules: {
132
+        sourceid: [{
133
+          required: true,
134
+          message: '请选择工单来源',
135
+          trigger: 'blur'
136
+        }],
137
+        typeid: [{
138
+          required: true,
139
+          message: '请选择工单类型',
140
+          trigger: 'blur'
141
+        }],
142
+        name: [{
143
+          required: true,
144
+          message: '请输入客户姓名',
145
+          trigger: 'blur'
146
+        }],
147
+        phone: [{
148
+          required: true,
149
+          trigger: 'blur',
150
+          validator: validateTelRule
151
+        }]
152
+      },
153
+      loading: false
154
+    }
155
+  },
156
+  created() {
157
+    if (this.callid) {
158
+      this.ruleForm.unique_id = this.callid
159
+    }
160
+    Promise.all([this.getOrderSource(), this.getOrderType(), this.getProCity()])
161
+      .then(() => {
162
+        if (this.rowid) {
163
+          this.ruleForm.ordercode = this.rowid
164
+          this.getDetail(this.rowid)
165
+        }
166
+      })
167
+  },
168
+  methods: {
169
+    submitForm() {
170
+      this.$refs.ruleForm.validate((valid) => {
171
+        if (valid) {
172
+          this.ruleForm.province = this.provinceCity && this.provinceCity[0]
173
+          this.ruleForm.city = this.provinceCity && this.provinceCity[1]
174
+          this.ruleForm.content = filterContent.delHtmlTag(this.ruleForm.content)// 保存内容时去掉 html 标签
175
+          this.loading = true
176
+          // 添加
177
+          if (!this.rowid) {
178
+            addOrder(this.ruleForm).then(response => {
179
+              this.loading = false
180
+              if (response.state.toLowerCase() === 'success') {
181
+                this.$parent.$layer.close(this.layerid)
182
+                if (this.callid) {
183
+                  this.$parent.getOrderRecord() // 重新加载来电弹屏工单记录
184
+                } else {
185
+                  this.$parent.getList() // 重新加载父级数据
186
+                }
187
+                this.$message.success('恭喜你,工单信息添加成功!')
188
+              }
189
+            }).catch(() => {
190
+              this.loading = false
191
+            })
192
+            return
193
+          }
194
+          // 编辑
195
+          editOrder(this.ruleForm).then(response => {
196
+            this.loading = false
197
+            if (response.state.toLowerCase() === 'success') {
198
+              this.$parent.$layer.close(this.layerid)
199
+              this.$parent.getList() // 重新加载父级数据
200
+              this.$message.success('恭喜你,工单信息编辑成功!')
201
+            }
202
+          }).catch(() => {
203
+            this.loading = false
204
+          })
205
+        } else {
206
+          this.$message.error('请输入有效的必填项信息!')
207
+          return false
208
+        }
209
+      })
210
+    },
211
+    resetForm() {
212
+      if (!this.rowid) {
213
+        if (this.ruleForm.files.length > 0) {
214
+          for (let i = this.ruleForm.files.length - 1; i >= 0; i--) {
215
+            delFiles(this.ruleForm.files[i].filesmallurl, this.ruleForm.files[i].fileurl)
216
+            this.ruleForm.files.splice(i, 1)
217
+          }
218
+        }
219
+        this.$refs.upload.clearFiles()	// 清空已上传的文件列表(该方法不支持在 before-upload 中调用)
220
+      }
221
+      this.provinceCity = []
222
+      this.$refs.ruleForm.resetFields()
223
+    },
224
+    // 详情
225
+    getDetail(rid) {
226
+      getOrder(rid).then(response => {
227
+        if (response.state.toLowerCase() === 'success') {
228
+          const res = response.data.model
229
+          this.ruleForm.sourceid = res.sourceid // 来源
230
+          this.ruleForm.typeid = res.typeid // 类型
231
+          this.ruleForm.name = res.name // 姓名
232
+          this.ruleForm.phone = res.phone // 电话
233
+          this.ruleForm.sex = res.sex // 性别
234
+          this.provinceCity = [res.province, res.city]
235
+          this.ruleForm.address = res.address // 具体地址
236
+          this.ruleForm.content = res.content // 内容
237
+
238
+          // 附件
239
+          if (res.files) {
240
+            for (let i = 0, len = res.files.length; i < len; i++) {
241
+              this.uploadData.fileList.push({
242
+                'name': res.files[i].filename,
243
+                'url': res.files[i].fileurl
244
+              })
245
+            }
246
+            this.ruleForm.files = res.files
247
+          }
248
+        }
249
+      })
250
+    },
251
+    // 获取省市下拉数据
252
+    getProCity() {
253
+      return new Promise(resolve => {
254
+        getProviceCity().then(response => {
255
+          if (response.state.toLowerCase() === 'success') {
256
+            this.provinceCityDatas = response.data
257
+          }
258
+        })
259
+        resolve()
260
+      })
261
+    },
262
+    // 获取工单来源
263
+    getOrderSource() {
264
+      return new Promise(resolve => {
265
+        getDictionary('GDLY').then(response => {
266
+          if (response.state.toLowerCase() === 'success') {
267
+            this.sourceOptions = response.data
268
+          }
269
+        })
270
+        resolve()
271
+      })
272
+    },
273
+    // 获取工单类型
274
+    getOrderType() {
275
+      return new Promise(resolve => {
276
+        getDictionary('GDLX').then(response => {
277
+          if (response.state.toLowerCase() === 'success') {
278
+            this.typeOptions = response.data
279
+          }
280
+        })
281
+        resolve()
282
+      })
283
+    },
284
+    // 文件上传
285
+    uploadSuccess(response, file, fileList) {
286
+      if (response.state.toLowerCase() === 'success') {
287
+        this.ruleForm.files.push(response.data[0])
288
+      } else {
289
+        this.$message.error(response.message)
290
+      }
291
+    },
292
+    uploadRemove(file, fileList) {
293
+      if (this.ruleForm.files.length > 0) {
294
+        for (let i = 0, len = this.ruleForm.files.length; i < len; i++) {
295
+          if (this.ruleForm.files[i].filename === file.name) {
296
+            delFiles(this.ruleForm.files[i].filesmallurl, this.ruleForm.files[i].fileurl)
297
+            this.ruleForm.files.splice(i, 1)
298
+            return
299
+          }
300
+        }
301
+      }
302
+    },
303
+    uploadError(err, file, fileList) {
304
+      // console.log(err)
305
+      this.$message.error(err)
306
+    }
307
+  }
308
+}
309
+</script>
310
+
311
+<style rel="stylesheet/scss" lang="scss">
312
+.order_form .form_select{
313
+	width: 100%;
314
+}
315
+.order_form .uploadFiles .el-upload-list--picture{
316
+	margin-right: -1%;
317
+}
318
+.order_form .el-upload-list--picture li{
319
+	width: 24%;
320
+	margin-right: 1%;
321
+	float: left;
322
+}
323
+</style>
324
+
325
+<style rel="stylesheet/scss" lang="scss" scoped>
326
+
327
+</style>

+ 323 - 0
fuwaiCallCenterWeb.UI/src/views/appointment/doctorVisits/detail.vue

@@ -0,0 +1,323 @@
1
+<template>
2
+  <div class="order_detail">
3
+    <el-row :gutter="20">
4
+      <el-col :md="24" class="order_detail_body">
5
+        <el-card shadow="hover">
6
+          <el-col :md="3">
7
+            <div class="round_img">
8
+              <img :src="avatar" alt="头像">
9
+            </div>
10
+          </el-col>
11
+          <el-col :md="21">
12
+            <h1 class="title"><svg-icon class="title_icon" icon-class="hongqi" />工单编号:{{ ordercode }}</h1>
13
+            <!-- <p class="title_sub"><span class="green">{{ name }}</span> {{ createtime }}</p> -->
14
+            <p class="title_sub"><span class="green">{{ name }}</span> 	河南阜外华中心血管病医院 {{ createtime }}</p>
15
+            <p class="title_sub">催单次数:<span class="red">10</span>次 | 工单状态: <span class="done">已完成</span></p>
16
+          </el-col>
17
+          <el-col :md="24" class="order_detail_content">
18
+            <el-col :md="6" class="order_detail_item">
19
+              客户电话:{{ phone }}
20
+            </el-col>
21
+            <el-col :md="6" class="order_detail_item">
22
+              客户性别:{{ sex }}
23
+            </el-col>
24
+            <el-col :md="6" class="order_detail_item">
25
+              工单来源:{{ sourcename }}
26
+            </el-col>
27
+            <el-col :md="6" class="order_detail_item">
28
+              工单类型:{{ sourcetype }}
29
+            </el-col>
30
+            <el-col :md="6" class="order_detail_item">
31
+              地址:{{ address }}
32
+            </el-col>
33
+            <el-col :md="6" class="order_detail_item">
34
+              创建人:{{ createuser }}
35
+            </el-col>
36
+            <el-col :md="24" class="order_detail_item">
37
+              工单内容:
38
+              <div class="order_content" v-html="content"/>
39
+            </el-col>
40
+            <el-col v-if="fileList.length > 0" :md="24" class="order_detail_item">
41
+              <p>附件:<span class="yellow">(可以下载查看)</span></p>
42
+
43
+              <el-col v-for="(item, index) in fileList" :md="3" :key="index">
44
+                <el-card class="order_file">
45
+                  <span class="img_mask">
46
+                    <a :href="item.fileurl" download="filename" title="点击下载">
47
+                      <i class="el-icon-download"/>
48
+                    </a>
49
+                  </span>
50
+                  <img v-if="item.filesmallurl" :src="item.filesmallurl" :large="item.fileurl" :preview-text="item.filename" preview="0" height="68" width="80%">
51
+                  <i v-else class="el-icon-document file_icon"/>
52
+                  <p :title="item.filename"> {{ item.filename }} </p>
53
+                </el-card>
54
+              </el-col>
55
+
56
+            </el-col>
57
+            <el-col :md="6">
58
+              <i class="el-icon-time"/>
59
+              已持续 <span class="red">20</span> 小时 <span class="red">20</span> 分 <span class="red">20</span> 秒
60
+            </el-col>
61
+            <el-col :md="6" :offset="12">
62
+              <el-button type="primary" size="mini" plain>催单</el-button>
63
+              <el-button type="primary" size="mini" plain>转派</el-button>
64
+              <el-button type="primary" size="mini" plain>完成</el-button>
65
+            </el-col>
66
+          </el-col>
67
+        </el-card>
68
+      </el-col>
69
+
70
+      <el-col :md="12">
71
+        <el-card shadow="hover">
72
+          <div slot="header" class="clearfix">
73
+            <span>工单动态</span>
74
+          </div>
75
+          <div class="order_steps">
76
+            <el-steps :active="0" :space="100" direction="vertical" process-status="success">
77
+              <el-step title="已完成" description="2018-10-23 10:30:20 这是一段很长很长很长的描述性文字"/>
78
+              <el-step title="已转派" description="2018-10-23 10:30:20 这是一段很长很长很长的描述性文字"/>
79
+              <el-step title="已创建" description="2018-10-23 10:30:20 这是一段很长很长很长的描述性文字"/>
80
+            </el-steps>
81
+          </div>
82
+        </el-card>
83
+      </el-col>
84
+      <el-col :md="12">
85
+        <el-card shadow="hover" class="order_record">
86
+          <el-tabs v-model="activeName" @tab-click="handleClick">
87
+            <el-tab-pane label="催单记录(2)" name="first">
88
+              <div class="tab_body">
89
+                催单记录
90
+              </div>
91
+            </el-tab-pane>
92
+            <el-tab-pane label="录音记录(3)" name="second">
93
+              <div class="tab_body">
94
+                录音记录
95
+              </div>
96
+            </el-tab-pane>
97
+          </el-tabs>
98
+        </el-card>
99
+      </el-col>
100
+    </el-row>
101
+  </div>
102
+</template>
103
+
104
+<script>
105
+import { getOrder } from '@/api/order/orderSearch'
106
+import { mapGetters } from 'vuex'
107
+import { filterContent } from '@/utils'
108
+
109
+export default {
110
+  name: 'Detail',
111
+  props: {
112
+    rowid: {
113
+      type: String,
114
+      default: ''
115
+    },
116
+    layerid: {
117
+      type: String,
118
+      default: ''
119
+    }
120
+  },
121
+  data() {
122
+    return {
123
+      activeName: 'first',
124
+      ordercode: '', // 工单编号
125
+      name: '', // 姓名
126
+      phone: '', // 电话
127
+      sex: '', // 性别
128
+      address: '', // 地址
129
+      sourcename: '', // 工单来源
130
+      sourcetype: '', // 工单类型
131
+      content: '', // 工单内容
132
+      createtime: '', // 创建时间
133
+      createuser: '', // 创建人
134
+      fileList: [] // 附件
135
+    }
136
+  },
137
+  computed: {
138
+    ...mapGetters([
139
+      'avatar'
140
+    ])
141
+  },
142
+  created() {
143
+    if (this.rowid) {
144
+      this.getDetail(this.rowid)
145
+    }
146
+  },
147
+  methods: {
148
+    handleClick(tab, event) {
149
+      console.log(tab, event)
150
+    },
151
+    // 详情
152
+    getDetail(rid) {
153
+      getOrder(rid).then(response => {
154
+        if (response.state.toLowerCase() === 'success') {
155
+          const res = response.data.model
156
+          this.ordercode = res.ordercode // 工单编号
157
+          this.name = res.name // 姓名
158
+          this.phone = res.phone // 电话
159
+          this.sex = res.sex // 性别
160
+          res.provincename = res.provincename === null ? '' : res.provincename
161
+          res.cityname = res.cityname === null ? '' : res.cityname
162
+          res.address = res.address === null ? '' : res.address
163
+          this.address = res.provincename + res.cityname + res.address // 地址
164
+          this.sourcename = res.sourcename // 工单来源
165
+          this.sourcetype = res.typename // 工单类型
166
+          this.content = filterContent.content(res.content) // 工单内容
167
+          this.createtime = res.createtime // 创建时间
168
+          this.createuser = res.createuser + '-' + res.createusername // 创建人
169
+          // 附件
170
+          if (res.files) {
171
+            this.fileList = res.files
172
+          }
173
+        }
174
+      })
175
+    }
176
+  }
177
+}
178
+</script>
179
+
180
+<style rel="stylesheet/scss" lang="scss">
181
+	.order_detail{
182
+		.el-col{
183
+			margin-bottom: 20px;
184
+		}
185
+		.el-icon-time{
186
+			color: #d81e06;
187
+		}
188
+		.el-card__header{
189
+			padding-top: 14px;
190
+			padding-bottom: 14px;
191
+			background-color: #F5F5F6;
192
+		}
193
+		.order_file{
194
+			.el-card__body{
195
+				padding: 22px 0 0 0;
196
+				text-align: center;
197
+			}
198
+		}
199
+		.order_steps{
200
+			.el-step__icon-inner{
201
+				display: none;
202
+			}
203
+		}
204
+		.order_record {
205
+			.el-card__body{
206
+				padding: 0;
207
+			}
208
+			.el-tabs__header{
209
+				padding: 0px 20px;
210
+				background-color: #F5F5F6;
211
+					.el-tabs__item{
212
+						font-size: 16px;
213
+						height: 47px;
214
+						line-height: 47px;
215
+					}
216
+			}
217
+		}
218
+	}
219
+</style>
220
+
221
+<style rel="stylesheet/scss" lang="scss" scoped>
222
+	.order_detail{
223
+		.order_detail_body{
224
+			margin-bottom: 20px;
225
+			.round_img{
226
+				width: 90px;
227
+				height: 90px;
228
+				border-radius: 50%;
229
+				overflow: hidden;
230
+				margin: 14px;
231
+				img{
232
+					width: 100%;
233
+					height: 100%;
234
+				}
235
+			}
236
+			.title{
237
+				font-size: 20px;
238
+				.title_icon{
239
+					color: #d81e06;
240
+					font-size: 16px;
241
+					margin-right: 20px;
242
+				}
243
+			}
244
+			.title_sub{
245
+				font-size: 14px;
246
+				color: #666666;
247
+			}
248
+			.order_detail_content{
249
+				background-color: #F5F5F6;
250
+				padding-top: 20px;
251
+				color: #4c4c4c;
252
+				font-size: 14px;
253
+				.order_detail_item{
254
+					margin-bottom: 10px;
255
+					.order_content{
256
+						margin-top: 10px;
257
+					}
258
+					.order_file {
259
+						position: relative;
260
+						cursor: pointer;
261
+						.img_mask {
262
+							display: none;
263
+							position: absolute;
264
+							left: 0px;
265
+							top: 0px;
266
+							background-color: rgba(0, 0, 0, 0.3);
267
+							width: 100%;
268
+							height: 22px;
269
+							text-align: right;
270
+							z-index: 1;
271
+							i {
272
+								font-size: 20px;
273
+								line-height: 22px;
274
+								display: inline-block;
275
+								margin-right: 15px;
276
+								color: #fff;
277
+							}
278
+						}
279
+						p {
280
+							margin-top: 5px;
281
+							padding-left: 14px;
282
+							padding-right: 14px;
283
+							white-space: nowrap;
284
+							overflow: hidden;
285
+							text-overflow: ellipsis;
286
+						}
287
+						.file_icon{
288
+							height: 68px;
289
+							line-height: 68px;
290
+							font-size: 68px;
291
+							color: #409EFF;
292
+						}
293
+					}
294
+					.order_file:hover .img_mask {
295
+						display: block;
296
+					}
297
+				}
298
+			}
299
+		}
300
+		.green {
301
+			color: #00c1de;
302
+		}
303
+		.done {
304
+			color: #198120;
305
+		}
306
+		.red {
307
+			color: #d81e06;
308
+		}
309
+		.yellow{
310
+			color: #e6a23c;
311
+		}
312
+		.order_steps{
313
+			// height: 240px;
314
+			.el-step__icon-inner{
315
+				display: none;
316
+			}
317
+		}
318
+
319
+		.tab_body{
320
+			padding: 0 20px 20px 20px;
321
+		}
322
+	}
323
+</style>

+ 261 - 0
fuwaiCallCenterWeb.UI/src/views/appointment/doctorVisits/index.vue

@@ -0,0 +1,261 @@
1
+<template>
2
+  <div class="app-container">
3
+    <div class="filter-container">
4
+      <el-cascader
5
+        v-model="provinceCity"
6
+        :options="provinceCityDatas"
7
+        :props="props"
8
+        placeholder="请选择省市"
9
+        class="filter-item"
10
+        clearable
11
+        filterable
12
+        change-on-select/>
13
+      <el-select v-model="sc_source" class="filter-item" filterable clearable placeholder="请选择工单来源">
14
+        <el-option
15
+          v-for="item in sourceOptions"
16
+          :key="item.id"
17
+          :label="item.name"
18
+          :value="item.id"/>
19
+      </el-select>
20
+      <el-select v-model="sc_type" class="filter-item" filterable clearable placeholder="请选择工单类型">
21
+        <el-option
22
+          v-for="item in typeOptions"
23
+          :key="item.id"
24
+          :label="item.name"
25
+          :value="item.id"/>
26
+      </el-select>
27
+      <el-date-picker
28
+        v-model="searchDate"
29
+        :picker-options="pickerOptions"
30
+        class="filter-item"
31
+        type="daterange"
32
+        format="yyyy年MM月dd日"
33
+        value-format="yyyy-MM-dd"
34
+        align="left"
35
+        unlink-panels
36
+        range-separator="至"
37
+        start-placeholder="开始日期"
38
+        end-placeholder="结束日期"/>
39
+      <el-input v-model="sc_tel" placeholder="请输入电话号码" class="filter-item"/>
40
+      <el-input v-model="sc_ordercode" placeholder="请输入工单编号" class="filter-item"/>
41
+      <el-button type="primary" class="filter-item" icon="el-icon-search" @click="btn_search">搜索</el-button>
42
+      <el-button v-permission="'HY_add'" type="primary" class="filter-item" icon="el-icon-plus" @click="btn_add">添加</el-button>
43
+    </div>
44
+
45
+    <el-table v-loading="loading" :data="dataLists" border stripe>
46
+      <el-table-column type="index" label="编号" align="center" fixed width="80"/>
47
+      <el-table-column prop="ordercode" label="工单编号" align="center" min-width="140"/>
48
+      <el-table-column prop="sourcename" label="工单来源" align="center" min-width=""/>
49
+      <el-table-column prop="typename" label="工单类型" align="center" min-width=""/>
50
+      <el-table-column prop="provincename" label="所在省" align="center"/>
51
+      <el-table-column prop="cityname" label="所在市" align="center"/>
52
+      <el-table-column prop="address" label="具体地址" align="center"/>
53
+      <el-table-column label="工单内容" align="center">
54
+        <template slot-scope="scope">
55
+          {{ scope.row.content | formatterContent }}
56
+        </template>
57
+      </el-table-column>
58
+      <el-table-column prop="name" label="姓名" align="center"/>
59
+      <el-table-column prop="phone" label="电话" align="center"/>
60
+      <el-table-column prop="sex" label="性别" align="center"/>
61
+      <el-table-column prop="createuser" label="创建人" align="center"/>
62
+      <el-table-column prop="createtime" label="创建时间" align="center" min-width="120"/>
63
+      <el-table-column label="操作" width="220" align="center" class-name="oparate_btn" fixed="right">
64
+        <template slot-scope="scope">
65
+          <el-button v-permission="'HY_detail'" size="mini" plain type="primary" @click="btn_detail(scope.row.ordercode)">详情</el-button>
66
+          <el-button v-permission="'HY_edit'" size="mini" plain type="primary" @click="btn_edit(scope.row.ordercode)">编辑</el-button>
67
+          <el-button v-permission="'HY_delete'" size="mini" plain type="danger" @click="btn_delete(scope.row.id)">删除</el-button>
68
+        </template>
69
+      </el-table-column>
70
+    </el-table>
71
+    <pagination
72
+      v-show="pageParams.total > 0"
73
+      :total="pageParams.total"
74
+      :pageindex.sync="pageParams.pageindex"
75
+      :pagesize.sync="pageParams.pagesize"
76
+      class="pagination"
77
+      @pagination="getList" />
78
+
79
+  </div>
80
+</template>
81
+
82
+<script>
83
+
84
+import { getProviceCity, getDictionary } from '@/api/commonAPI'
85
+import { getOrderLists, deleteOrder } from '@/api/order/orderSearch'
86
+import addOrEdit from './addOrEdit'
87
+import detail from './detail'
88
+import { pickerOptions, formatterContent } from '@/utils'
89
+import Pagination from '@/components/Pagination' // 对el-pagination 二次封装
90
+
91
+export default {
92
+  name: 'OrderSearch',
93
+  components: {
94
+    Pagination
95
+  },
96
+  filters: {
97
+    OrderTextFilter(status) {
98
+      const statusMap = {
99
+        0: '暂时',
100
+        1: '永久',
101
+        2: '已取消'
102
+      }
103
+      return statusMap[status]
104
+    }
105
+  },
106
+  data() {
107
+    return {
108
+      loading: false,
109
+      provinceCity: [], // 省市下拉绑定的值
110
+      provinceCityDatas: [], // 省市下拉数据
111
+      props: {// 自定义省市下拉数据的key值
112
+        value: 'code',
113
+        label: 'name',
114
+        children: 'entityJson'
115
+      },
116
+      sc_source: '', // 工单来源
117
+      sourceOptions: [], // 工单来源下拉数据
118
+      sc_type: '', // 工单类型
119
+      typeOptions: [], // 工单类型下拉数据
120
+      searchDate: '', // 日期
121
+      pickerOptions, // 日期数据
122
+      sc_tel: '', // 电话号码
123
+      sc_ordercode: '', // 工单编号
124
+      pageParams: {
125
+        pageindex: 1, // 当前第几页
126
+        pagesize: Number(this.$store.getters.serverConfig.PAGESIZE), // 每页几条数据
127
+        total: 0 // 总共多少数据
128
+      },
129
+      dataLists: [] // 列表数据
130
+    }
131
+  },
132
+  created() {
133
+    this.getProCity()
134
+    this.getOrderSource()
135
+    this.getOrderType()
136
+    this.getList()
137
+    document.onkeyup = (e) => {
138
+      if (e.keyCode === 13) {
139
+        this.getList()
140
+      }
141
+    }
142
+  },
143
+  methods: {
144
+    getList() {
145
+      this.loading = true
146
+      return new Promise(resolve => {
147
+        const params = {
148
+          pageindex: this.pageParams.pageindex, // int 第几页
149
+          pagesize: this.pageParams.pagesize, // int 每页几条信息
150
+          stime: this.searchDate && this.searchDate[0], // 开始时间
151
+          etime: this.searchDate && this.searchDate[1], // 结束时间
152
+          ordercode: this.sc_ordercode, //	否	string	模糊查询(工单编号)
153
+          phone: this.sc_tel, //	否	string	模糊查询(号码)
154
+          province: this.provinceCity && this.provinceCity[0], //	否	string	省code
155
+          city: this.provinceCity && this.provinceCity[1], //	否	string	市code
156
+          sourceid: this.sc_source, //	否	string	来源id
157
+          typeid: this.sc_type //	否	string	类型id
158
+        }
159
+        getOrderLists(params).then(response => {
160
+          this.loading = false
161
+          if (response.state.toLowerCase() === 'success') {
162
+            this.pageParams.total = response.data.total
163
+            this.dataLists = response.data.rows
164
+          }
165
+        })
166
+        resolve()
167
+      })
168
+    },
169
+    btn_search() {
170
+      this.pageParams.pageindex = 1
171
+      this.getList()
172
+    },
173
+    btn_add() {
174
+      this.$layer.iframe({
175
+        content: {
176
+          content: addOrEdit, // 传递的组件对象
177
+          parent: this, // 当前的vue对象
178
+          data: { 'rowid': '' }// props//该方法会自动添加一个key为layerid的值, 该值为创建层的id, 可以直接使用
179
+        },
180
+        area: ['80%', '90%'],
181
+        title: '添加工单'
182
+      })
183
+    },
184
+    btn_edit(editId) {
185
+      this.$layer.iframe({
186
+        content: {
187
+          content: addOrEdit, // 传递的组件对象
188
+          parent: this, // 当前的vue对象
189
+          data: { 'rowid': editId }// props
190
+        },
191
+        area: ['80%', '90%'],
192
+        title: '编辑工单'
193
+      })
194
+    },
195
+    btn_detail(editId) {
196
+      this.$layer.iframe({
197
+        content: {
198
+          content: detail, // 传递的组件对象
199
+          parent: this, // 当前的vue对象
200
+          data: { 'rowid': editId }// props
201
+        },
202
+        area: ['80%', '90%'],
203
+        title: '工单详情'
204
+      })
205
+    },
206
+    btn_delete(editId) {
207
+      this.$confirm('您确定要将此工单删除吗?', '提示', {
208
+        confirmButtonText: '确定',
209
+        cancelButtonText: '取消',
210
+        type: 'warning'
211
+      }).then(() => {
212
+        deleteOrder(editId).then(response => {
213
+          if (response.state.toLowerCase() === 'success') {
214
+            this.getList()
215
+            this.$message.success('删除成功!')
216
+          }
217
+        })
218
+      }).catch(() => {
219
+        this.$message.info('已取消删除')
220
+      })
221
+    },
222
+    // 获取省市下拉数据
223
+    getProCity() {
224
+      return new Promise(resolve => {
225
+        getProviceCity().then(response => {
226
+          if (response.state.toLowerCase() === 'success') {
227
+            this.provinceCityDatas = response.data
228
+          }
229
+        })
230
+        resolve()
231
+      })
232
+    },
233
+    // 获取工单来源
234
+    getOrderSource() {
235
+      return new Promise(resolve => {
236
+        getDictionary('GDLY').then(response => {
237
+          if (response.state.toLowerCase() === 'success') {
238
+            this.sourceOptions = response.data
239
+          }
240
+        })
241
+        resolve()
242
+      })
243
+    },
244
+    // 获取工单类型
245
+    getOrderType() {
246
+      return new Promise(resolve => {
247
+        getDictionary('GDLX').then(response => {
248
+          if (response.state.toLowerCase() === 'success') {
249
+            this.typeOptions = response.data
250
+          }
251
+        })
252
+        resolve()
253
+      })
254
+    }
255
+  }
256
+}
257
+</script>
258
+
259
+<style rel="stylesheet/scss" lang="scss" scoped>
260
+
261
+</style>

+ 304 - 0
fuwaiCallCenterWeb.UI/src/views/appointment/orderCreate/index.1.vue

@@ -0,0 +1,304 @@
1
+<template>
2
+  <div class="app-container">
3
+    <el-row :gutter="24">
4
+      <el-col :span="20" :offset="1" class="creat_order">
5
+        <!-- <el-card shadow="hover"> -->
6
+        <div v-loading="loading">
7
+          <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="150px" class="order_form">
8
+            <el-form-item label="工单来源" prop="sourceid">
9
+              <el-select v-model="ruleForm.sourceid" class="form_select" filterable clearable placeholder="请选择工单来源">
10
+                <el-option v-for="item in sourceOptions" :key="item.id" :label="item.name" :value="item.id"/>
11
+              </el-select>
12
+            </el-form-item>
13
+            <el-form-item label="工单类型" prop="typeid">
14
+              <el-select v-model="ruleForm.typeid" class="form_select" filterable clearable placeholder="请选择工单类型">
15
+                <el-option v-for="item in typeOptions" :key="item.id" :label="item.name" :value="item.id"/>
16
+              </el-select>
17
+            </el-form-item>
18
+            <el-form-item label="客户姓名" prop="name">
19
+              <el-input v-model="ruleForm.name" placeholder="请输入客户姓名"/>
20
+            </el-form-item>
21
+            <el-form-item label="客户电话" prop="phone">
22
+              <el-input v-model="ruleForm.phone" placeholder="请输入客户电话"/>
23
+            </el-form-item>
24
+            <el-form-item label="性别" prop="sex">
25
+              <el-radio-group v-model="ruleForm.sex">
26
+                <el-radio label="男">男</el-radio>
27
+                <el-radio label="女">女</el-radio>
28
+              </el-radio-group>
29
+            </el-form-item>
30
+            <el-form-item label="所在地" prop="provinceCity">
31
+              <el-cascader
32
+                v-model="provinceCity"
33
+                :options="provinceCityDatas"
34
+                :props="props"
35
+                placeholder="请选择省市"
36
+                class="form_select"
37
+                clearable
38
+                filterable
39
+                change-on-select/>
40
+            </el-form-item>
41
+            <el-form-item label="具体地址" prop="address">
42
+              <el-input v-model="ruleForm.address" placeholder="请输入具体地址"/>
43
+            </el-form-item>
44
+            <el-form-item label="工单内容" prop="content">
45
+              <el-input :autosize="{ minRows: 4}" v-model="ruleForm.content" type="textarea" placeholder="请输入工单内容"/>
46
+            </el-form-item>
47
+            <el-form-item label="附件" prop="files">
48
+              <el-upload
49
+                ref="upload"
50
+                :http-request="upload"
51
+                :on-success="uploadSuccess"
52
+                :on-error="uploadError"
53
+                :on-remove="uploadRemove"
54
+                class="uploadFiles"
55
+                list-type="picture"
56
+                action="string"
57
+                multiple>
58
+                <!-- 								<el-upload
59
+									ref="upload"
60
+									class="uploadFiles"
61
+									list-type="picture"
62
+									multiple
63
+									:action= uploadData.uploadUrl
64
+									:data = uploadData.uploaderFiles
65
+									:on-success="uploadSuccess"
66
+									:on-error="uploadError"
67
+									:on-remove="uploadRemove"> -->
68
+                <el-button size="small" type="primary">点击上传</el-button>
69
+                <!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div> -->
70
+                <!-- <i class="el-icon-plus"></i> -->
71
+              </el-upload>
72
+            </el-form-item>
73
+            <el-form-item>
74
+              <el-button type="primary" @click="submitForm">保存</el-button>
75
+              <el-button @click="resetForm">重置</el-button>
76
+            </el-form-item>
77
+          </el-form>
78
+        </div>
79
+        <!-- </el-card> -->
80
+      </el-col>
81
+    </el-row>
82
+  </div>
83
+</template>
84
+
85
+<script>
86
+import { getProviceCity, getDictionary, uploadFile } from '@/api/commonAPI'
87
+import { addOrder } from '@/api/order/orderSearch'
88
+import { validateTel } from '@/utils/validate'
89
+import { delFiles, filterContent } from '@/utils'
90
+
91
+const validateTelRule = (rule, value, callback) => {
92
+  if (!validateTel(value)) {
93
+    callback(new Error('请输入有效的客户电话!'))
94
+  } else {
95
+    callback()
96
+  }
97
+}
98
+
99
+export default {
100
+  name: 'OrderCreate',
101
+  data() {
102
+    return {
103
+      uploadData: {// 文件上传数据
104
+        uploadUrl: this.$store.getters.serverConfig.BASE_API + 'fileserverapi/Api/Upload',
105
+        uploaderFiles: {// 上传文件的参数 //是	string	模块code,如:test
106
+          uploadtype: 'orderFiles'
107
+        }
108
+      },
109
+      provinceCity: [], // 省市下拉绑定的值
110
+      provinceCityDatas: [], // 省市下拉数据
111
+      props: { // 自定义省市下拉数据的key值
112
+        value: 'code',
113
+        label: 'name',
114
+        children: 'entityJson'
115
+      },
116
+      sourceOptions: [], // 工单来源下拉数据
117
+      typeOptions: [], // 工单类型下拉数据
118
+      ruleForm: {
119
+        ordercode: '',
120
+        sourceid: '', //	否	string	来源id
121
+        typeid: '', //	否	string	类型id
122
+        name: '', //	否	string	姓名
123
+        phone: '', //	是	string	号码
124
+        sex: '男', //	否	string	性别
125
+        province: '', //	否	string	省code
126
+        city: '', //	否	string	市code
127
+        address: '', //	否	string	地址
128
+        // deptid: '', //	否	string	部门id
129
+        content: '', //	是	string	工单内容
130
+        files: [] // 否	list	附件json
131
+      },
132
+      rules: {
133
+        sourceid: [{
134
+          required: true,
135
+          message: '请选择工单来源',
136
+          trigger: 'blur'
137
+        }],
138
+        typeid: [{
139
+          required: true,
140
+          message: '请选择工单类型',
141
+          trigger: 'blur'
142
+        }],
143
+        name: [{
144
+          required: true,
145
+          message: '请输入客户姓名',
146
+          trigger: 'blur'
147
+        }],
148
+        phone: [{
149
+          required: true,
150
+          trigger: 'blur',
151
+          validator: validateTelRule
152
+        }]
153
+      },
154
+      loading: false
155
+    }
156
+  },
157
+  created() {
158
+    this.getOrderSource()
159
+    this.getOrderType()
160
+    this.getProCity()
161
+  },
162
+  methods: {
163
+    submitForm() {
164
+      this.$refs.ruleForm.validate((valid) => {
165
+        if (valid) {
166
+          this.ruleForm.province = this.provinceCity && this.provinceCity[0]
167
+          this.ruleForm.city = this.provinceCity && this.provinceCity[1]
168
+          this.ruleForm.content = filterContent.delHtmlTag(this.ruleForm.content)// 保存内容时去掉 html 标签
169
+          this.loading = true
170
+          addOrder(this.ruleForm).then(response => {
171
+            this.loading = false
172
+            if (response.state.toLowerCase() === 'success') {
173
+              this.ruleForm.files = []
174
+              this.$refs.upload.clearFiles()	// 清空已上传的文件列表(该方法不支持在 before-upload 中调用)
175
+              this.provinceCity = []
176
+              this.$refs.ruleForm.resetFields()
177
+              this.$message.success('恭喜你,工单信息添加成功!')
178
+            }
179
+          }).catch(() => {
180
+            this.loading = false
181
+          })
182
+        } else {
183
+          this.$message.error('请输入有效的必填项信息!')
184
+          return false
185
+        }
186
+      })
187
+    },
188
+    resetForm() {
189
+      if (this.ruleForm.files.length > 0) {
190
+        for (let i = this.ruleForm.files.length - 1; i >= 0; i--) {
191
+          delFiles(this.ruleForm.files[i].filesmallurl, this.ruleForm.files[i].fileurl)
192
+          this.ruleForm.files.splice(i, 1)
193
+        }
194
+      }
195
+      this.$refs.upload.clearFiles()	// 清空已上传的文件列表(该方法不支持在 before-upload 中调用)
196
+      this.provinceCity = []
197
+      this.$refs.ruleForm.resetFields()
198
+    },
199
+    // 获取省市下拉数据
200
+    getProCity() {
201
+      return new Promise(resolve => {
202
+        getProviceCity().then(response => {
203
+          if (response.state.toLowerCase() === 'success') {
204
+            this.provinceCityDatas = response.data
205
+          }
206
+        })
207
+        resolve()
208
+      })
209
+    },
210
+    // 获取工单来源
211
+    getOrderSource() {
212
+      return new Promise(resolve => {
213
+        getDictionary('GDLY').then(response => {
214
+          if (response.state.toLowerCase() === 'success') {
215
+            this.sourceOptions = response.data
216
+          }
217
+        })
218
+        resolve()
219
+      })
220
+    },
221
+    // 获取工单类型
222
+    getOrderType() {
223
+      return new Promise(resolve => {
224
+        getDictionary('GDLX').then(response => {
225
+          if (response.state.toLowerCase() === 'success') {
226
+            this.typeOptions = response.data
227
+          }
228
+        })
229
+        resolve()
230
+      })
231
+    },
232
+    // 文件上传
233
+    uploadSuccess(response, file, fileList) {
234
+      if (response.state.toLowerCase() === 'success') {
235
+        this.ruleForm.files.push(response.data[0])
236
+      } else {
237
+        this.$message.error(response.message)
238
+      }
239
+    },
240
+    uploadRemove(file, fileList) {
241
+      if (this.ruleForm.files.length > 0) {
242
+        for (let i = 0, len = this.ruleForm.files.length; i < len; i++) {
243
+          if (this.ruleForm.files[i].filename === file.name) {
244
+            delFiles(this.ruleForm.files[i].filesmallurl, this.ruleForm.files[i].fileurl)
245
+            this.ruleForm.files.splice(i, 1)
246
+            return
247
+          }
248
+        }
249
+      }
250
+    },
251
+    uploadError(err, file, fileList) {
252
+      // console.log(err)
253
+      this.$message.error(err)
254
+    },
255
+
256
+    upload(item) {
257
+      debugger
258
+
259
+      const formData = new FormData()
260
+      formData.append('file', item.file)
261
+      formData.append('uploadtype', 'orderFiles')
262
+
263
+      console.dir(formData)
264
+
265
+      console.log('上传图片接口-参数', item.file)
266
+      uploadFile({
267
+        file: item.file,
268
+        uploadtype: 'orderFiles'
269
+      }).then(res => {
270
+        console.log('上传图片接口-数据', res)
271
+      }).catch(err => {
272
+        this.$message.error('上传失败,请重新上传')
273
+        console.log('报错', err)
274
+      })
275
+    }
276
+
277
+  }
278
+}
279
+</script>
280
+
281
+<style rel="stylesheet/scss" lang="scss">
282
+	.order_form .form_select{
283
+		width: 100%;
284
+	}
285
+	.order_form .uploadFiles .el-upload-list--picture{
286
+		margin-right: -1%;
287
+	}
288
+	.order_form .el-upload-list--picture li{
289
+		width: 24%;
290
+		margin-right: 1%;
291
+		float: left;
292
+	}
293
+	.creat_order .el-card__body{
294
+		padding-top: 60px;
295
+    padding-bottom: 60px;
296
+	}
297
+</style>
298
+
299
+<style rel="stylesheet/scss" lang="scss" scoped>
300
+	.creat_order{
301
+		margin-top: 20px;
302
+		padding-top: 40px;
303
+	}
304
+</style>

+ 272 - 0
fuwaiCallCenterWeb.UI/src/views/appointment/orderCreate/index.vue

@@ -0,0 +1,272 @@
1
+<template>
2
+  <div class="app-container">
3
+    <el-row :gutter="24">
4
+      <el-col :span="20" :offset="1" class="creat_order">
5
+        <!-- <el-card shadow="hover"> -->
6
+        <div v-loading="loading">
7
+          <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="150px" class="order_form">
8
+            <el-form-item label="工单来源" prop="sourceid">
9
+              <el-select v-model="ruleForm.sourceid" class="form_select" filterable clearable placeholder="请选择工单来源">
10
+                <el-option v-for="item in sourceOptions" :key="item.id" :label="item.name" :value="item.id"/>
11
+              </el-select>
12
+            </el-form-item>
13
+            <el-form-item label="工单类型" prop="typeid">
14
+              <el-select v-model="ruleForm.typeid" class="form_select" filterable clearable placeholder="请选择工单类型">
15
+                <el-option v-for="item in typeOptions" :key="item.id" :label="item.name" :value="item.id"/>
16
+              </el-select>
17
+            </el-form-item>
18
+            <el-form-item label="客户姓名" prop="name">
19
+              <el-input v-model="ruleForm.name" placeholder="请输入客户姓名"/>
20
+            </el-form-item>
21
+            <el-form-item label="客户电话" prop="phone">
22
+              <el-input v-model="ruleForm.phone" placeholder="请输入客户电话"/>
23
+            </el-form-item>
24
+            <el-form-item label="性别" prop="sex">
25
+              <el-radio-group v-model="ruleForm.sex">
26
+                <el-radio label="男">男</el-radio>
27
+                <el-radio label="女">女</el-radio>
28
+              </el-radio-group>
29
+            </el-form-item>
30
+            <el-form-item label="所在地" prop="provinceCity">
31
+              <el-cascader
32
+                v-model="provinceCity"
33
+                :options="provinceCityDatas"
34
+                :props="props"
35
+                placeholder="请选择省市"
36
+                class="form_select"
37
+                clearable
38
+                filterable
39
+                change-on-select/>
40
+            </el-form-item>
41
+            <el-form-item label="具体地址" prop="address">
42
+              <el-input v-model="ruleForm.address" placeholder="请输入具体地址"/>
43
+            </el-form-item>
44
+            <el-form-item label="工单内容" prop="content">
45
+              <el-input :autosize="{ minRows: 4}" v-model="ruleForm.content" type="textarea" placeholder="请输入工单内容"/>
46
+            </el-form-item>
47
+            <el-form-item label="附件" prop="files">
48
+              <el-upload
49
+                ref="upload"
50
+                :action= "uploadData.uploadUrl"
51
+                :data = "uploadData.uploaderFiles"
52
+                :on-success="uploadSuccess"
53
+                :on-error="uploadError"
54
+                :on-remove="uploadRemove"
55
+                class="uploadFiles"
56
+                list-type="picture"
57
+                multiple>
58
+                <el-button size="small" type="primary">点击上传</el-button>
59
+                <!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div> -->
60
+                <!-- <i class="el-icon-plus"></i> -->
61
+              </el-upload>
62
+            </el-form-item>
63
+            <el-form-item>
64
+              <el-button type="primary" @click="submitForm">保存</el-button>
65
+              <el-button @click="resetForm">重置</el-button>
66
+            </el-form-item>
67
+          </el-form>
68
+        </div>
69
+        <!-- </el-card> -->
70
+      </el-col>
71
+    </el-row>
72
+  </div>
73
+</template>
74
+
75
+<script>
76
+import { getProviceCity, getDictionary } from '@/api/commonAPI'
77
+import { addOrder } from '@/api/order/orderSearch'
78
+import { validateTel } from '@/utils/validate'
79
+import { delFiles, filterContent } from '@/utils'
80
+
81
+const validateTelRule = (rule, value, callback) => {
82
+  if (!validateTel(value)) {
83
+    callback(new Error('请输入有效的客户电话!'))
84
+  } else {
85
+    callback()
86
+  }
87
+}
88
+
89
+export default {
90
+  name: 'OrderCreate',
91
+  data() {
92
+    return {
93
+      uploadData: {// 文件上传数据
94
+        uploadUrl: this.$store.getters.serverConfig.BASE_API + 'fileserverapi/Api/Upload',
95
+        uploaderFiles: {// 上传文件的参数 //是	string	模块code,如:test
96
+          uploadtype: 'orderFiles'
97
+        }
98
+      },
99
+      provinceCity: [], // 省市下拉绑定的值
100
+      provinceCityDatas: [], // 省市下拉数据
101
+      props: { // 自定义省市下拉数据的key值
102
+        value: 'code',
103
+        label: 'name',
104
+        children: 'entityJson'
105
+      },
106
+      sourceOptions: [], // 工单来源下拉数据
107
+      typeOptions: [], // 工单类型下拉数据
108
+      ruleForm: {
109
+        ordercode: '',
110
+        sourceid: '', //	否	string	来源id
111
+        typeid: '', //	否	string	类型id
112
+        name: '', //	否	string	姓名
113
+        phone: '', //	是	string	号码
114
+        sex: '男', //	否	string	性别
115
+        province: '', //	否	string	省code
116
+        city: '', //	否	string	市code
117
+        address: '', //	否	string	地址
118
+        // deptid: '', //	否	string	部门id
119
+        content: '', //	是	string	工单内容
120
+        files: [] // 否	list	附件json
121
+      },
122
+      rules: {
123
+        sourceid: [{
124
+          required: true,
125
+          message: '请选择工单来源',
126
+          trigger: 'blur'
127
+        }],
128
+        typeid: [{
129
+          required: true,
130
+          message: '请选择工单类型',
131
+          trigger: 'blur'
132
+        }],
133
+        name: [{
134
+          required: true,
135
+          message: '请输入客户姓名',
136
+          trigger: 'blur'
137
+        }],
138
+        phone: [{
139
+          required: true,
140
+          trigger: 'blur',
141
+          validator: validateTelRule
142
+        }]
143
+      },
144
+      loading: false
145
+    }
146
+  },
147
+  created() {
148
+    this.getOrderSource()
149
+    this.getOrderType()
150
+    this.getProCity()
151
+  },
152
+  methods: {
153
+    submitForm() {
154
+      this.$refs.ruleForm.validate((valid) => {
155
+        if (valid) {
156
+          this.ruleForm.province = this.provinceCity && this.provinceCity[0]
157
+          this.ruleForm.city = this.provinceCity && this.provinceCity[1]
158
+          this.ruleForm.content = filterContent.delHtmlTag(this.ruleForm.content)// 保存内容时去掉 html 标签
159
+          this.loading = true
160
+          addOrder(this.ruleForm).then(response => {
161
+            this.loading = false
162
+            if (response.state.toLowerCase() === 'success') {
163
+              this.ruleForm.files = []
164
+              this.$refs.upload.clearFiles()	// 清空已上传的文件列表(该方法不支持在 before-upload 中调用)
165
+              this.provinceCity = []
166
+              this.$refs.ruleForm.resetFields()
167
+              this.$message.success('恭喜你,工单信息添加成功!')
168
+            }
169
+          }).catch(() => {
170
+            this.loading = false
171
+          })
172
+        } else {
173
+          this.$message.error('请输入有效的必填项信息!')
174
+          return false
175
+        }
176
+      })
177
+    },
178
+    resetForm() {
179
+      if (this.ruleForm.files.length > 0) {
180
+        for (let i = this.ruleForm.files.length - 1; i >= 0; i--) {
181
+          delFiles(this.ruleForm.files[i].filesmallurl, this.ruleForm.files[i].fileurl)
182
+          this.ruleForm.files.splice(i, 1)
183
+        }
184
+      }
185
+      this.$refs.upload.clearFiles()	// 清空已上传的文件列表(该方法不支持在 before-upload 中调用)
186
+      this.provinceCity = []
187
+      this.$refs.ruleForm.resetFields()
188
+    },
189
+    // 获取省市下拉数据
190
+    getProCity() {
191
+      return new Promise(resolve => {
192
+        getProviceCity().then(response => {
193
+          if (response.state.toLowerCase() === 'success') {
194
+            this.provinceCityDatas = response.data
195
+          }
196
+        })
197
+        resolve()
198
+      })
199
+    },
200
+    // 获取工单来源
201
+    getOrderSource() {
202
+      return new Promise(resolve => {
203
+        getDictionary('GDLY').then(response => {
204
+          if (response.state.toLowerCase() === 'success') {
205
+            this.sourceOptions = response.data
206
+          }
207
+        })
208
+        resolve()
209
+      })
210
+    },
211
+    // 获取工单类型
212
+    getOrderType() {
213
+      return new Promise(resolve => {
214
+        getDictionary('GDLX').then(response => {
215
+          if (response.state.toLowerCase() === 'success') {
216
+            this.typeOptions = response.data
217
+          }
218
+        })
219
+        resolve()
220
+      })
221
+    },
222
+    // 文件上传
223
+    uploadSuccess(response, file, fileList) {
224
+      if (response.state.toLowerCase() === 'success') {
225
+        this.ruleForm.files.push(response.data[0])
226
+      } else {
227
+        this.$message.error(response.message)
228
+      }
229
+    },
230
+    uploadRemove(file, fileList) {
231
+      if (this.ruleForm.files.length > 0) {
232
+        for (let i = 0, len = this.ruleForm.files.length; i < len; i++) {
233
+          if (this.ruleForm.files[i].filename === file.name) {
234
+            delFiles(this.ruleForm.files[i].filesmallurl, this.ruleForm.files[i].fileurl)
235
+            this.ruleForm.files.splice(i, 1)
236
+            return
237
+          }
238
+        }
239
+      }
240
+    },
241
+    uploadError(err, file, fileList) {
242
+      // console.log(err)
243
+      this.$message.error(err)
244
+    }
245
+  }
246
+}
247
+</script>
248
+
249
+<style rel="stylesheet/scss" lang="scss">
250
+	.order_form .form_select{
251
+		width: 100%;
252
+	}
253
+	.order_form .uploadFiles .el-upload-list--picture{
254
+		margin-right: -1%;
255
+	}
256
+	.order_form .el-upload-list--picture li{
257
+		width: 24%;
258
+		margin-right: 1%;
259
+		float: left;
260
+	}
261
+	.creat_order .el-card__body{
262
+		padding-top: 60px;
263
+    padding-bottom: 60px;
264
+	}
265
+</style>
266
+
267
+<style rel="stylesheet/scss" lang="scss" scoped>
268
+	.creat_order{
269
+		margin-top: 20px;
270
+		padding-top: 40px;
271
+	}
272
+</style>

+ 2 - 2
fuwaiCallCenterWeb.UI/static/config/serverConfig.json

@@ -1,9 +1,9 @@
1 1
 {
2 2
   "NODE_ENV": "development",
3
-  "BASE_API": "http://192.168.5.42:28000/",
3
+  "BASE_API": "http://192.168.5.60:28000/",
4 4
   "SOCKET_IP": "192.168.5.41",
5 5
   "SOCKET_PORT": "28822",
6
-  "LineChat_SOCKET_IP": "192.168.5.42",
6
+  "LineChat_SOCKET_IP": "192.168.5.60",
7 7
   "LineChat_SOCKET_PORT": "28300",
8 8
   "PAGESIZES": "[10, 20, 50, 100]",
9 9
   "PAGESIZE": "10",