yyt
2024-06-26 0cceb649e1dc443c2a91d26d81eacb0867c96db3
提交 | 用户 | 时间
0cceb6 1 <template>
Y 2   <div class="app-container">
3     <div style="height: 100%;width: 100%">
4       <el-card class="box-card" >
5         <el-form :model="queryParams.orderNo" ref="queryForm" :inline="true" >
6           <el-form-item label="工单编号:" prop="orderNo" >
7             <el-input
8               style="width: 160px"
9               v-model="queryParams.orderNo"
10               placeholder="请输入工单编号"
11               clearable
12               @keyup.enter.native="handleQuery"
13             />
14           </el-form-item>
15           <el-form-item style="margin-left: 1%">
16             <el-button type="primary" icon="el-icon-refresh" @click="handleQuery">查询</el-button>
17           </el-form-item>
18           <el-form-item style="margin-left: 5%">
19             <el-checkbox-group v-model="queryParams.isRepairFlag">
20               <el-checkbox @change="cleanFlag" name="type"></el-checkbox>
21             </el-checkbox-group>
22           </el-form-item>
23           <el-form-item  label="返修发动机号:" prop="repairEngineNo" >
24
25             <el-input
26               style="width: 160px"
27               :disabled="!queryParams.isRepairFlag"
28               v-model="queryParams.repairEngineNo"
29               clearable
30               @keyup.enter.native="handleQuery"
31             />
32           </el-form-item>
33
34
35         </el-form>
36       </el-card>
37       <el-row :gutter="0">
38         <el-col :span="20">
39           <div style="height: 490px;">
40             <el-card style="margin-top: 10px; height: 490px; width: 100%" class="box-card">
41               <el-table border v-loading="loading" :data="dataList" height="460"
42                         style="width: 100%" v-if="dataList.length > 0">
43
44                 <el-table-column :show-overflow-tooltip='true' label="工单编号"  align="center" prop="orderNo">
45                 </el-table-column>
46                 <el-table-column  :show-overflow-tooltip='true' label="产品小系列"  align="center" prop="model">
47                 </el-table-column>
48                 <el-table-column :show-overflow-tooltip='true' label="SN流水号"  align="center" prop="engineNo">
49                 </el-table-column>
50                 <el-table-column label="状态" width="80" align="center" prop="productionStatus">
51                   <!--                <template slot-scope="scope">-->
52                   <!--                  <span v-if="scope.row.productionStatus === '1'">是</span>-->
53                   <!--                  <span v-if="scope.row.productionStatus === '0'">否</span>-->
54                   <!--                </template>-->
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>
59                 <el-table-column label="是否打印" width="80"  align="center" prop="whetherOrPrint">
60
61                   <template slot-scope="scope">
62                     <dict-tag :options="dict.type.print_status" :value="scope.row.whetherOrPrint"/>
63                   </template>
64
65                 </el-table-column>
66                 <el-table-column label="打印时间" align="center" prop="null">
67                 </el-table-column>
68               </el-table>
69               <el-empty v-else>
70                 <span slot="description">暂无数据</span>
71               </el-empty>
72             </el-card>
73           </div>
74
75         </el-col>
76         <el-col :span="4">
77
78           <el-card style="margin-top: 10px; min-height: 490px" class="box-card">
79             <div >
80               <el-row class="centerImg" style="min-width: 80%;min-height: 90%">
81                 <vue-qr
82                   v-if="qrCode !==''"
83                   ref="qrCode"
84                   :text="qrCode"
85                   width="100%"
86                   height="100%"
87                 ></vue-qr>
88               </el-row>
89               <el-row class="centerImg">
90                 <el-button type="success" style="margin-top: 80%; width: 100%">系统设置</el-button>
91               </el-row>
92
93
94
95             </div>
96           </el-card>
97         </el-col>
98       </el-row>
99     </div>
100
101
102
103   </div>
104 </template>
105
106 <script>
107 import {listOrderScheduling2} from "@/api/main/bs/orderScheduling/orderScheduling";
108 import VueQr from 'vue-qr'
109 export default {
110   name: "index",
111   dicts: ['sys_normal_disable','order_scheduling_produce_status','print_status'],
112   components: {
113     VueQr,
114   },
115   data(){
116     return{
117       qrCode: '',
118       // 查询参数
119       queryParams: {
120         orderNo: '',
121         isRepairFlag: '',
122         repairEngineNo: ''
123       },
124       dataList: []
125     }
126   },
127   methods:{
128     /** 搜索按钮操作 */
129     handleQuery() {
130       this.getList();
131     },
132     getList(){
133       listOrderScheduling2(this.queryParams).then(response => {
134         console.log("--------------------"+response.rows)
135         this.dataList = response.rows
136         if (this.queryParams.orderNo === '' || this.queryParams.orderNo === null){
137           this.qrCode = ''
138         }else {
139           if (this.dataList.length > 0){
140             this.qrCode = this.queryParams.orderNo
141           }else {
142             this.qrCode = ''
143           }
144         }
145         console.log("qrcode",this.qrCode)
146
147       });
148     },
149     filterTag(value, row) {
150       return row.tag === value;
151     },
152     cleanFlag(){
153       if (this.queryParams.isRepairFlag === false){
154         this.queryParams.repairEngineNo = ''
155       }
156     },
157     filterHandler(value, row, column) {
158       const property = column['property'];
159       return row[property] === value;
160     },
161
162   },
163   mounted() {
164     this.getList()
165   }
166 }
167 </script>
168
169 <style scoped>
170 ::v-deep .el-form-item__label{
171   font-size: large;
172 }
173 ::v-deep .el-card__body{
174   padding: 15px 20px 0px 20px;
175 }
176 ::v-deep .el-input .el-input--medium .el-input--suffix{
177   width: 200px;
178 }
179 .centerImg{
180   display: flex;
181   justify-content: center;
182   align-items: center;
183 }
184 </style>