weieryang %!s(int64=3) %!d(string=hace) años
padre
commit
a51ce9d1f3

+ 93 - 75
CallCenterWeb.UI/RMYY/src/views/callScreen/components/knowledgeList.vue

@@ -5,99 +5,117 @@
5 5
       <el-button type="primary" class="filter-item" size="medium" @click="btn_search_task">搜索
6 6
       </el-button>
7 7
     </div>
8
-    <el-table :data="taskDataLists" border stripe>
8
+    <el-table :data="taskDataLists" :highlight-current-row="true" border stripe @row-click="handleRow">
9 9
       <el-table-column :show-overflow-tooltip="true" prop="F_Title" label="标题" align="center" />
10 10
       <el-table-column :show-overflow-tooltip="true" prop="F_Content" label="内容" align="center" />
11 11
       <el-table-column :show-overflow-tooltip="true" prop="F_KeyWords" label="关键字" align="center" />
12 12
     </el-table>
13
-    <pagination v-show="pageParams.total > 0" :total="pageParams.total" :page-sizes="[5, 10, 15, 20]"
14
-      :pageindex.sync="pageParams.pageindex" :pagesize.sync="pageParams.pagesize" class="pagination"
13
+    <pagination
14
+      v-show="pageParams.total > 0"
15
+      :total="pageParams.total"
16
+      :page-sizes="[5, 10, 15, 20]"
17
+      :pageindex.sync="pageParams.pageindex"
18
+      :pagesize.sync="pageParams.pagesize"
19
+      class="pagination"
15 20
       @pagination="getList" />
16 21
   </div>
17 22
 </template>
18 23
 
19 24
 <script>
