春风项目四线(合箱线、总装线)
cl
2024-01-29 8fa368775c81c2bfb0b914de6f0fee57be4e73af
提交 | 用户 | 时间
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" />
8fa368 31 <!--                <el-table-column label="工单编号" width="120" align="center" prop="workOrderNo">
C 32                 </el-table-column>-->
33                 <el-table-column label="发动机号" min-width="160" align="center" prop="sfcCode">
5fc587 34                 </el-table-column>
8fa368 35 <!--                <el-table-column label="产品编号" align="center" prop="productCode">
5fc587 36                 </el-table-column>
37                 <el-table-column label="产线编号" align="center" prop="productionLine">
8fa368 38                 </el-table-column>-->
5fc587 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>
8fa368 53 <!--                <el-table-column label="NG原因" align="center" prop="outMsgSign">
C 54                 </el-table-column>-->
5fc587 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>
8fa368 60 <!--                <el-table-column label="节拍时间" align="center" prop="beatTime">
C 61                 </el-table-column>-->
5fc587 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">
8fa368 66                 <el-table-column label="发动机号" min-width="160" align="center" prop="boxCode" />
5fc587 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" />
8fa368 70                 <el-table-column label="返修时间" align="center"  prop="repairTime" />
5fc587 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{
5fc587 116       activeName: 'first',
117
ff985a 118       // 返修记录表格数据
119       repairRecordList: [],
120       // 是否显示弹出层
121       open: false,
122       // 产品过站采集表格数据
123       passingStationCollectionList: [],
124       // 查询参数
125       queryParams: {
126         sfcCode: '',
127         outRsSign: '',
128       },
129       ids: [],
5fc587 130       allSelected: false,
131       boxCode: '',
d19612 132       // rules: {
J 133       //   boxCode: [
134       //     { required: true, message: "状态不能为空", trigger: "blur" }
135       //   ]
136       // },
ff985a 137     }
138   },
139   mounted() {
5fc587 140     // this.getList()
ff985a 141   },
142   methods:{
d19612 143     handleClick(tab, event) {
J 144       console.log(tab, event);
145       this.$modal.msgSuccess(tab,event);
146
147     },
ff985a 148     // 取消按钮
149     cancel() {
150       this.open = false;
151     },
152     selectAll(){
153       this.passingStationCollectionList.forEach(row => {
154         this.$refs.multipleTable.toggleRowSelection(row);
155       });
156     },
157     clearAll(){
158       this.$refs.multipleTable.clearSelection();
159     },
160     selectUnqualified(){
161       let outRsSign = this.passingStationCollectionList.filter(row => row.outRsSign === '合格')
162       outRsSign.forEach(row => {
163         this.$refs.multipleTable.toggleRowSelection(row);
164       })
165       this.$modal.msgSuccess('选择不合格');
166     },
167     markComplete(){
168       if(this.ids.length === 0){
169         this.$modal.msgSuccess('未选择');
170       }else {
171         this.$modal.msgSuccess('标记完成');
172         let queryParams = {
173           ids: this.ids
174         }
d19612 175         this.repairRecordList = []
ff985a 176         insertRepairRecordByIds(queryParams).then(response => {
177
178         });
d19612 179         // this.initRepairRecord()
J 180         // this.getList();
ff985a 181       }
d19612 182       this. handleQuery();
ff985a 183     },
184     repairRecord(){
185       this.$modal.msgSuccess('返修记录');
186     },
187     operationLog(){
188       this.$modal.msgSuccess('操作日志');
189     },
190     // 多选框选中数据
191     handleSelectionChange(selection) {
192       this.ids = selection.map(item => item.id)
193       this.single = selection.length!==1
194       this.multiple = !selection.length
195     },
196     repairProgressHandleQuery(){
5fc587 197       this.activeName = 'second'
198     },
199     initRepairRecord(){
200       /** 查询返修记录列表 */
201       let queryParams = {
202         boxCode: this.queryParams.sfcCode
ff985a 203       }
d19612 204
5fc587 205       noPagelist(queryParams).then(response => {
206         this.repairRecordList = response.rows;
207       });
d19612 208
ff985a 209     },
210     /** 搜索按钮操作 */
211     handleQuery() {
d19612 212       let sfcCode = this.queryParams.sfcCode
J 213       if(sfcCode === null||sfcCode ===''){
214         this.$message({
215           message: '请填写发动机号!',
216           type: 'warning'
217         });
218       }else {
219         this.$modal.msgSuccess('搜索');
220         this.getList();
221         this.initRepairRecord();
222       }
ff985a 223     },
224     /** 查询产品过站采集列表 */
225     getList() {
5fc587 226       noPageList(this.queryParams).then(response => {
ff985a 227         this.passingStationCollectionList = response.rows;
228       });
229     },
230
231   },
232 }
233 </script>
234
235 <style scoped>
236 ::v-deep .el-form-item__label{
237   font-size: large;
238 }
e1316f 239 .el-icon-close {
240   margin-left: 20px;
ff985a 241 }
bc4a6c 242 .centered-row {
243   margin-top: 10px;
244   display: flex;
245   justify-content: center;
246 }
ff985a 247 </style>