春风项目四线(合箱线、总装线)
hdy
2024-01-31 254a3993588431f2f4c0e76f062d22b6f7db17ca
提交 | 用户 | 时间
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";
53397c 111 import {warning} from "@riophae/vue-treeselect/src/utils";
ff985a 112 export default {
113   name: "index",
114   dicts: ['sys_normal_disable'],
115   data(){
116     return{
bf63d5 117
J 118       loading: false,//刷新修改
119
5fc587 120       activeName: 'first',
121
ff985a 122       // 返修记录表格数据
123       repairRecordList: [],
124       // 是否显示弹出层
125       open: false,
126       // 产品过站采集表格数据
127       passingStationCollectionList: [],
128       // 查询参数
129       queryParams: {
130         sfcCode: '',
131         outRsSign: '',
132       },
133       ids: [],
5fc587 134       allSelected: false,
135       boxCode: '',
d19612 136       // rules: {
J 137       //   boxCode: [
138       //     { required: true, message: "状态不能为空", trigger: "blur" }
139       //   ]
140       // },
ff985a 141     }
142   },
143   mounted() {
5fc587 144     // this.getList()
ff985a 145   },
146   methods:{
d19612 147     handleClick(tab, event) {
J 148       console.log(tab, event);
149       this.$modal.msgSuccess(tab,event);
150
151     },
ff985a 152     // 取消按钮
153     cancel() {
154       this.open = false;
155     },
156     selectAll(){
157       this.passingStationCollectionList.forEach(row => {
158         this.$refs.multipleTable.toggleRowSelection(row);
159       });
160     },
161     clearAll(){
162       this.$refs.multipleTable.clearSelection();
163     },
164     selectUnqualified(){
165       let outRsSign = this.passingStationCollectionList.filter(row => row.outRsSign === '合格')
166       outRsSign.forEach(row => {
167         this.$refs.multipleTable.toggleRowSelection(row);
168       })
169       this.$modal.msgSuccess('选择不合格');
170     },
171     markComplete(){
172       if(this.ids.length === 0){
53397c 173         this.$message({
J 174           message: '未标记!',
175           type: 'warning'
176         })
ff985a 177       }else {
bf63d5 178         this.loading = true; // 开始加载数据
ff985a 179         this.$modal.msgSuccess('标记完成');
53397c 180
ff985a 181         let queryParams = {
182           ids: this.ids
183         }
d19612 184         this.repairRecordList = []
ff985a 185         insertRepairRecordByIds(queryParams).then(response => {
bf63d5 186                this.initRepairRecord(); // 刷新返修记录
J 187                this.loading = false; // 结束加载数据
188         }).catch(() => {
189           this.loading = false; // 结束加载数据
ff985a 190         });
d19612 191         // this.initRepairRecord()
J 192         // this.getList();
ff985a 193       }
d19612 194       this. handleQuery();
ff985a 195     },
196     repairRecord(){
197       this.$modal.msgSuccess('返修记录');
198     },
199     operationLog(){
200       this.$modal.msgSuccess('操作日志');
201     },
202     // 多选框选中数据
203     handleSelectionChange(selection) {
204       this.ids = selection.map(item => item.id)
205       this.single = selection.length!==1
206       this.multiple = !selection.length
207     },
208     repairProgressHandleQuery(){
5fc587 209       this.activeName = 'second'
210     },
211     initRepairRecord(){
212       /** 查询返修记录列表 */
213       let queryParams = {
214         boxCode: this.queryParams.sfcCode
ff985a 215       }
d19612 216
5fc587 217       noPagelist(queryParams).then(response => {
218         this.repairRecordList = response.rows;
219       });
d19612 220
ff985a 221     },
222     /** 搜索按钮操作 */
223     handleQuery() {
d19612 224       let sfcCode = this.queryParams.sfcCode
J 225       if(sfcCode === null||sfcCode ===''){
226         this.$message({
227           message: '请填写发动机号!',
228           type: 'warning'
229         });
230       }else {
bf63d5 231         // this.$modal.msgSuccess('搜索');
d19612 232         this.getList();
J 233         this.initRepairRecord();
234       }
ff985a 235     },
236     /** 查询产品过站采集列表 */
237     getList() {
5fc587 238       noPageList(this.queryParams).then(response => {
ff985a 239         this.passingStationCollectionList = response.rows;
240       });
241     },
242
243   },
244 }
245 </script>
246
247 <style scoped>
248 ::v-deep .el-form-item__label{
249   font-size: large;
250 }
e1316f 251 .el-icon-close {
252   margin-left: 20px;
ff985a 253 }
bc4a6c 254 .centered-row {
255   margin-top: 10px;
256   display: flex;
257   justify-content: center;
258 }
ff985a 259 </style>