|
|
@@ -1,7 +1,7 @@
|
|
1
|
1
|
<template>
|
|
2
|
2
|
<div class="app-container">
|
|
3
|
3
|
<div class="filter-container">
|
|
4
|
|
- <!-- <el-input v-model="keyword" placeholder="请输入关键词" class="filter-item" /> -->
|
|
|
4
|
+ <el-input clearable v-model="ordercode" placeholder="请输入工单编号" class="filter-item" />
|
|
5
|
5
|
<el-select clearable v-model="type" placeholder="请选择工单类型" size="medium">
|
|
6
|
6
|
<el-option v-for="item in typeList" :key="item.fid" :label="item.fname" :value="item.fid">
|
|
7
|
7
|
</el-option>
|
|
|
@@ -9,6 +9,7 @@
|
|
9
|
9
|
<el-date-picker v-model="startTime" size="medium" type="daterange" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
|
|
10
|
10
|
range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
|
|
11
|
11
|
<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>
|
|
12
|
13
|
</div>
|
|
13
|
14
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
|
14
|
15
|
<el-tab-pane label="全部" name="-1" />
|
|
|
@@ -16,8 +17,9 @@
|
|
16
|
17
|
<el-tab-pane label="已分配" name="1" />
|
|
17
|
18
|
<el-tab-pane label="已完成" name="10" />
|
|
18
|
19
|
</el-tabs>
|
|
19
|
|
- <el-table v-loading="loading" :data="dataLists" border stripe>
|
|
20
|
|
- <el-table-column type="index" label="编号" align="center" fixed width="80" />
|
|
|
20
|
+ <el-table v-loading="loading" :data="dataLists" border stripe @selection-change="handleSelectionChange">
|
|
|
21
|
+ <el-table-column type="selection" width="55">
|
|
|
22
|
+ </el-table-column>
|
|
21
|
23
|
<el-table-column prop="F_WorkOrderCode" label="工单编号" align="center" min-width="110">
|
|
22
|
24
|
<template slot-scope="scope">
|
|
23
|
25
|
<el-button type="text" size="small" @click="hadndleOrderCode(scope.row.F_ID,scope.row.F_WorkOrderCode)">
|
|
|
@@ -50,11 +52,10 @@
|
|
50
|
52
|
</el-table-column>
|
|
51
|
53
|
<el-table-column label="操作" width="160" align="center" class-name="oparate_btn" fixed="right">
|
|
52
|
54
|
<template slot-scope="scope">
|
|
53
|
|
- <el-button size="mini" type="text"
|
|
54
|
|
- @click="btn_edit(scope.row.F_ID,scope.row.F_WorkOrderCode)">编辑</el-button>
|
|
|
55
|
+ <el-button size="mini" type="text" @click="btn_edit(scope.row.F_ID,scope.row.F_WorkOrderCode)">编辑</el-button>
|
|
55
|
56
|
<el-button size="mini" type="text" @click="btn_delete(scope.row.F_WorkOrderCode)">删除
|
|
56
|
57
|
</el-button>
|
|
57
|
|
- <el-button size="mini" type="text">分配</el-button>
|
|
|
58
|
+ <el-button size="mini" type="text" @click="btn_fenpei(scope.row.F_WorkOrderCode,scope.row)">分配</el-button>
|
|
58
|
59
|
<el-button size="mini" type="text">撤回</el-button>
|
|
59
|
60
|
<!-- <el-button v-permission="'btnAssign'" v-if="scope.row.F_State==0" size="mini" type="text"
|
|
60
|
61
|
@click="btn_assign(scope.row.F_ID)">派车
|
|
|
@@ -86,7 +87,7 @@
|
|
86
|
87
|
import addOrEdit from './components/addOrEdit'
|
|
87
|
88
|
import detail from './components/detail'
|
|
88
|
89
|
import assign from './components/assign.vue'
|
|
89
|
|
-
|
|
|
90
|
+ import distribution from './components/distribution.vue'
|
|
90
|
91
|
import Pagination from '@/components/context/Pagination'
|
|
91
|
92
|
|
|
92
|
93
|
export default {
|
|
|
@@ -98,7 +99,7 @@
|
|
98
|
99
|
return {
|
|
99
|
100
|
activeName: '-1',
|
|
100
|
101
|
loading: false,
|
|
101
|
|
- keyword: '',
|
|
|
102
|
+ ordercode: '',
|
|
102
|
103
|
state: '-1',
|
|
103
|
104
|
typeList: [],
|
|
104
|
105
|
type: '',
|
|
|
@@ -108,7 +109,9 @@
|
|
108
|
109
|
pagesize: Number(this.$store.getters.serverConfig.PAGESIZE),
|
|
109
|
110
|
total: 0
|
|
110
|
111
|
},
|
|
111
|
|
- dataLists: []
|
|
|
112
|
+ dataLists: [],
|
|
|
113
|
+ multipleSelection: [],
|
|
|
114
|
+ selectIds:[]
|
|
112
|
115
|
}
|
|
113
|
116
|
},
|
|
114
|
117
|
created() {
|
|
|
@@ -121,6 +124,46 @@
|
|
121
|
124
|
}
|
|
122
|
125
|
},
|
|
123
|
126
|
methods: {
|
|
|
127
|
+ btn_distribute(){
|
|
|
128
|
+ if(this.multipleSelection.length<1){
|
|
|
129
|
+ this.$message.error('没有要分配的选项')
|
|
|
130
|
+ return;
|
|
|
131
|
+ }
|
|
|
132
|
+ this.$layer.iframe({
|
|
|
133
|
+ content: {
|
|
|
134
|
+ content: distribution, // 传递的组件对象
|
|
|
135
|
+ parent: this, // 当前的vue对象
|
|
|
136
|
+ data: {
|
|
|
137
|
+ selectids:this.selectIds,
|
|
|
138
|
+ selectarr:this.multipleSelection
|
|
|
139
|
+ } // props
|
|
|
140
|
+ },
|
|
|
141
|
+ area: ['60%', '60%'],
|
|
|
142
|
+ title: '分配'
|
|
|
143
|
+ })
|
|
|
144
|
+ },
|
|
|
145
|
+ btn_fenpei(id,row){
|
|
|
146
|
+ this.selectIds=[]
|
|
|
147
|
+ this.multipleSelection=[]
|
|
|
148
|
+ this.selectIds.push(id)
|
|
|
149
|
+ this.multipleSelection.push(row)
|
|
|
150
|
+ this.$layer.iframe({
|
|
|
151
|
+ content: {
|
|
|
152
|
+ content: distribution, // 传递的组件对象
|
|
|
153
|
+ parent: this, // 当前的vue对象
|
|
|
154
|
+ data: {
|
|
|
155
|
+ selectids:this.selectIds,
|
|
|
156
|
+ selectarr:this.multipleSelection
|
|
|
157
|
+ } // props
|
|
|
158
|
+ },
|
|
|
159
|
+ area: ['60%', '60%'],
|
|
|
160
|
+ title: '分配'
|
|
|
161
|
+ })
|
|
|
162
|
+ },
|
|
|
163
|
+ handleSelectionChange(val) {
|
|
|
164
|
+ this.multipleSelection = val;
|
|
|
165
|
+ this.selectIds = val.map(item => item.F_WorkOrderCode)
|
|
|
166
|
+ },
|
|
124
|
167
|
handleClick(res) {
|
|
125
|
168
|
this.state = res.name
|
|
126
|
169
|
this.getList()
|
|
|
@@ -142,6 +185,7 @@
|
|
142
|
185
|
pageindex: this.pageParams.pageindex, // 第几页
|
|
143
|
186
|
pagesize: this.pageParams.pagesize, // 每页几条信息
|
|
144
|
187
|
state: this.state,
|
|
|
188
|
+ WorkOrderCode: this.ordercode,
|
|
145
|
189
|
starttime: this.startTime && this.startTime[0],
|
|
146
|
190
|
endtime: this.startTime && this.startTime[1]
|
|
147
|
191
|
}
|