春风项目四线(合箱线、总装线)
jiang
2024-01-29 bf63d510448c9fa3ec0104acb7c19e136bb839e1
提交 | 用户 | 时间
ff985a 1 <template>
2   <div class="app-container">
3     <el-card class="box-card" >
4       <el-row>
96c77f 5         <el-divider><span style="font-size: 30px">发动机返修标记系统</span></el-divider>
ff985a 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>
96c77f 24     <el-row>
ff985a 25       <el-col :span="20">
26         <el-card style="margin-top: 10px; height: 490px;" class="box-card">
d19612 27           <el-tabs v-model="activeName">
5fc587 28             <el-tab-pane label="过站采集" name="first">
29               <el-table max-height="410px" border ref="multipleTable" :data="passingStationCollectionList"  @selection-change="handleSelectionChange">
30                 <el-table-column type="selection" width="55" align="center" />
31                 <el-table-column label="工单编号" width="120" align="center" prop="workOrderNo">
32                 </el-table-column>
33                 <el-table-column label="总成序列号" width="150" align="center" prop="sfcCode">
34                 </el-table-column>
35                 <el-table-column label="产品编号" align="center" prop="productCode">
36                 </el-table-column>
37                 <el-table-column label="产线编号" align="center" prop="productionLine">
38                 </el-table-column>
39                 <el-table-column label="工位编号" align="center" prop="locationCode">
40                 </el-table-column>
41                 <el-table-column label="入站时间" align="center" prop="inboundTime" width="160">
42                   <template slot-scope="scope">
43                     <span>{{ parseTime(scope.row.inboundTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
44                   </template>
45                 </el-table-column>
46                 <el-table-column label="出站时间" align="center" prop="outboundTime" width="160">
47                   <template slot-scope="scope">
48                     <span>{{ parseTime(scope.row.outboundTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
49                   </template>
50                 </el-table-column>
51                 <el-table-column label="是否合格" align="center" prop="outRsSign">
52                 </el-table-column>
53                 <el-table-column label="NG原因" align="center" prop="outMsgSign">
54                 </el-table-column>
55                 <el-table-column label="采集时间" align="center" prop="collectionTime" width="160">
56                   <template slot-scope="scope">
57                     <span>{{ parseTime(scope.row.collectionTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
58                   </template>
59                 </el-table-column>
60                 <el-table-column label="节拍时间" align="center" prop="beatTime">
61                 </el-table-column>
62               </el-table>
63             </el-tab-pane>
d19612 64             <el-tab-pane label="返修记录" name="second" @tab-click="handleClick">
5fc587 65               <el-table max-height="410px" border :data="repairRecordList">
66                 <el-table-column label="发动机号" width="150" align="center" prop="boxCode" />
67                 <el-table-column label="工位号" align="center" prop="processesCode" />
68                 <el-table-column label="返修结果" align="center" prop="repairResults" />
69                 <el-table-column label="原结果" align="center" prop="originalResult" />
70                 <el-table-column label="返修时间" align="center" width="160" prop="repairTime" />
71               </el-table>
72             </el-tab-pane>
73           </el-tabs>
74
ff985a 75         </el-card>
76       </el-col>
77       <el-col :span="4">
bc4a6c 78         <el-card style="margin-top: 10px; min-height: 490px">
79           <el-row class="centered-row">
7574f7 80             <el-button type="success" style="margin-top: 10px;width:120px;height:40px" icon="el-icon-s-grid" @click="selectAll" >选 择 所 有</el-button>
bc4a6c 81           </el-row>
82           <el-row class="centered-row">
7574f7 83             <el-button type="success" style="margin-top: 10px;width:120px;height:40px" icon="el-icon-close" @click="clearAll">取 消 选 择</el-button>
bc4a6c 84           </el-row>
85           <el-row class="centered-row">
7574f7 86             <el-button type="success" style="margin-top: 10px;width:120px;height:40px" icon="el-icon-document-remove" @click="selectUnqualified">选择不合格</el-button>
bc4a6c 87           </el-row>
88           <el-row class="centered-row">
7574f7 89             <el-button type="success" style="margin-top: 10px;width:120px;height:40px" icon="el-icon-s-flag" @click="markComplete">标 记 完 成</el-button>
H 90           </el-row>
91           <el-row class="centered-row">
92           <el-button type="success" style="margin-top: 10px;width:120px;height:40px" icon="el-icon-files" @click="repairRecord">返 修 记 录</el-button>
bc4a6c 93         </el-row>
94           <el-row class="centered-row">
7574f7 95             <el-button type="success" style="margin-top: 10px;width:120px;height:40px" icon="el-icon-date" @click="operationLog" >操 作 日 志</el-button>
bc4a6c 96           </el-row>
ff985a 97         </el-card>
98       </el-col>
99     </el-row>
100
101
102   </div>
103 </template>
104
105 <script>
106 import {
5fc587 107   noPageList,
ff985a 108   insertRepairRecordByIds
109 } from "@/api/main/da/passingStationCollection/passingStationCollection";
5fc587 110 import {noPagelist} from "@/api/main/rm/repairRecord/repairRecord";
ff985a 111 export default {
112   name: "index",
113   dicts: ['sys_normal_disable'],
114   data(){
115     return{
bf63d5 116
J 117       loading: false,//刷新修改
118
5fc587 119       activeName: 'first',
120
ff985a 121       // 返修记录表格数据
122       repairRecordList: [],
123       // 是否显示弹出层
124       open: false,
125       // 产品过站采集表格数据
126       passingStationCollectionList: [],
127       // 查询参数
128       queryParams: {
129         sfcCode: '',
130         outRsSign: '',
131       },
132       ids: [],
5fc587 133       allSelected: false,
134       boxCode: '',
d19612 135       // rules: {
J 136       //   boxCode: [
137       //     { required: true, message: "状态不能为空", trigger: "blur" }
138       //   ]
139       // },
ff985a 140     }
141   },
142   mounted() {
5fc587 143     // this.getList()
ff985a 144   },
145   methods:{
d19612 146     handleClick(tab, event) {
J 147       console.log(tab, event);
148       this.$modal.msgSuccess(tab,event);
149
150     },
ff985a 151     // 取消按钮
152     cancel() {
153       this.open = false;
154     },
155     selectAll(){
156       this.passingStationCollectionList.forEach(row => {
157         this.$refs.multipleTable.toggleRowSelection(row);
158       });
159     },
160     clearAll(){
161       this.$refs.multipleTable.clearSelection();
162     },
163     selectUnqualified(){
164       let outRsSign = this.passingStationCollectionList.filter(row => row.outRsSign === '合格')
165       outRsSign.forEach(row => {
166         this.$refs.multipleTable.toggleRowSelection(row);
167       })
168       this.$modal.msgSuccess('选择不合格');
169     },
170     markComplete(){
171       if(this.ids.length === 0){
172         this.$modal.msgSuccess('未选择');
173       }else {
bf63d5 174         this.loading = true; // 开始加载数据
ff985a 175         this.$modal.msgSuccess('标记完成');
176         let queryParams = {
177           ids: this.ids
178         }
d19612 179         this.repairRecordList = []
ff985a 180         insertRepairRecordByIds(queryParams).then(response => {
bf63d5 181                this.initRepairRecord(); // 刷新返修记录
J 182                this.loading = false; // 结束加载数据
183         }).catch(() => {
184           this.loading = false; // 结束加载数据
ff985a 185         });
d19612 186         // this.initRepairRecord()
J 187         // this.getList();
ff985a 188       }
d19612 189       this. handleQuery();
ff985a 190     },
191     repairRecord(){
192       this.$modal.msgSuccess('返修记录');
193     },
194     operationLog(){
195       this.$modal.msgSuccess('操作日志');
196     },
197     // 多选框选中数据
198     handleSelectionChange(selection) {
199       this.ids = selection.map(item => item.id)
200       this.single = selection.length!==1
201       this.multiple = !selection.length
202     },
203     repairProgressHandleQuery(){
5fc587 204       this.activeName = 'second'
205     },
206     initRepairRecord(){
207       /** 查询返修记录列表 */
208       let queryParams = {
209         boxCode: this.queryParams.sfcCode
ff985a 210       }
d19612 211
5fc587 212       noPagelist(queryParams).then(response => {
213         this.repairRecordList = response.rows;
214       });
d19612 215
ff985a 216     },
217     /** 搜索按钮操作 */
218     handleQuery() {
d19612 219       let sfcCode = this.queryParams.sfcCode
J 220       if(sfcCode === null||sfcCode ===''){
221         this.$message({
222           message: '请填写发动机号!',
223           type: 'warning'
224         });
225       }else {
bf63d5 226         // this.$modal.msgSuccess('搜索');
d19612 227         this.getList();
J 228         this.initRepairRecord();
229       }
ff985a 230     },
231     /** 查询产品过站采集列表 */
232     getList() {
5fc587 233       noPageList(this.queryParams).then(response => {
ff985a 234         this.passingStationCollectionList = response.rows;
235       });
236     },
237
238   },
239 }
240 </script>
241
242 <style scoped>
243 ::v-deep .el-form-item__label{
244   font-size: large;
245 }
e1316f 246 .el-icon-close {
247   margin-left: 20px;
ff985a 248 }
bc4a6c 249 .centered-row {
250   margin-top: 10px;
251   display: flex;
252   justify-content: center;
253 }
ff985a 254 </style>