春风项目四线(合箱线、总装线)
懒羊羊
2024-01-23 ff985a5c0fba76ac5affd00ef47d6a9bdd74989a
提交 | 用户 | 时间
ff985a 1 <template>
2   <div class="app-container">
3     <el-card class="box-card" >
4       <el-row>
5         <el-divider style="margin-bottom: 10px"><span style="font-size: 40px">发动机返修标记系统</span></el-divider>
6       </el-row>
7       <el-row style="margin-top: 10px">
8         <el-form :model="queryParams.sfcCode" ref="queryForm" :inline="true" label-width="68px" >
9           <el-form-item label-width="120" label="发动机号:" prop="orderNo">
10             <el-input
11               v-model="queryParams.sfcCode"
12               placeholder="请输入发动机号"
13               clearable
14               @keyup.enter.native="handleQuery"
15             />
16           </el-form-item>
17           <el-form-item style="margin-left: 20px">
18             <el-button type="primary" icon="el-icon-refresh" @click="handleQuery">查询</el-button>
19             <el-button type="primary" icon="el-icon-scissors" @click="repairProgressHandleQuery">返修进度</el-button>
20           </el-form-item>
21         </el-form>
22       </el-row>
23     </el-card>
24     <el-row :gutter="0">
25       <el-col :span="20">
26         <el-card style="margin-top: 10px; height: 490px;" class="box-card">
27           <el-table border ref="multipleTable" :data="passingStationCollectionList"  @selection-change="handleSelectionChange">
28             <el-table-column type="selection" width="55" align="center" />
29             <el-table-column label="工单编号" width="120" align="center" prop="workOrderNo">
30             </el-table-column>
31             <el-table-column label="总成序列号" width="150" align="center" prop="sfcCode">
32             </el-table-column>
33             <el-table-column label="产品编号" align="center" prop="productCode">
34             </el-table-column>
35             <el-table-column label="产线编号" align="center" prop="productionLine">
36             </el-table-column>
37             <el-table-column label="工位编号" align="center" prop="locationCode">
38             </el-table-column>
39             <el-table-column label="入站时间" align="center" prop="inboundTime" width="100">
40               <template slot-scope="scope">
41                 <span>{{ parseTime(scope.row.inboundTime, '{y}-{m}-{d}') }}</span>
42               </template>
43             </el-table-column>
44             <el-table-column label="出站时间" align="center" prop="outboundTime" width="100">
45               <template slot-scope="scope">
46                 <span>{{ parseTime(scope.row.outboundTime, '{y}-{m}-{d}') }}</span>
47               </template>
48             </el-table-column>
49             <el-table-column label="是否合格" align="center" prop="outRsSign">
50             </el-table-column>
51             <el-table-column label="NG原因" align="center" prop="outMsgSign">
52             </el-table-column>
53             <el-table-column label="采集时间" align="center" prop="collectionTime" width="180">
54               <template slot-scope="scope">
55                 <span>{{ parseTime(scope.row.collectionTime, '{y}-{m}-{d}') }}</span>
56               </template>
57             </el-table-column>
58             <el-table-column label="节拍时间" align="center" prop="beatTime">
59             </el-table-column>
60           </el-table>
61         </el-card>
62       </el-col>
63       <el-col :span="4">
64         <el-card style="margin-top: 10px; min-height: 490px" class="box-card">
65           <el-button type="success" @click="selectAll" style="margin-left: 50px;width: 100px;margin-top: 10px">选择所有</el-button>
66           <el-button type="success" @click="clearAll" style="margin-left: 50px; width: 100px;margin-top: 10px">取消选择</el-button>
67           <el-button type="success" @click="selectUnqualified" style="margin-left: 50px; width: 100px;margin-top: 10px">选择不合格</el-button>
68           <el-button type="success" @click="markComplete" style="margin-left: 50px; width: 100px;margin-top: 10px">标记完成</el-button>
69           <el-button type="success" @click="repairRecord" style="margin-left: 50px; width: 100px;margin-top: 10px">返修记录</el-button>
70           <el-button type="success" @click="operationLog" style="margin-left: 50px; width: 100px;margin-top: 10px">操作日志</el-button>
71
72         </el-card>
73       </el-col>
74     </el-row>
75
76     <el-dialog v-dialogpop-up :visible.sync="open" width="700px" append-to-body>
77       <span slot="title">
78         <i class="el-icon-s-order"></i>
79         返修进度
80       </span>
81       <el-table border :data="repairRecordList">
82         <el-table-column label="发动机号" width="150" align="center" prop="boxCode" />
83         <el-table-column label="工位号" align="center" prop="processesCode" />
84         <el-table-column label="返修结果" align="center" prop="repairResults" />
85         <el-table-column label="原结果" align="center" prop="originalResult" />
86         <el-table-column label="返修时间" align="center" width="160" prop="repairTime" />
87       </el-table>
88       <div slot="footer" class="dialog-footer">
89         <el-button @click="cancel">取 消</el-button>
90       </div>
91     </el-dialog>
92
93
94   </div>
95 </template>
96
97 <script>
98 import {
99   listPassingStationCollection,
100   insertRepairRecordByIds
101 } from "@/api/main/da/passingStationCollection/passingStationCollection";
102 import {listRepairRecord} from "@/api/main/rm/repairRecord/repairRecord";
103 export default {
104   name: "index",
105   dicts: ['sys_normal_disable'],
106   data(){
107     return{
108       // 返修记录表格数据
109       repairRecordList: [],
110       // 是否显示弹出层
111       open: false,
112       // 产品过站采集表格数据
113       passingStationCollectionList: [],
114       // 查询参数
115       queryParams: {
116         sfcCode: '',
117         outRsSign: '',
118       },
119       ids: [],
120       allSelected: false
121
122     }
123   },
124   mounted() {
125     this.getList()
126   },
127   methods:{
128     // 取消按钮
129     cancel() {
130       this.open = false;
131     },
132     selectAll(){
133       this.passingStationCollectionList.forEach(row => {
134         this.$refs.multipleTable.toggleRowSelection(row);
135       });
136     },
137     clearAll(){
138       this.$refs.multipleTable.clearSelection();
139     },
140     selectUnqualified(){
141       let outRsSign = this.passingStationCollectionList.filter(row => row.outRsSign === '合格')
142       outRsSign.forEach(row => {
143         this.$refs.multipleTable.toggleRowSelection(row);
144       })
145       this.$modal.msgSuccess('选择不合格');
146     },
147     markComplete(){
148       if(this.ids.length === 0){
149         this.$modal.msgSuccess('未选择');
150       }else {
151         this.$modal.msgSuccess('标记完成');
152         let queryParams = {
153           ids: this.ids
154         }
155         insertRepairRecordByIds(queryParams).then(response => {
156
157         });
158       }
159     },
160     repairRecord(){
161       this.$modal.msgSuccess('返修记录');
162     },
163     operationLog(){
164       this.$modal.msgSuccess('操作日志');
165     },
166     // 多选框选中数据
167     handleSelectionChange(selection) {
168       this.ids = selection.map(item => item.id)
169       this.single = selection.length!==1
170       this.multiple = !selection.length
171     },
172     repairProgressHandleQuery(){
173       this.open = true;
174       if(this.queryParams.engineNo === ''||this.queryParams.engineNo=== null){
175         this.$modal.msgSuccess('请输入发动机号');
176       }else {
177         /** 查询返修记录列表 */
178         let queryParams = {
179           boxCode: this.queryParams.engineNo
180         }
181         listRepairRecord(queryParams).then(response => {
182           this.repairRecordList = response.rows;
183         });
184       }
185     },
186     /** 搜索按钮操作 */
187     handleQuery() {
188       this.getList();
189     },
190     /** 查询产品过站采集列表 */
191     getList() {
192       listPassingStationCollection(this.queryParams).then(response => {
193         this.passingStationCollectionList = response.rows;
194         this.total = response.total;
195       });
196     },
197
198   },
199 }
200 </script>
201
202 <style scoped>
203 ::v-deep .el-form-item__label{
204   font-size: large;
205 }
206 ::v-deep .el-card__body{
207   padding: 15px 20px 0px 20px;
208 }
209 </style>