20
-  import {
21
-    getList,
22
-    delInfos,
23
-    getTypeTree
24
-  } from '@/api/knowledgeBase/knowledgeBase'
25
-
26
-  import Pagination from '@/components/context/Pagination' // 对el-pagination 二次封装
27
-  export default {
28
-    name: 'KnowledgeList',
29
-    components: {
30
-      Pagination
31
-    },
32
-    props: {
33
-      callinNum: {
34
-        type: String,
35
-        default: ''
36
-      }
37
-    },
25
+import {
26
+  getList,
27
+  delInfos,
28
+  getTypeTree
29
+} from '@/api/knowledgeBase/knowledgeBase'
30
+import knowledgeDetail from '../../knowledgeBase/knowledgeList/components/detail.vue'
31
+import Pagination from '@/components/context/Pagination' // 对el-pagination 二次封装
32
+export default {
33
+  name: 'KnowledgeList',
34
+  components: {
35
+    Pagination
36
+  },
37
+  props: {
38
+    callinNum: {
39
+      type: String,
40
+      default: ''
41
+    }
42
+  },
38 43
 
39
-    data() {
40
-      return {
41
-        callNum: '', // 来电号码
42
-        loading: false,
43
-        typeSecondId: '',
44
-        typeid: '',
45
-        keyword: '',
46
-        pageParams: {
47
-          pageindex: 1, // 当前第几页
48
-          pagesize: 5, // 每页几条数据
49
-          total: 0 // 总共多少数据
50
-        },
51
-        taskDataLists: [] // 列表数据
44
+  data() {
45
+    return {
46
+      callNum: '', // 来电号码
47
+      loading: false,
48
+      typeSecondId: '',
49
+      typeid: '',
50
+      keyword: '',
51
+      pageParams: {
52
+        pageindex: 1, // 当前第几页
53
+        pagesize: 5, // 每页几条数据
54
+        total: 0 // 总共多少数据
55
+      },
56
+      taskDataLists: [] // 列表数据
57
+    }
58
+  },
59
+  created() {
60
+    this.$bus.$on('typeSecondId', (params) => {
61
+      if (params != 0) {
62
+        this.typeSecondId = params
63
+        // console.log(this.typeSecondId,'ppp')
64
+        this.getList()
52 65
       }
53
-    },
54
-    created() {
55
-      this.$bus.$on('typeSecondId', (params) => {
56
-        if (params != 0) {
57
-          this.typeSecondId = params
58
-          // console.log(this.typeSecondId,'ppp')
59
-          this.getList()
66
+    })
67
+  },
68
+  methods: {
69
+    getList() {
70
+      this.loading = true
71
+      return new Promise(resolve => {
72
+        const params = {
73
+          pageindex: this.pageParams.pageindex, // 第几页
74
+          pagesize: this.pageParams.pagesize, // 每页几条信息
75
+          keywords: this.keyword,
76
+          typeid: this.typeSecondId
60 77
         }
78
+        getList(params).then(response => {
79
+          this.loading = false
80
+          if (response.state.toLowerCase() === 'success') {
81
+            if (response.total == null) {
82
+              this.pageParams.total = 0
83
+            } else {
84
+              this.pageParams.total = response.total
85
+            }
86
+            this.taskDataLists = response.rows
87
+          }
88
+        })
89
+        resolve()
61 90
       })
62 91
     },
63
-    methods: {
64
-      getList() {
65
-        this.loading = true
66
-        return new Promise(resolve => {
67
-          const params = {
68
-            pageindex: this.pageParams.pageindex, // 第几页
69
-            pagesize: this.pageParams.pagesize, // 每页几条信息
70
-            keywords: this.keyword,
71
-            typeid: this.typeSecondId
72
-          }
73
-          getList(params).then(response => {
74
-            this.loading = false
75
-            if (response.state.toLowerCase() === 'success') {
76
-              if (response.total == null) {
77
-                this.pageParams.total = 0
78
-              } else {
79
-                this.pageParams.total = response.total
80
-              }
81
-              this.taskDataLists = response.rows
82
-            }
83
-          })
84
-          resolve()
92
+    btn_search_task() {
93
+      if (this.typeSecondId) {
94
+        this.keyword = this.keyword
95
+        this.getList()
96
+      } else {
97
+        this.$message({
98
+          message: '请输入工单类型',
99
+          type: 'warning'
85 100
         })
86
-      },
87
-      btn_search_task() {
88
-        if (this.typeSecondId) {
89
-          this.keyword = this.keyword
90
-          this.getList()
91
-        } else {
92
-          this.$message({
93
-            message: '请输入工单类型',
94
-            type: 'warning'
95
-          })
96
-          return
97
-        }
101
+        return
98 102
       }
103
+    },
104
+    handleRow(row) {
105
+      this.$layer.iframe({
106
+        content: {
107
+          content: knowledgeDetail, // 传递的组件对象
108
+          parent: this, // 当前的vue对象
109
+          data: {
110
+            rowid: row.F_Id.toString()
111
+          } // props
112
+        },
113
+        area: ['50%', '55%'],
114
+        title: '知识库详情'
115
+      })
99 116
     }
100 117
   }
118
+}
101 119
 </script>
102 120
 
103 121
 <style rel="stylesheet/scss" lang="scss">

+ 24 - 1
CallCenterWeb.UI/RMYY/src/views/comDispatch/components/dispatchdetail.vue

@@ -53,7 +53,8 @@
53 53
                 <th>附件:</th>
54 54
                 <td colspan="5" style="text-align: left;padding: 5px 10px;">
55 55
                   <div class="imglist">
56
-                    <img v-for="(item,index) in orderDetailData.FileUrl" :key="index" :src="item.F_FileUrl" @click="bigImg(item.F_FileUrl)">
56
+                    <img v-for="(item,index) in imgFiles" :key="index" :src="item.F_FileUrl" @click="bigImg(item.F_FileUrl)">
57
+                    <a v-for="(item,index) in otherFiles" :key="index" :href="item.F_FileUrl" :download="item.F_FileName">{{ item.F_FileName.substring(19,item.F_FileName.length) }}</a>
57 58
                   </div>
58 59
                 </td>
59 60
               </tr>
@@ -136,6 +137,8 @@ export default {
136 137
       imgUrl: '',
137 138
       dialogImgVisible: false,
138 139
       activeName: '1',
140
+      imgFiles: [],
141
+      otherFiles: [],
139 142
       ChatList: [], // 备注详情列表
140 143
       orderDetailData: {
141 144
         F_CallID: '',
@@ -214,6 +217,21 @@ export default {
214 217
         } else {
215 218
           const res = response.data[0]
216 219
           this.orderDetailData = res
220
+          const imgs = []
221
+          const others = []
222
+          if (this.orderDetailData.FileUrl.length > 0) {
223
+            this.orderDetailData.FileUrl.forEach(function(v, n) {
224
+              if (v.F_FileType == '.jpg' || v.F_FileType == '.png') {
225
+                imgs.push(v)
226
+              } else {
227
+                others.push(v)
228
+              }
229
+            })
230
+            this.imgFiles = imgs
231
+            this.otherFiles = others
232
+            console.log(imgs, '111')
233
+            console.log(others, '222')
234
+          }
217 235
           this.orderDetailData.F_TypeName2 = this.$store.getters.workTypeMap[parseInt(res.F_WorkOrderCategory)]
218 236
             .text // 工单子类
219 237
         }
@@ -320,6 +338,11 @@ export default {
320 338
       width: 72px;
321 339
       height: 72px;
322 340
       margin-right: 15px;
341
+      vertical-align: middle
342
+    }
343
+    .imglist a {
344
+      margin-right: 15px;
345
+      color: #64b3e7;
323 346
     }
324 347
 
325 348
     .order_detail_body {

+ 84 - 0
CallCenterWeb.UI/RMYY/src/views/knowledgeBase/knowledgeList/components/detail.vue

@@ -0,0 +1,84 @@
1
+<template>
2
+  <div id="box">
3
+    <p class="title"> {{ noticeData.F_Title }}</p>
4
+    <div class="permsg">
5
+      <b>发布人:</b><span class="pername">{{ noticeData.F_CreateName }}</span>
6
+      <b>发布时间:</b><span>{{ noticeData.F_CreateTime }}</span>
7
+      <b>关键字:</b><span>{{ noticeData.F_KeyWords }}</span>
8
+    </div>
9
+    <div class="content" v-html="noticeData.F_Content">
10
+      <!-- {{noticeData.F_Content}} -->
11
+    </div>
12
+  </div>
13
+</template>
14
+
15
+<script>
16
+import { getModel } from '@/api/knowledgeBase/knowledgeBase'
17
+export default {
18
+  name: 'Detail',
19
+  props: {
20
+    rowdata: {
21
+      type: String,
22
+      default: ''
23
+    },
24
+    rowid: {
25
+      type: String,
26
+      default: ''
27
+    }
28
+  },
29
+  data() {
30
+    return {
31
+      noticeData: {},
32
+      dialogImgVisible: false,
33
+      imgUrl: ''
34
+    }
35
+  },
36
+  watch: {
37
+
38
+  },
39
+  created() {
40
+    if (this.rowid) {
41
+      this.getDetail()
42
+    }
43
+  },
44
+  methods: {
45
+    getDetail() {
46
+      const params = {
47
+        kid: this.rowid
48
+      }
49
+      getModel(params).then(res => {
50
+        this.noticeData = res.data
51
+      })
52
+    }
53
+  }
54
+}
55
+</script>
56
+
57
+<style>
58
+  #box {
59
+    padding: 0px 50px
60
+  }
61
+
62
+  .title {
63
+    font-size: 30px;
64
+    text-align: center;
65
+  }
66
+
67
+  .permsg {
68
+    text-align: center;
69
+    margin-bottom: 25px
70
+  }
71
+  .content{
72
+    margin-bottom: 25px;
73
+  }
74
+
75
+  .pername {
76
+    margin-right: 10px;
77
+  }
78
+  .imgs img{
79
+    width: 100px;
80
+    height: 100px;
81
+    margin-right: 20px;
82
+    vertical-align: middle;
83
+  }
84
+</style>

+ 166 - 143
CallCenterWeb.UI/RMYY/src/views/knowledgeBase/knowledgeList/index.vue

@@ -13,187 +13,210 @@
13 13
           </el-button>
14 14
           <el-button v-permission="'add_knowledgeList'" type="primary" class="filter-item" size="mini" @click="btn_add">
15 15
             添加</el-button>
16
-          <el-button  type="primary" class="filter-item" size="mini" @click="btn_import">
16
+          <el-button type="primary" class="filter-item" size="mini" @click="btn_import">
17 17
             导入</el-button>
18 18
         </div>
19
-        <el-table :data="taskDataLists" border stripe highlight-current-row>
19
+        <el-table :data="taskDataLists" border stripe highlight-current-row @row-click="handleRow">
20 20
           <el-table-column :show-overflow-tooltip="true" fixed prop="F_Title" label="标题" align="center" />
21 21
           <el-table-column :show-overflow-tooltip="true" prop="F_Content" label="内容" align="center" />
22 22
           <el-table-column :show-overflow-tooltip="true" prop="F_KeyWords" label="关键字" align="center" />
23
-          <el-table-column label="操作" width="240" align="center" class-name="oparate_btn" fixed="right">
23
+          <el-table-column label="操作" width="240" align="center" class-name="oparate_btn">
24 24
             <template slot-scope="scope">
25
-              <el-button v-permission="'edit_knowledgeList'" size="mini" plain type="primary"
25
+              <el-button
26
+                v-permission="'edit_knowledgeList'"
27
+                type="text"
26 28
                 @click.stop="btn_edit(scope.row.F_Id)">编辑</el-button>
27
-              <el-button v-permission="'delete_knowledgeList'" size="mini" plain type="danger"
29
+              <el-button
30
+                v-permission="'delete_knowledgeList'"
31
+                type="text"
28 32
                 @click.stop="btn_delete_task(scope.row.F_Id)">删除</el-button>
29 33
             </template>
30 34
           </el-table-column>
31 35
         </el-table>
32
-        <pagination v-show="pageParams.total > 0" :total="pageParams.total" :pageindex.sync="pageParams.pageindex"
33
-          :pagesize.sync="pageParams.pagesize" class="pagination" @pagination="getListTask" />
36
+        <pagination
37
+          v-show="pageParams.total > 0"
38
+          :total="pageParams.total"
39
+          :pageindex.sync="pageParams.pageindex"
40
+          :pagesize.sync="pageParams.pagesize"
41
+          class="pagination"
42
+          @pagination="getListTask" />
34 43
       </el-col>
35 44
     </el-row>
36 45
   </div>
37 46
 </template>
38 47
 
39 48
 <script>
40
-  // import { pickerOptions, formatterContent } from '@/utils'
49
+// import { pickerOptions, formatterContent } from '@/utils'
41 50
 
42
-  import {
43
-    getList,
44
-    delInfos,
45
-    getTypeTree
46
-  } from '@/api/knowledgeBase/knowledgeBase'
47
-  import Pagination from '@/components/context/Pagination' // 对el-pagination 二次封装
48
-  import addOrEdit from './components/addOrEdit'
49
-  import Export from './components/export'
50
-  export default {
51
-    name: 'KnowledgeList',
52
-    components: {
53
-      Pagination
54
-    },
55
-    data() {
56
-      return {
57
-        keyword: '',
58
-        typeid: '',
59
-        pageParams: {
60
-          pageindex: 1, // 当前第几页
61
-          pagesize: Number(this.$store.getters.serverConfig.PAGESIZE), // 每页几条数据
62
-          total: 0 // 总共多少数据
63
-        },
64
-        taskDataLists: [], // 客户信息列表数据
65
-        dataTree: [],
66
-        defaultProps: {
67
-          children: 'children',
68
-          label: 'text'
69
-        }
51
+import {
52
+  getList,
53
+  delInfos,
54
+  getTypeTree
55
+} from '@/api/knowledgeBase/knowledgeBase'
56
+import Pagination from '@/components/context/Pagination' // 对el-pagination 二次封装
57
+import addOrEdit from './components/addOrEdit'
58
+import knowledgeDetail from './components/detail.vue'
59
+import Export from './components/export'
60
+export default {
61
+  name: 'KnowledgeList',
62
+  components: {
63
+    Pagination
64
+  },
65
+  data() {
66
+    return {
67
+      keyword: '',
68
+      typeid: '',
69
+      pageParams: {
70
+        pageindex: 1, // 当前第几页
71
+        pagesize: Number(this.$store.getters.serverConfig.PAGESIZE), // 每页几条数据
72
+        total: 0 // 总共多少数据
73
+      },
74
+      taskDataLists: [], // 客户信息列表数据
75
+      dataTree: [],
76
+      defaultProps: {
77
+        children: 'children',
78
+        label: 'text'
70 79
       }
80
+    }
81
+  },
82
+  computed: {},
83
+  created() {
84
+    this.getTypeTreeList()
85
+  },
86
+  methods: {
87
+    handleNodeClick(data) {
88
+      this.typeid = data.id
89
+      this.getListTask()
71 90
     },
72
-    computed: {},
73
-    created() {
74
-      this.getTypeTreeList()
75
-    },
76
-    methods: {
77
-      handleNodeClick(data) {
78
-        this.typeid = data.id
79
-        this.getListTask()
80
-      },
81
-      getTypeTreeList() {
82
-        return new Promise((resolve) => {
83
-          getTypeTree().then((response) => {
84
-            if (response.state.toLowerCase() === 'success') {
85
-              this.dataTree = response.data
86
-            }
87
-          })
88
-          resolve()
89
-        })
90
-      },
91
-      getListTask() {
92
-        return new Promise((resolve) => {
93
-          const params = {
94
-            pageindex: this.pageParams.pageindex, // int 第几页
95
-            pagesize: this.pageParams.pagesize, // int 每页几条信息
96
-            keywords: this.keyword, // 客户名称
97
-            typeid: this.typeid // 联系电话
91
+    getTypeTreeList() {
92
+      return new Promise((resolve) => {
93
+        getTypeTree().then((response) => {
94
+          if (response.state.toLowerCase() === 'success') {
95
+            this.dataTree = response.data
98 96
           }
99
-          getList(params).then((response) => {
100
-            this.taskDataLists = response.rows
101
-          })
102
-          resolve()
103 97
         })
104
-      },
105
-      btn_search_task() {
106
-        if (this.typeid) {
107
-          this.keyword = this.keyword
108
-          this.getListTask()
109
-        } else {
110
-          this.$message({
111
-            message: '请选择知识库类别',
112
-            type: 'warning'
113
-          })
114
-          return
115
-        }
116
-      },
117
-      btn_add() {
118
-        if (this.typeid) {
119
-          console.log(typeof this.typeid)
120
-          this.$layer.iframe({
121
-            content: {
122
-              content: addOrEdit, // 传递的组件对象
123
-              parent: this, // 当前的vue对象
124
-              data: {
125
-                state: 0,
126
-                typeid: this.typeid
127
-              } // props
128
-            },
129
-            area: ['50%', '55%'],
130
-            title: '添加知识库'
131
-          })
132
-        } else {
133
-          this.$message({
134
-            message: '请选择知识库类别',
135
-            type: 'warning'
136
-          })
137
-          return
98
+        resolve()
99
+      })
100
+    },
101
+    getListTask() {
102
+      return new Promise((resolve) => {
103
+        const params = {
104
+          pageindex: this.pageParams.pageindex, // int 第几页
105
+          pagesize: this.pageParams.pagesize, // int 每页几条信息
106
+          keywords: this.keyword, // 客户名称
107
+          typeid: this.typeid // 联系电话
138 108
         }
139
-      },
140
-      btn_edit(F_Id) {
109
+        getList(params).then((response) => {
110
+          this.taskDataLists = response.rows
111
+        })
112
+        resolve()
113
+      })
114
+    },
115
+    btn_search_task() {
116
+      if (this.typeid) {
117
+        this.keyword = this.keyword
118
+        this.getListTask()
119
+      } else {
120
+        this.$message({
121
+          message: '请选择知识库类别',
122
+          type: 'warning'
123
+        })
124
+        return
125
+      }
126
+    },
127
+    btn_add() {
128
+      if (this.typeid) {
129
+        console.log(typeof this.typeid)
141 130
         this.$layer.iframe({
142 131
           content: {
143 132
             content: addOrEdit, // 传递的组件对象
144 133
             parent: this, // 当前的vue对象
145 134
             data: {
146
-              state: 1,
147
-              typeid: this.typeid,
148
-              F_Id: F_Id
135
+              state: 0,
136
+              typeid: this.typeid
149 137
             } // props
150 138
           },
151 139
           area: ['50%', '55%'],
152 140
           title: '添加知识库'
153 141
         })
154
-      },
155
-      // 删除
156
-      btn_delete_task(F_Id) {
157
-        this.$confirm('确定要删除吗?', '提示', {
158
-            confirmButtonText: '确定',
159
-            cancelButtonText: '取消',
160
-            type: 'warning'
161
-          })
162
-          .then(() => {
163
-            const params = {
164
-              ids: F_Id
142
+      } else {
143
+        this.$message({
144
+          message: '请选择知识库类别',
145
+          type: 'warning'
146
+        })
147
+        return
148
+      }
149
+    },
150
+    btn_edit(F_Id) {
151
+      this.$layer.iframe({
152
+        content: {
153
+          content: addOrEdit, // 传递的组件对象
154
+          parent: this, // 当前的vue对象
155
+          data: {
156
+            state: 1,
157
+            typeid: this.typeid,
158
+            F_Id: F_Id
159
+          } // props
160
+        },
161
+        area: ['50%', '55%'],
162
+        title: '添加知识库'
163
+      })
164
+    },
165
+    // 删除
166
+    btn_delete_task(F_Id) {
167
+      this.$confirm('确定要删除吗?', '提示', {
168
+        confirmButtonText: '确定',
169
+        cancelButtonText: '取消',
170
+        type: 'warning'
171
+      })
172
+        .then(() => {
173
+          const params = {
174
+            ids: F_Id
175
+          }
176
+          delInfos(params).then((response) => {
177
+            if (response.state.toLowerCase() === 'success') {
178
+              this.getListTask()
179
+              this.$message({
180
+                message: '删除成功!',
181
+                type: 'success',
182
+                duration: 1000
183
+              })
165 184
             }
166
-            delInfos(params).then((response) => {
167
-              if (response.state.toLowerCase() === 'success') {
168
-                this.getListTask()
169
-                this.$message({
170
-                  message: '删除成功!',
171
-                  type: 'success',
172
-                  duration: 1000
173
-                })
174
-              }
175
-            })
176
-          })
177
-          .catch(() => {
178
-            this.$message.info('已取消删除')
179 185
           })
180
-      },
181
-      //导入
182
-      btn_import() {
183
-        this.$layer.iframe({
184
-          content: {
185
-            content: Export, // 传递的组件对象
186
-            parent: this, // 当前的vue对象
187
-            data: {
188
-      
189
-            } // props
190
-          },
191
-          area: ['50%', '70%'],
192
-          title: '导入'
193 186
         })
194
-      },
187
+        .catch(() => {
188
+          this.$message.info('已取消删除')
189
+        })
190
+    },
191
+    handleRow(row) {
192
+      this.$layer.iframe({
193
+        content: {
194
+          content: knowledgeDetail, // 传递的组件对象
195
+          parent: this, // 当前的vue对象
196
+          data: {
197
+            rowid: row.F_Id.toString()
198
+          } // props
199
+        },
200
+        area: ['50%', '55%'],
201
+        title: '知识库详情'
202
+      })
203
+    },
204
+    // 导入
205
+    btn_import() {
206
+      this.$layer.iframe({
207
+        content: {
208
+          content: Export, // 传递的组件对象
209
+          parent: this, // 当前的vue对象
210
+          data: {
211
+
212
+          } // props
213
+        },
214
+        area: ['50%', '70%'],
215
+        title: '导入'
216
+      })
195 217
     }
196 218
   }
219
+}
197 220
 </script>
198 221
 
199 222
 <style>

+ 206 - 0
CallCenterWeb.UI/RMYY/src/views/vehicleDispatch/driverOrder/driverOrderdetail.vue

@@ -0,0 +1,206 @@
1
+<template>
2
+  <div v-loading="loading">
3
+    <el-table :data="selectarr" class="airlineDeviceTable" border row-key="F_ID">
4
+      <el-table-column type="index" width="100" label="序号" align="center"/>
5
+      <el-table-column
6
+        v-for="(item, index) in col"
7
+        :key="`col_${index}`"
8
+        :prop="dropCol[index].prop"
9
+        :label="item.label"
10
+        align="center"/>
11
+    </el-table>
12
+  </div>
13
+</template>
14
+
15
+<script>
16
+import {
17
+  getCarList,
18
+  getCarUserList,
19
+  getAssignWorkOrder
20
+} from '@/api/vehicleDispatch/vehicleScheduling.js'
21
+import {
22
+  getModelDetail
23
+} from '@/api/vehicleDispatch/vehicleScheduling.js'
24
+import Sortable from 'sortablejs'
25
+export default {
26
+  name: 'DriverOrderdetail',
27
+  props: {
28
+    layerid: {
29
+      type: String,
30
+      default: ''
31
+    },
32
+    rowid: {
33
+      type: String,
34
+      default: ''
35
+    },
36
+    wocode: {
37
+      type: String,
38
+      default: ''
39
+    }
40
+    // selectids: {
41
+    //   type: Array,
42
+    //   default: []
43
+    // },
44
+    // selectarr: {
45
+    //   type: Array,
46
+    //   default: []
47
+    // }
48
+  },
49
+  data() {
50
+    return {
51
+      col: [{
52
+        label: '工单号',
53
+        prop: 'F_WorkOrderCode'
54
+      },
55
+      {
56
+        label: '工单内容',
57
+        prop: 'F_Content'
58
+      },
59
+      {
60
+        label: '出发地',
61
+        prop: 'F_DepartPlace'
62
+      },
63
+      {
64
+        label: '目的地',
65
+        prop: 'F_Destination'
66
+      },
67
+      {
68
+        label: '用车时间',
69
+        prop: 'F_UseTime'
70
+      }
71
+      ],
72
+      dropCol: [{
73
+        label: '工单号',
74
+        prop: 'F_WorkOrderCode'
75
+      },
76
+      {
77
+        label: '工单内容',
78
+        prop: 'F_Content'
79
+      },
80
+      {
81
+        label: '出发地',
82
+        prop: 'F_DepartPlace'
83
+      },
84
+      {
85
+        label: '目的地',
86
+        prop: 'F_Destination'
87
+      },
88
+      {
89
+        label: '用车时间',
90
+        prop: 'F_UseTime'
91
+      }
92
+      ],
93
+      typeList: [],
94
+      carArr: [],
95
+      repairman: [], // 申请人数据
96
+      hospitalsParam: {
97
+        id: 0,
98
+        name: ''
99
+      },
100
+      departmentsParam: {
101
+        id: 0,
102
+        name: ''
103
+      },
104
+      repairmanParam: {
105
+        id: 0,
106
+        name: ''
107
+      },
108
+      rules: {},
109
+      ruleForm: {
110
+        carid: '',
111
+        driver: ''
112
+      },
113
+      deptid: [],
114
+      selectarr: [],
115
+      loading: false
116
+    }
117
+  },
118
+  created() {
119
+    this.getDetail()
120
+  },
121
+  mounted() {
122
+    this.$nextTick(() => {
123
+      this.rowDrop()
124
+      // this.columnDrop()
125
+    })
126
+  },
127
+  methods: {
128
+    // 行拖拽
129
+    rowDrop() {
130
+      const tbody = document.querySelector('.airlineDeviceTable .el-table__body-wrapper tbody')
131
+      const that = this
132
+      Sortable.create(tbody, {
133
+        draggable: '.el-table__row',
134
+        // 结束拖拽后的回调函数
135
+        onEnd({
136
+          newIndex,
137
+          oldIndex
138
+        }) {
139
+          const currentRow = that.selectarr.splice(oldIndex, 1)[0]
140
+          that.selectarr.splice(newIndex, 0, currentRow)
141
+        }
142
+      })
143
+    },
144
+    // 列拖拽
145
+    columnDrop() {
146
+      const wrapperTr = document.querySelector('.airlineDeviceTable .el-table__header-wrapper tr')
147
+      this.sortable = Sortable.create(wrapperTr, {
148
+        animation: 180,
149
+        delay: 0,
150
+        onEnd: evt => {
151
+          const oldItem = this.dropCol[evt.oldIndex]
152
+          this.dropCol.splice(evt.oldIndex, 1)
153
+          this.dropCol.splice(evt.newIndex, 0, oldItem)
154
+        }
155
+      })
156
+    },
157
+    getDetail() {
158
+      const params = {
159
+        orderid: this.rowid,
160
+        WorkOrderCode: this.wocode,
161
+        type: '3'
162
+      }
163
+      getModelDetail(params).then((response) => {
164
+        this.selectarr = response.Carlist
165
+      })
166
+    },
167
+    getVehicleLists() {
168
+      const params = {
169
+        state: 0
170
+      }
171
+      getCarList(params).then(res => {
172
+        this.carArr = res.rows
173
+      })
174
+    },
175
+    getVehicleUserLists() {
176
+      const params = {
177
+        rolecode: 'SJ'
178
+      }
179
+      getCarUserList(params).then(res => {
180
+        this.repairman = res.rows
181
+      })
182
+    },
183
+    // onsub() {
184
+    //   const arr = this.selectarr.map(item => item.F_WorkOrderCode)
185
+    //   const params = {
186
+    //     orderid: arr.toString(),
187
+    //     driver: this.ruleForm.driver,
188
+    //     carid: this.ruleForm.carid
189
+    //   }
190
+    //   getAssignWorkOrder(params).then(res => {
191
+    //     if (res.state == 'success') {
192
+    //       this.$parent.$layer.close(this.layerid)
193
+    //       this.$message.success('分配成功')
194
+    //       this.$parent.getList()
195
+    //     }
196
+    //   })
197
+    // },
198
+    resetForm() {
199
+      this.$refs.ruleForm.resetFields()
200
+    }
201
+  }
202
+}
203
+</script>
204
+
205
+<style rel="stylesheet/scss" lang="scss" scoped>
206
+</style>

+ 123 - 94
CallCenterWeb.UI/RMYY/src/views/vehicleDispatch/driverOrder/index.vue

@@ -1,15 +1,29 @@
1 1
 <template>
2 2
   <div class="app-container">
3 3
     <div class="filter-container">
4
-      <el-input clearable v-model="ordercode" placeholder="请输入工单编号" class="filter-item" />
5
-      <el-input clearable v-model="carname" placeholder="请输入车辆名称" class="filter-item" />
6
-      <el-input clearable v-model="drivername" placeholder="请输入司机名称" class="filter-item" />
7
-      <el-date-picker v-model="startTime" size="medium" type="daterange" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
8
-        range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
4
+      <el-input v-model="ordercode" clearable placeholder="请输入工单编号" class="filter-item" />
5
+      <el-input v-model="carname" clearable placeholder="请输入车辆名称" class="filter-item" />
6
+      <el-input v-model="drivername" clearable placeholder="请输入司机名称" class="filter-item" />
7
+      <el-date-picker
8
+        v-model="startTime"
9
+        size="medium"
10
+        type="daterange"
11
+        format="yyyy-MM-dd"
12
+        value-format="yyyy-MM-dd"
13
+        range-separator="至"
14
+        start-placeholder="开始日期"
15
+        end-placeholder="结束日期" />
9 16
       <el-button type="primary" class="filter-item" @click="btn_search">搜索</el-button>
10 17
     </div>
11 18
     <el-table v-loading="loading" :data="dataLists" border stripe>
12
-      <el-table-column :show-overflow-tooltip="true" prop="F_WorkOrderCode" label="工单编号" align="center" />
19
+      <!-- <el-table-column :show-overflow-tooltip="true" prop="F_WorkOrderCode" label="工单编号" align="center" /> -->
20
+      <el-table-column prop="F_WorkOrderCode" label="工单编号" align="center" min-width="110">
21
+        <template slot-scope="scope">
22
+          <el-button type="text" size="small" @click="hadndleOrderCode(scope.row.F_ID,scope.row.F_WorkOrderCode)">
23
+            {{ scope.row.F_WorkOrderCode }}
24
+          </el-button>
25
+        </template>
26
+      </el-table-column>
13 27
       <el-table-column :show-overflow-tooltip="true" prop="F_CarName" label="车辆信息" align="center" />
14 28
       <el-table-column :show-overflow-tooltip="true" prop="F_DriverName" label="司机" align="center" />
15 29
       <el-table-column :show-overflow-tooltip="true" prop="F_DepartPlace" label="出发地" align="center" />
@@ -18,110 +32,125 @@
18 32
       <el-table-column :show-overflow-tooltip="true" prop="F_CloseTime" label="完工时间" align="center" />
19 33
       <el-table-column label="状态" align="center">
20 34
         <template slot-scope="scope">
21
-         <div v-if="scope.row.F_State==0">待接单</div>
22
-         <div v-if="scope.row.F_State==2">已接单</div>
23
-         <div v-if="scope.row.F_State==3">已退回</div>
24
-         <div v-if="scope.row.F_State==4">处理中</div>
25
-         <div v-if="scope.row.F_State==10">已完成</div>
35
+          <div v-if="scope.row.F_State==0">待接单</div>
36
+          <div v-if="scope.row.F_State==2">已接单</div>
37
+          <div v-if="scope.row.F_State==3">已退回</div>
38
+          <div v-if="scope.row.F_State==4">处理中</div>
39
+          <div v-if="scope.row.F_State==10">已完成</div>
26 40
         </template>
27 41
       </el-table-column>
28
-      <!-- <el-table-column label="操作" width="160" align="center" class-name="oparate_btn" fixed="right">
29
-        <template slot-scope="scope">
30
-          <el-button size="mini" type="text" @click="btn_withdraw(scope.row.F_ID)">撤回</el-button>
31
-        </template>
32
-      </el-table-column> -->
33 42
     </el-table>
34
-    <pagination v-show="pageParams.total > 0" :total="pageParams.total" :pageindex.sync="pageParams.pageindex"
35
-      :pagesize.sync="pageParams.pagesize" class="pagination" @pagination="getList" />
43
+    <pagination
44
+      v-show="pageParams.total > 0"
45
+      :total="pageParams.total"
46
+      :pageindex.sync="pageParams.pageindex"
47
+      :pagesize.sync="pageParams.pagesize"
48
+      class="pagination"
49
+      @pagination="getList" />
36 50
   </div>
37 51
 </template>
38 52
 <script>
39
-  import {
40
-    getDriverList,
41
-    getWithdrawWorkOrder
42
-  } from '@/api/vehicleDispatch/driver'
43
-  import Pagination from '@/components/context/Pagination'
53
+import {
54
+  getDriverList,
55
+  getWithdrawWorkOrder
56
+} from '@/api/vehicleDispatch/driver'
57
+import Pagination from '@/components/context/Pagination'
58
+import detail from './driverOrderdetail.vue'
44 59
 
45
-  export default {
46
-    name: 'DriverOrer',
47
-    components: {
48
-      Pagination
49
-    },
50
-    data() {
51
-      return {
52
-        loading: false,
53
-        keyword: '',
54
-        ordercode: '',
55
-        carname: '',
56
-        drivername: '',
57
-        startTime: '',
58
-        pageParams: {
59
-          pageindex: 1, //Number(this.$store.getters.serverConfig.PAGESIZE)
60
-          pagesize: Number(this.$store.getters.serverConfig.PAGESIZE),
61
-          total: 0
62
-        },
63
-        dataLists: []
60
+export default {
61
+  name: 'DriverOrer',
62
+  components: {
63
+    Pagination
64
+  },
65
+  data() {
66
+    return {
67
+      loading: false,
68
+      keyword: '',
69
+      ordercode: '',
70
+      carname: '',
71
+      drivername: '',
72
+      startTime: '',
73
+      pageParams: {
74
+        pageindex: 1, // Number(this.$store.getters.serverConfig.PAGESIZE)
75
+        pagesize: Number(this.$store.getters.serverConfig.PAGESIZE),
76
+        total: 0
77
+      },
78
+      dataLists: []
79
+    }
80
+  },
81
+  created() {
82
+    this.getList()
83
+    document.onkeyup = (e) => {
84
+      if (e.keyCode === 13) {
85
+        this.getList()
64 86
       }
87
+    }
88
+  },
89
+  methods: {
90
+    getList() {
91
+      // this.loading = true
92
+      return new Promise((resolve) => {
93
+        const params = {
94
+          pageindex: this.pageParams.pageindex, // 第几页
95
+          pagesize: this.pageParams.pagesize, // 每页几条信息
96
+          stime: this.searchDate && this.searchDate[0],
97
+          etime: this.searchDate && this.searchDate[1],
98
+          WorkOrderCode: this.ordercode,
99
+          carname: this.carname,
100
+          driverName: this.drivername,
101
+          state: ''
102
+        }
103
+        getDriverList(params).then((response) => {
104
+          this.loading = false
105
+          if (response.rows.length >= 0) {
106
+            this.pageParams.total = response.tatal
107
+            this.dataLists = response.rows
108
+          }
109
+        })
110
+        resolve()
111
+      })
65 112
     },
66
-    created() {
113
+    btn_search() {
114
+      this.pageParams.pageindex = 1
67 115
       this.getList()
68
-      document.onkeyup = (e) => {
69
-        if (e.keyCode === 13) {
70
-          this.getList()
71
-        }
72
-      }
73 116
     },
74
-    methods: {
75
-      getList() {
76
-        // this.loading = true
77
-        return new Promise((resolve) => {
78
-          const params = {
79
-            pageindex: this.pageParams.pageindex, // 第几页
80
-            pagesize: this.pageParams.pagesize, // 每页几条信息
81
-            stime: this.searchDate && this.searchDate[0],
82
-            etime: this.searchDate && this.searchDate[1],
83
-            WorkOrderCode: this.ordercode,
84
-            carname: this.carname,
85
-            driverName: this.drivername,
86
-            state: ''
87
-          }
88
-          getDriverList(params).then((response) => {
89
-            this.loading = false
90
-            if (response.rows.length >= 0) {
91
-              this.pageParams.total = response.tatal
92
-              this.dataLists = response.rows
117
+    hadndleOrderCode(ordercode, wocode) {
118
+      this.$layer.iframe({
119
+        content: {
120
+          content: detail, // 传递的组件对象
121
+          parent: this, // 当前的vue对象
122
+          data: {
123
+            rowid: ordercode.toString(),
124
+            wocode: wocode
125
+          } // props
126
+        },
127
+        area: ['80%', '90%'],
128
+        title: '工单详情'
129
+      })
130
+    },
131
+    btn_withdraw(id) {
132
+      const params = {
133
+        orderid: id
134
+      }
135
+      this.$confirm('您确定要撤回吗?', '提示', {
136
+        confirmButtonText: '确定',
137
+        cancelButtonText: '取消',
138
+        type: 'warning'
139
+      })
140
+        .then(() => {
141
+          getWithdrawWorkOrder(params).then((response) => {
142
+            if (response.state.toLowerCase() === 'success') {
143
+              this.getList()
144
+              this.$message.success('撤回成功!')
93 145
             }
94 146
           })
95
-          resolve()
96 147
         })
97
-      },
98
-      btn_search() {
99
-        this.pageParams.pageindex = 1
100
-        this.getList()
101
-      },
102
-      btn_withdraw(id) {
103
-        const params = {
104
-          orderid: id
105
-        }
106
-        this.$confirm('您确定要撤回吗?', '提示', {
107
-            confirmButtonText: '确定',
108
-            cancelButtonText: '取消',
109
-            type: 'warning'
110
-          })
111
-          .then(() => {
112
-            getWithdrawWorkOrder(params).then((response) => {
113
-              if (response.state.toLowerCase() === 'success') {
114
-                this.getList()
115
-                this.$message.success('撤回成功!')
116
-              }
117
-            })
118
-          })
119
-          .catch(() => {
120
-            this.$message('已取消撤回')
121
-          })
122
-      },
148
+        .catch(() => {
149
+          this.$message('已取消撤回')
150
+        })
123 151
     }
124 152
   }
153
+}
125 154
 </script>
126 155
 <style rel="stylesheet/scss" lang="scss" scoped>
127 156
 </style>

+ 169 - 184
CallCenterWeb.UI/RMYY/src/views/vehicleDispatch/vehicleScheduling/vehicleSchedulingList/components/distribution.vue

@@ -1,20 +1,13 @@
1 1
 <template>
2 2
   <div v-loading="loading">
3
-    <!-- <el-table :data="selectarr" border stripe>
4
-      <el-table-column type="index" width="100" label="序号" align="center">
5
-      </el-table-column>
6
-      <el-table-column prop="F_WorkOrderCode" label="工单号" align="center" />
7
-      <el-table-column prop="F_Content" label="工单内容" align="center" />
8
-      <el-table-column prop="F_DepartPlace" label="出发地" align="center" />
9
-      <el-table-column prop="F_Destination" label="目的地" align="center" />
10
-      <el-table-column prop="F_UseTime" label="用车时间" align="center" />
11
-    </el-table> -->
12 3
     <el-table :data="selectarr" class="airlineDeviceTable" border row-key="F_ID">
13
-      <el-table-column type="index" width="100" label="序号" align="center">
14
-      </el-table-column>
15
-      <el-table-column align="center" v-for="(item, index) in col" :key="`col_${index}`" :prop="dropCol[index].prop"
16
-        :label="item.label">
17
-      </el-table-column>
4
+      <el-table-column type="index" width="100" label="序号" align="center"/>
5
+      <el-table-column
6
+        v-for="(item, index) in col"
7
+        :key="`col_${index}`"
8
+        :prop="dropCol[index].prop"
9
+        :label="item.label"
10
+        align="center"/>
18 11
     </el-table>
19 12
     <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="100px">
20 13
       <el-col :span="24">
@@ -22,22 +15,24 @@
22 15
           <el-col :span="12">
23 16
             <el-form-item label="车辆" prop="carid">
24 17
               <el-select v-model="ruleForm.carid" style="width: 100%;">
25
-                <el-option v-for="(item,index) in carArr" :key="index" :label="item.carname" :value="item.carid">
26
-                </el-option>
18
+                <el-option v-for="(item,index) in carArr" :key="index" :label="item.carname" :value="item.carid"/>
27 19
               </el-select>
28 20
             </el-form-item>
29 21
           </el-col>
30 22
           <el-col :span="12">
31 23
             <el-form-item label="司机" prop="driver">
32 24
               <el-select v-model="ruleForm.driver" style="width:100%;">
33
-                <el-option v-for="item in repairman" :key="item.usercode" :label="item.username"
25
+                <el-option
26
+                  v-for="item in repairman"
27
+                  :key="item.usercode"
28
+                  :label="item.username"
34 29
                   :value="item.usercode" />
35 30
               </el-select>
36 31
             </el-form-item>
37 32
           </el-col>
38 33
         </el-row>
39 34
         <el-form-item>
40
-          <el-button type="primary" @click='onsub'>保存</el-button>
35
+          <el-button type="primary" @click="onsub">保存</el-button>
41 36
         </el-form-item>
42 37
       </el-col>
43 38
     </el-form>
@@ -45,182 +40,172 @@
45 40
 </template>
46 41
 
47 42
 <script>
48
-  import {
49
-    getCarList,
50
-    getCarUserList,
51
-    getAssignWorkOrder
52
-  } from '@/api/vehicleDispatch/vehicleScheduling.js'
53
-  import {
54
-    getOrderTypeList
55
-  } from "@/api/commonAPI.js"
56
-  import selectDeptTree from '@/components/context/commonSelect/selectDeptTree.vue'
57
-  import {
58
-    getCartype
59
-  } from "@/api/vehicleDispatch/vehicleManagement";
60
-  import {
61
-    GetPerson
62
-  } from '@/api/commonAPI'
63
-  import Sortable from 'sortablejs'
64
-  export default {
65
-    name: "Distribution",
66
-    props: {
67
-      layerid: {
68
-        type: String,
69
-        default: "",
43
+import {
44
+  getCarList,
45
+  getCarUserList,
46
+  getAssignWorkOrder
47
+} from '@/api/vehicleDispatch/vehicleScheduling.js'
48
+import Sortable from 'sortablejs'
49
+export default {
50
+  name: 'Distribution',
51
+  props: {
52
+    layerid: {
53
+      type: String,
54
+      default: ''
55
+    },
56
+    selectids: {
57
+      type: Array,
58
+      default: []
59
+    },
60
+    selectarr: {
61
+      type: Array,
62
+      default: []
63
+    }
64
+  },
65
+  data() {
66
+    return {
67
+      col: [{
68
+        label: '工单号',
69
+        prop: 'F_WorkOrderCode'
70
+      },
71
+      {
72
+        label: '工单内容',
73
+        prop: 'F_Content'
74
+      },
75
+      {
76
+        label: '出发地',
77
+        prop: 'F_DepartPlace'
70 78
       },
71
-      selectids: {
72
-        type: Array,
73
-        default: []
79
+      {
80
+        label: '目的地',
81
+        prop: 'F_Destination'
74 82
       },
75
-      selectarr: {
76
-        type: Array,
77
-        default: []
83
+      {
84
+        label: '用车时间',
85
+        prop: 'F_UseTime'
78 86
       }
79
-    },
80
-    data() {
81
-      return {
82
-        col: [{
83
-            label: '工单号',
84
-            prop: 'F_WorkOrderCode'
85
-          },
86
-          {
87
-            label: '工单内容',
88
-            prop: 'F_Content'
89
-          },
90
-          {
91
-            label: '出发地',
92
-            prop: 'F_DepartPlace'
93
-          },
94
-          {
95
-            label: '目的地',
96
-            prop: 'F_Destination'
97
-          },
98
-          {
99
-            label: '用车时间',
100
-            prop: 'F_UseTime'
101
-          }
102
-        ],
103
-        dropCol: [{
104
-            label: '工单号',
105
-            prop: 'F_WorkOrderCode'
106
-          },
107
-          {
108
-            label: '工单内容',
109
-            prop: 'F_Content'
110
-          },
111
-          {
112
-            label: '出发地',
113
-            prop: 'F_DepartPlace'
114
-          },
115
-          {
116
-            label: '目的地',
117
-            prop: 'F_Destination'
118
-          },
119
-          {
120
-            label: '用车时间',
121
-            prop: 'F_UseTime'
122
-          }
123
-        ],
124
-        typeList: [],
125
-        carArr: [],
126
-        repairman: [], // 申请人数据
127
-        hospitalsParam: {
128
-          id: 0,
129
-          name: ''
130
-        },
131
-        departmentsParam: {
132
-          id: 0,
133
-          name: ''
134
-        },
135
-        repairmanParam: {
136
-          id: 0,
137
-          name: ''
138
-        },
139
-        rules: {},
140
-        ruleForm: {
141
-          carid: '',
142
-          driver: ''
143
-        },
144
-        deptid: [],
145
-        loading: false,
146
-      };
147
-    },
148
-    created() {
149
-      this.getVehicleLists() //车辆arr
150
-      this.getVehicleUserLists() //司机arr
151
-    },
152
-    mounted() {
153
-      this.$nextTick(() => {
154
-        this.rowDrop()
155
-        // this.columnDrop()
156
-      })
157
-    },
158
-    methods: {
159
-      //行拖拽
160
-      rowDrop() {
161
-        const tbody = document.querySelector('.airlineDeviceTable .el-table__body-wrapper tbody');
162
-        const that = this;
163
-        Sortable.create(tbody, {
164
-          draggable: ".el-table__row",
165
-          // 结束拖拽后的回调函数
166
-          onEnd({
167
-            newIndex,
168
-            oldIndex
169
-          }) {
170
-            const currentRow = that.selectarr.splice(oldIndex, 1)[0];
171
-            that.selectarr.splice(newIndex, 0, currentRow);
172
-          },
173
-        })
87
+      ],
88
+      dropCol: [{
89
+        label: '工单号',
90
+        prop: 'F_WorkOrderCode'
174 91
       },
175
-      //列拖拽
176
-      columnDrop() {
177
-        const wrapperTr = document.querySelector('.airlineDeviceTable .el-table__header-wrapper tr')
178
-        this.sortable = Sortable.create(wrapperTr, {
179
-          animation: 180,
180
-          delay: 0,
181
-          onEnd: evt => {
182
-            const oldItem = this.dropCol[evt.oldIndex]
183
-            this.dropCol.splice(evt.oldIndex, 1)
184
-            this.dropCol.splice(evt.newIndex, 0, oldItem)
185
-          }
186
-        })
92
+      {
93
+        label: '工单内容',
94
+        prop: 'F_Content'
187 95
       },
188
-      getVehicleLists() {
189
-        const params = {
190
-          state: 0
191
-        }
192
-        getCarList(params).then(res => {
193
-          this.carArr = res.rows
194
-        })
96
+      {
97
+        label: '出发地',
98
+        prop: 'F_DepartPlace'
195 99
       },
196
-      getVehicleUserLists() {
197
-        const params = {
198
-          rolecode: 'SJ'
199
-        }
200
-        getCarUserList(params).then(res => {
201
-          this.repairman = res.rows
202
-        })
100
+      {
101
+        label: '目的地',
102
+        prop: 'F_Destination'
203 103
       },
204
-      onsub() {
205
-        const arr= this.selectarr.map(item => item.F_WorkOrderCode)
206
-        const params = {
207
-          orderid: arr.toString(),
208
-          driver: this.ruleForm.driver,
209
-          carid: this.ruleForm.carid
210
-        }
211
-        getAssignWorkOrder(params).then(res => {
212
-          if (res.state == 'success') {
213
-            this.$parent.$layer.close(this.layerid);
214
-            this.$message.success('分配成功')
215
-            this.$parent.getList()
216
-          }
217
-        })
104
+      {
105
+        label: '用车时间',
106
+        prop: 'F_UseTime'
107
+      }
108
+      ],
109
+      typeList: [],
110
+      carArr: [],
111
+      repairman: [], // 申请人数据
112
+      hospitalsParam: {
113
+        id: 0,
114
+        name: ''
115
+      },
116
+      departmentsParam: {
117
+        id: 0,
118
+        name: ''
119
+      },
120
+      repairmanParam: {
121
+        id: 0,
122
+        name: ''
218 123
       },
219
-      resetForm() {
220
-        this.$refs.ruleForm.resetFields();
124
+      rules: {},
125
+      ruleForm: {
126
+        carid: '',
127
+        driver: ''
221 128
       },
129
+      deptid: [],
130
+      loading: false
131
+    }
132
+  },
133
+  created() {
134
+    this.getVehicleLists() // 车辆arr
135
+    this.getVehicleUserLists() // 司机arr
136
+  },
137
+  mounted() {
138
+    this.$nextTick(() => {
139
+      this.rowDrop()
140
+      // this.columnDrop()
141
+    })
142
+  },
143
+  methods: {
144
+    // 行拖拽
145
+    rowDrop() {
146
+      const tbody = document.querySelector('.airlineDeviceTable .el-table__body-wrapper tbody')
147
+      const that = this
148
+      Sortable.create(tbody, {
149
+        draggable: '.el-table__row',
150
+        // 结束拖拽后的回调函数
151
+        onEnd({
152
+          newIndex,
153
+          oldIndex
154
+        }) {
155
+          const currentRow = that.selectarr.splice(oldIndex, 1)[0]
156
+          that.selectarr.splice(newIndex, 0, currentRow)
157
+        }
158
+      })
159
+    },
160
+    // 列拖拽
161
+    columnDrop() {
162
+      const wrapperTr = document.querySelector('.airlineDeviceTable .el-table__header-wrapper tr')
163
+      this.sortable = Sortable.create(wrapperTr, {
164
+        animation: 180,
165
+        delay: 0,
166
+        onEnd: evt => {
167
+          const oldItem = this.dropCol[evt.oldIndex]
168
+          this.dropCol.splice(evt.oldIndex, 1)
169
+          this.dropCol.splice(evt.newIndex, 0, oldItem)
170
+        }
171
+      })
172
+    },
173
+    getVehicleLists() {
174
+      const params = {
175
+        state: 0
176
+      }
177
+      getCarList(params).then(res => {
178
+        this.carArr = res.rows
179
+      })
180
+    },
181
+    getVehicleUserLists() {
182
+      const params = {
183
+        rolecode: 'SJ'
184
+      }
185
+      getCarUserList(params).then(res => {
186
+        this.repairman = res.rows
187
+      })
188
+    },
189
+    onsub() {
190
+      const arr = this.selectarr.map(item => item.F_WorkOrderCode)
191
+      const params = {
192
+        orderid: arr.toString(),
193
+        driver: this.ruleForm.driver,
194
+        carid: this.ruleForm.carid
195
+      }
196
+      getAssignWorkOrder(params).then(res => {
197
+        if (res.state == 'success') {
198
+          this.$parent.$layer.close(this.layerid)
199
+          this.$message.success('分配成功')
200
+          this.$parent.getList()
201
+        }
202
+      })
222 203
     },
223
-  };
204
+    resetForm() {
205
+      this.$refs.ruleForm.resetFields()
206
+    }
207
+  }
208
+}
224 209
 </script>
225 210
 
226 211
 <style rel="stylesheet/scss" lang="scss" scoped>

+ 124 - 114
CallCenterWeb.UI/RMYY/src/views/vehicleDispatch/vehicleScheduling/vehicleSchedulingList/index.vue

@@ -1,15 +1,21 @@
1 1
 <template>
2 2
   <div class="app-container">
3 3
     <div class="filter-container">
4
-      <el-input clearable v-model="ordercode" placeholder="请输入工单编号" class="filter-item" />
5
-      <el-select clearable v-model="type" placeholder="请选择工单类型" size="medium">
6
-        <el-option v-for="item in typeList" :key="item.fid" :label="item.fname" :value="item.fid">
7
-        </el-option>
4
+      <el-input v-model="ordercode" clearable placeholder="请输入工单编号" class="filter-item" />
5
+      <el-select v-model="type" clearable placeholder="请选择工单类型" size="medium">
6
+        <el-option v-for="item in typeList" :key="item.fid" :label="item.fname" :value="item.fid"/>
8 7
       </el-select>
9
-      <el-date-picker v-model="startTime" size="medium" type="daterange" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
10
-        range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
8
+      <el-date-picker
9
+        v-model="startTime"
10
+        size="medium"
11
+        type="daterange"
12
+        format="yyyy-MM-dd"
13
+        value-format="yyyy-MM-dd"
14
+        range-separator="至"
15
+        start-placeholder="开始日期"
16
+        end-placeholder="结束日期" />
11 17
       <el-button type="primary" class="filter-item" size="medium" @click="btn_search">搜索</el-button>
12
-      <el-button type="primary" class="filter-item" size="medium" @click='btn_distribute'>批量分配</el-button>
18
+      <el-button type="primary" class="filter-item" size="medium" @click="btn_distribute">批量分配</el-button>
13 19
     </div>
14 20
     <el-tabs v-model="activeName" @tab-click="handleClick">
15 21
       <el-tab-pane label="全部" name="-1" />
@@ -18,8 +24,7 @@
18 24
       <el-tab-pane label="已完成" name="10" />
19 25
     </el-tabs>
20 26
     <el-table v-loading="loading" :data="dataLists" border stripe @selection-change="handleSelectionChange">
21
-      <el-table-column type="selection" width="55">
22
-      </el-table-column>
27
+      <el-table-column type="selection" width="55"/>
23 28
       <el-table-column prop="F_WorkOrderCode" label="工单编号" align="center" min-width="110">
24 29
         <template slot-scope="scope">
25 30
           <el-button type="text" size="small" @click="hadndleOrderCode(scope.row.F_ID,scope.row.F_WorkOrderCode)">
@@ -60,8 +65,13 @@
60 65
         </template>
61 66
       </el-table-column>
62 67
     </el-table>
63
-    <pagination v-show="pageParams.total > 0" :total="pageParams.total" :pageindex.sync="pageParams.pageindex"
64
-      :pagesize.sync="pageParams.pagesize" class="pagination" @pagination="getList" />
68
+    <pagination
69
+      v-show="pageParams.total > 0"
70
+      :total="pageParams.total"
71
+      :pageindex.sync="pageParams.pageindex"
72
+      :pagesize.sync="pageParams.pagesize"
73
+      class="pagination"
74
+      @pagination="getList" />
65 75
   </div>
66 76
 </template>
67 77
 <script>
@@ -72,54 +82,54 @@ import {
72 82
   getDelete,
73 83
   getModelDetail,
74 84
   getAssignWorkOrder,
75
-  getSureWorkOrder,
76
-} from "@/api/vehicleDispatch/vehicleScheduling.js";
77
-import { getGetAllCar } from "@/api/Escortservice/Escortservice.js";
78
-import { getOrderTypeList } from "@/api/commonAPI.js";
79
-import addOrEdit from "./components/addOrEdit";
80
-import detail from "./components/detail";
81
-import assign from "./components/assign.vue";
82
-import distribution from "./components/distribution.vue";
83
-import Pagination from "@/components/context/Pagination";
85
+  getSureWorkOrder
86
+} from '@/api/vehicleDispatch/vehicleScheduling.js'
87
+import { getGetAllCar } from '@/api/Escortservice/Escortservice.js'
88
+import { getOrderTypeList } from '@/api/commonAPI.js'
89
+import addOrEdit from './components/addOrEdit'
90
+import detail from './components/detail'
91
+import assign from './components/assign.vue'
92
+import distribution from './components/distribution.vue'
93
+import Pagination from '@/components/context/Pagination'
84 94
 
85 95
 export default {
86
-  name: "vehicleScheduling",
96
+  name: 'VehicleScheduling',
87 97
   components: {
88
-    Pagination,
98
+    Pagination
89 99
   },
90 100
   data() {
91 101
     return {
92
-      activeName: "-1",
102
+      activeName: '-1',
93 103
       loading: false,
94
-      ordercode: "",
95
-      state: "-1",
104
+      ordercode: '',
105
+      state: '-1',
96 106
       typeList: [],
97
-      type: "",
98
-      startTime: "",
107
+      type: '',
108
+      startTime: '',
99 109
       pageParams: {
100
-        pageindex: 1, //Number(this.$store.getters.serverConfig.PAGESIZE)
110
+        pageindex: 1, // Number(this.$store.getters.serverConfig.PAGESIZE)
101 111
         pagesize: Number(this.$store.getters.serverConfig.PAGESIZE),
102
-        total: 0,
112
+        total: 0
103 113
       },
104 114
       dataLists: [],
105 115
       multipleSelection: [],
106
-      selectIds: [],
107
-    };
116
+      selectIds: []
117
+    }
108 118
   },
109 119
   created() {
110
-    this.getList();
111
-    this.getTypeOrder();
120
+    this.getList()
121
+    this.getTypeOrder()
112 122
     document.onkeyup = (e) => {
113 123
       if (e.keyCode === 13) {
114
-        this.getList();
124
+        this.getList()
115 125
       }
116
-    };
126
+    }
117 127
   },
118 128
   methods: {
119 129
     btn_distribute() {
120 130
       if (this.multipleSelection.length < 1) {
121
-        this.$message.error("没有要分配的选项");
122
-        return;
131
+        this.$message.error('没有要分配的选项')
132
+        return
123 133
       }
124 134
       this.$layer.iframe({
125 135
         content: {
@@ -127,50 +137,50 @@ export default {
127 137
           parent: this, // 当前的vue对象
128 138
           data: {
129 139
             selectids: this.selectIds,
130
-            selectarr: this.multipleSelection,
131
-          }, // props
140
+            selectarr: this.multipleSelection
141
+          } // props
132 142
         },
133
-        area: ["70%", "70%"],
134
-        title: "分配",
135
-      });
143
+        area: ['70%', '70%'],
144
+        title: '分配'
145
+      })
136 146
     },
137 147
     btn_fenpei(id, row) {
138
-      this.selectIds = [];
139
-      this.multipleSelection = [];
140
-      this.selectIds.push(id);
141
-      this.multipleSelection.push(row);
148
+      this.selectIds = []
149
+      this.multipleSelection = []
150
+      this.selectIds.push(id)
151
+      this.multipleSelection.push(row)
142 152
       this.$layer.iframe({
143 153
         content: {
144 154
           content: distribution, // 传递的组件对象
145 155
           parent: this, // 当前的vue对象
146 156
           data: {
147 157
             selectids: this.selectIds,
148
-            selectarr: this.multipleSelection,
149
-          }, // props
158
+            selectarr: this.multipleSelection
159
+          } // props
150 160
         },
151
-        area: ["70%", "70%"],
152
-        title: "分配",
153
-      });
161
+        area: ['70%', '70%'],
162
+        title: '分配'
163
+      })
154 164
     },
155 165
     handleSelectionChange(val) {
156
-      this.multipleSelection = val;
157
-      this.selectIds = val.map((item) => item.F_WorkOrderCode);
166
+      this.multipleSelection = val
167
+      this.selectIds = val.map((item) => item.F_WorkOrderCode)
158 168
     },
159 169
     handleClick(res) {
160
-      this.state = res.name;
161
-      this.getList();
170
+      this.state = res.name
171
+      this.getList()
162 172
     },
163 173
     getTypeOrder() {
164 174
       const params = {
165 175
         pid: 2,
166
-        typeid: 4000,
167
-      };
176
+        typeid: 4000
177
+      }
168 178
       getOrderTypeList(params.pid, params.typeid).then((res) => {
169
-        this.typeList = res.rows;
170
-      });
179
+        this.typeList = res.rows
180
+      })
171 181
     },
172 182
     getList() {
173
-      this.loading = true;
183
+      this.loading = true
174 184
       return new Promise((resolve) => {
175 185
         const params = {
176 186
           type: this.type,
@@ -179,21 +189,21 @@ export default {
179 189
           state: this.state,
180 190
           WorkOrderCode: this.ordercode,
181 191
           starttime: this.startTime && this.startTime[0],
182
-          endtime: this.startTime && this.startTime[1],
183
-        };
192
+          endtime: this.startTime && this.startTime[1]
193
+        }
184 194
         getList(params).then((response) => {
185
-          this.loading = false;
195
+          this.loading = false
186 196
           if (response.rows.length >= 0) {
187
-            this.pageParams.total = response.tatal;
188
-            this.dataLists = response.rows;
197
+            this.pageParams.total = response.tatal
198
+            this.dataLists = response.rows
189 199
           }
190
-        });
191
-        resolve();
192
-      });
200
+        })
201
+        resolve()
202
+      })
193 203
     },
194 204
     btn_search() {
195
-      this.pageParams.pageindex = 1;
196
-      this.getList();
205
+      this.pageParams.pageindex = 1
206
+      this.getList()
197 207
     },
198 208
     btn_edit(editId, wocode) {
199 209
       this.$layer.iframe({
@@ -202,12 +212,12 @@ export default {
202 212
           parent: this, // 当前的vue对象
203 213
           data: {
204 214
             rowid: editId.toString(),
205
-            wocode: wocode,
206
-          }, // props
215
+            wocode: wocode
216
+          } // props
207 217
         },
208
-        area: ["60%", "500px"],
209
-        title: "编辑",
210
-      });
218
+        area: ['60%', '500px'],
219
+        title: '编辑'
220
+      })
211 221
     },
212 222
     // 详情
213 223
     hadndleOrderCode(ordercode, wocode) {
@@ -217,71 +227,71 @@ export default {
217 227
           parent: this, // 当前的vue对象
218 228
           data: {
219 229
             rowid: ordercode,
220
-            wocode: wocode,
221
-          }, // props
230
+            wocode: wocode
231
+          } // props
222 232
         },
223
-        area: ["80%", "90%"],
224
-        title: "工单详情",
225
-      });
233
+        area: ['80%', '90%'],
234
+        title: '工单详情'
235
+      })
226 236
     },
227
-    //删除
237
+    // 删除
228 238
     btn_delete(editId) {
229 239
       const params = {
230
-        WorkOrderCode: editId,
231
-      };
232
-      this.$confirm("您确定要删除此信息吗?", "提示", {
233
-        confirmButtonText: "确定",
234
-        cancelButtonText: "取消",
235
-        type: "warning",
240
+        WorkOrderCode: editId
241
+      }
242
+      this.$confirm('您确定要删除此信息吗?', '提示', {
243
+        confirmButtonText: '确定',
244
+        cancelButtonText: '取消',
245
+        type: 'warning'
236 246
       })
237 247
         .then(() => {
238 248
           getDelete(params).then((response) => {
239
-            this.getList();
240
-            this.$message.success("删除成功!");
241
-          });
249
+            this.getList()
250
+            this.$message.success('删除成功!')
251
+          })
242 252
         })
243 253
         .catch(() => {
244
-          this.$message("已取消删除");
245
-        });
254
+          this.$message('已取消删除')
255
+        })
246 256
     },
247
-    //确定工单
257
+    // 确定工单
248 258
     btn_sure(rowid) {
249 259
       const params = {
250
-        orderid: rowid,
251
-      };
252
-      this.$confirm("您要确认此工单吗?", "提示", {
253
-        confirmButtonText: "确定",
254
-        cancelButtonText: "取消",
255
-        type: "warning",
260
+        orderid: rowid
261
+      }
262
+      this.$confirm('您要确认此工单吗?', '提示', {
263
+        confirmButtonText: '确定',
264
+        cancelButtonText: '取消',
265
+        type: 'warning'
256 266
       })
257 267
         .then(() => {
258 268
           getSureWorkOrder(params).then((response) => {
259
-            if (response.state.toLowerCase() === "success") {
260
-              this.getList();
261
-              this.$message.success("确定成功!");
269
+            if (response.state.toLowerCase() === 'success') {
270
+              this.getList()
271
+              this.$message.success('确定成功!')
262 272
             }
263
-          });
273
+          })
264 274
         })
265 275
         .catch(() => {
266
-          this.$message("已取消");
267
-        });
276
+          this.$message('已取消')
277
+        })
268 278
     },
269
-    //派车
279
+    // 派车
270 280
     btn_assign(rowid) {
271 281
       this.$layer.iframe({
272 282
         content: {
273 283
           content: assign, // 传递的组件对象
274 284
           parent: this, // 当前的vue对象
275 285
           data: {
276
-            rowid: rowid,
277
-          }, // props
286
+            rowid: rowid
287
+          } // props
278 288
         },
279
-        area: ["40%", "50%"],
280
-        title: "派车",
281
-      });
282
-    },
283
-  },
284
-};
289
+        area: ['40%', '50%'],
290
+        title: '派车'
291
+      })
292
+    }
293
+  }
294
+}
285 295
 </script>
286 296
 <style rel="stylesheet/scss" lang="scss" scoped>
287 297
 </style>