春风项目四线(合箱线、总装线)
wujian
5 天以前 ea3c33c8561df39d4f123d1424fda99dd0f0c51d
提交 | 用户 | 时间
c74dcb 1 <template>
W 2   <div class="app-container">
3     <el-card class="box-card">
4       <div class="headClass">
5         <div style="display: flex;height: 20px">
6           <div>
7             <span style="font-size: large; font-weight: bold; text-decoration: underline; margin-bottom: 10px">追溯报表</span>
8           </div>
9           <div style="margin-left: 30%">
10             <el-form :inline="true" :model="queryParams" class="myFrom" size="mini">
11               <el-form-item label="订单编号">
12                 <el-input v-model="queryParams.orderNo" placeholder="订单编号"></el-input>
13               </el-form-item>
14               <el-form-item label="箱体编码">
15                 <el-input v-model="queryParams.engineNo" placeholder="箱体编码">
16                 </el-input>
17               </el-form-item>
18               <el-form-item>
19                 <el-button type="primary" icon="el-icon-search" @click="getList">查询</el-button>
20               </el-form-item>
21               <el-form-item>
22                 <el-button type="primary" icon="el-icon-download" style="background-color: #6dbf6d" @click="exportReport">导出报表</el-button>
23               </el-form-item>
24             </el-form>
25           </div>
26         </div>
27         <div style="margin-top: 10px">
28           <el-table
29             style="width: 100%;"
30             border height="190"
31             v-loading="loading"
32             highlight-current-row
33             :data="orderSchedulingList"
34             @selection-change="handleSelectionChange"
35             @current-change="handleCurrentChange">
36             <el-table-column
37               type="index"
38               width="50"></el-table-column>
39             <el-table-column type="selection" width="55" align="center" />
40             <el-table-column label="订单编号" align="center" prop="orderNo" width="130">
41
42             </el-table-column>
43             <el-table-column label="箱体编码" align="center" prop="engineNo" width="150">
44
45             </el-table-column>
46             <el-table-column label="产品类型" align="center" prop="productType">
47               <template slot-scope="scope">
48                 <dict-tag :options="dict.type.material_type" :value="scope.row.productType"/>
49               </template>
50             </el-table-column>
51             <el-table-column label="机型" align="center" prop="model">
52
53             </el-table-column>
54             <el-table-column label="生产状态" align="center" prop="productionStatus">
55               <template slot-scope="scope">
56                 <dict-tag :options="dict.type.order_scheduling_produce_status" :value="scope.row.productionStatus"/>
57               </template>
58             </el-table-column>
8876c2 59 <!--            <el-table-column label="工时" align="center" prop="workingHours">-->
c74dcb 60
8876c2 61 <!--            </el-table-column>-->
2c65c3 62 <!--            <el-table-column label="工位编号" align="center" prop="currentWorkstation">-->
c74dcb 63
2c65c3 64 <!--            </el-table-column>-->
c74dcb 65             <el-table-column label="质量状态" align="center" prop="qualityStatus">
W 66               <template slot-scope="scope">
67                 <dict-tag :options="dict.type.quality_status" :value="scope.row.qualityStatus"/>
68               </template>
69             </el-table-column>
70             <el-table-column label="合箱上线时间" align="center" prop="boxClosingOnlineTime" width="160">
71             </el-table-column>
72             <el-table-column label="合箱下线时间" align="center" prop="closingBoxOfflineTime" width="160">
73             </el-table-column>
74             <el-table-column label="总装上线时间" align="center" prop="finalAssemblyLaunchTime" width="160">
75             </el-table-column>
76             <el-table-column label="总装下线时间" align="center" prop="finalAssemblyOfflineTime" width="160">
77             </el-table-column>
2c65c3 78 <!--            <el-table-column label="CVT上线时间" align="center" prop="cvtLaunchTime" width="160">-->
W 79 <!--            </el-table-column>-->
80 <!--            <el-table-column label="CVT下线时间" align="center" prop="cvtOfflineTime" width="160">-->
81 <!--            </el-table-column>-->
c74dcb 82             <el-table-column label="操作人" align="center" prop="operator">
W 83
84             </el-table-column>
85             <el-table-column label="操作时间" align="center" prop="operateTime" width="160">
86
87             </el-table-column>
88           </el-table>
89         </div>
90       </div>
91       <pagination
92         v-show="total>0"
93         :total="total"
94         :page.sync="queryParams.pageNum"
95         :limit.sync="queryParams.pageSize"
96         @pagination="getMainList"
97       />
98     </el-card>
99
100     <div>
101       <el-tabs type="border-card">
102         <el-tab-pane>
103           <span slot="label"><i class="el-icon-date"></i>拧紧数据</span>
104           <report1 :list1 = this.list1></report1>
105         </el-tab-pane>
2c65c3 106 <!--        <el-tab-pane>-->
W 107 <!--          <span slot="label"><i class="el-icon-date"></i>相机检测</span>-->
108 <!--          <report2 :list2 = this.list2></report2>-->
109 <!--        </el-tab-pane>-->
c74dcb 110         <el-tab-pane>
W 111           <span slot="label"><i class="el-icon-date"></i>外漏检测</span>
112           <report3 :list3 = this.list3></report3>
113         </el-tab-pane>
114         <el-tab-pane>
115           <span slot="label"><i class="el-icon-date"></i>机油加注</span>
116           <report4 :list4 = this.list4></report4>
117         </el-tab-pane>
118         <el-tab-pane>
119           <span slot="label"><i class="el-icon-date"></i>工位结果</span>
120           <report5 :list5 = this.list5></report5>
121         </el-tab-pane>
122       </el-tabs>
123     </div>
124   </div>
125
126 </template>
127
128 <script>
129 import report1 from "./report1";
130 import {listOrderScheduling, getFollowReport} from "../../../../api/main/bs/orderScheduling/orderScheduling";
131 import report2 from "./report2";
132 import report3 from "./report3";
133 import report4 from "./report4";
134 import report5 from "./report5";
135 export default {
136   name: "index",
137   components: { report1, report2, report3, report4, report5,},
138   dicts: ['order_scheduling_produce_status','quality_status','print_status','material_type'],
139   data() {
140     return {
141       loading: false,
142       total: 0,
143       orderSchedulingList: [],
144       list1: [],
145       list2: [],
146       list3: [],
147       list4: [],
148       list5: [],
149       // 查询参数
150       queryParams: {
151         pageNum: 1,
152         pageSize: 10,
153         orderNo: null,
154         engineNo: null,
155         productType: null,
156         model: null,
157         productionStatus: null,
158         workingHours: null,
159         currentWorkstation: null,
160         qualityStatus: null,
161         whetherOrPrint: null,
162         report10: null,
163         report20: null,
164         combinedBoxTime: null,
165         finalAssemblyTime: null,
166         operator: null,
167         operateTime: null,
168         status: null,
169         spareField1: null,
170         spareField2: null,
171         spareField3: null,
172         spareField4: null,
173         createUser: null,
174         updateUser: null,
175         remarks: null,
176         dateConditions: [],
177         engineNoList: [],
178         engineNoListExcel: []
179       },
180       multipleSelection: [],
181       multipleSelectionExcel: [],
182       currentRow: null
183     }
184   },
185
186   created() {
187     let workOrderNo = this.$route.query.workOrderNo;
188     this.queryParams.orderNo = workOrderNo
189     this.getMainList();
8876c2 190     // this.getChildList();
c74dcb 191   },
W 192   methods: {
193     toggleSelection(rows) {
194       if (rows) {
195         rows.forEach(row => {
196           this.$refs.multipleTable.toggleRowSelection(row);
197         });
198       } else {
199         this.$refs.multipleTable.clearSelection();
200       }
201     },
202     handleSelectionChange(val) {
203       this.multipleSelectionExcel = val;
204       console.log('MMMMM--',this.multipleSelectionExcel)
205       if (this.multipleSelectionExcel !== null && this.multipleSelectionExcel.length > 0){
206         this.queryParams.engineNoListExcel = []
207         this.multipleSelectionExcel.forEach(x => {
208           this.queryParams.engineNoListExcel.push(x.engineNo)
209
210         })
211       }else {
212         this.queryParams.engineNoListExcel = []
213       }
214       console.log('this.handleSelectionChange ',this.queryParams.engineNoListExcel )
215     },
216     handleCurrentChange(val) {
217       this.currentRow = val;
218       //查询选中行数据
219       this.queryParams.engineNoList = []
220       this.queryParams.engineNoList.push(this.currentRow.engineNo)
221       this.getChildList()
222       console.log('handleCurrentChange',this.queryParams.engineNoList)
223       console.log('handleCurrentChange222',this.queryParams.engineNoListExcel)
224     },
225     //导出
226     exportReport(){
227       if (this.queryParams.engineNoListExcel.length === 0){
228         this.$message.error("请勾选需要导出的数据")
229       }else {
230         this.queryParams.engineNoList = []
231         this.download('bs/orderScheduling/exportFollow', {
232           ...this.queryParams
233         }, `追溯报表_${new Date().getTime()}.xlsx`)
234       }
235
236     },
237     /** 查询订单排产列表 */
238     getMainList() {
239       this.loading = true;
240       console.log(this.queryParams)
8876c2 241       let query = {
W 242         pageNum: this.queryParams.pageNum,
243         pageSize: this.queryParams.pageSize,
244         orderNo: this.queryParams.orderNo,
245         engineNo: this.queryParams.engineNo,
246         engineNoList: [],
247       }
248       listOrderScheduling(query).then(response => {
c74dcb 249         this.orderSchedulingList = response.rows;
W 250         this.total = response.total;
251         this.loading = false;
252       });
253     },
254     getChildList(){
255       getFollowReport(this.queryParams).then(response => {
256         this.list1 = response.data.list1;
257         console.log('list111111',this.list1)
258         this.list2 = response.data.list2;
259         this.list3 = response.data.list3;
260         this.list4 = response.data.list4;
261         this.list5 = response.data.list5;
262
263       });
264     },
265     getList(){
266       this.getMainList()
8876c2 267       // this.getChildList()
c74dcb 268     }
W 269     // handleCurrentChange(val) {
270     //   this.multipleSelection = val;
271     //   console.log('this.multipleSelection ',this.multipleSelection )
272     // }
273   }
274 }
275 </script>
276
277 <style scoped>
278 .headClass {
279   height: 200px;
280 }
281 ::v-deep .el-table--scrollable-x .el-table__body-wrapper {
282    z-index: 3;
283  }
284 ::v-deep .el-table__body-wrapper::-webkit-scrollbar {
285    height: 6px;
286  }
287 ::v-deep .el-form .myFrom .el-form--inline{
288   height: 20px;
289 }
290 ::v-deep .el-card__body {
291   padding: 10px 15px 10px 15px;
292 }
293 .app-container{
294   height: 625px;
295 }
296 </style>