懒羊羊
2024-01-04 06205a1b49435f32b17b0a9e9673e9fa8ac28fda
提交 | 用户 | 时间
4dbe17 1 <template>
2   <div class="app-container">
5d5153 3     <el-card class="box-card">
4dbe17 4     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
5d5153 5       <el-form-item label-width="80" label="生产工单号" prop="workOrderNo">
4dbe17 6         <el-input
7           v-model="queryParams.workOrderNo"
8           placeholder="请输入生产工单号"
9           clearable
10           @keyup.enter.native="handleQuery"
11         />
12       </el-form-item>
13       <el-form-item label="产品名称" prop="productName">
14         <el-input
15           v-model="queryParams.productName"
16           placeholder="请输入产品名称"
5d5153 17           clearable
18           @keyup.enter.native="handleQuery"
19         />
20       </el-form-item>
21       <el-form-item label="工单状态" prop="orderStatus">
22         <el-select v-model="queryParams.orderStatus" placeholder="请选择工单状态" clearable>
23           <el-option
24             v-for="dict in dict.type.order_state"
25             :key="dict.value"
26             :label="dict.label"
27             :value="dict.value"
28           />
29         </el-select>
30       </el-form-item>
31       <el-form-item style="float: right">
32         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
33         <el-button type="warning" icon="el-icon-copy-document" size="mini" @click="advancedQuery">高级查询</el-button>
34         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
35       </el-form-item>
36     </el-form>
37     <el-form :model="queryParams" ref="queryParams" size="small" :inline="true" v-show="advancedShowSearch" label-width="68px">
38       <el-form-item style="margin-left: 14px" label="产品编号" prop="productCode">
39         <el-input
40           v-model="queryParams.productCode"
41           placeholder="请输入产品编号"
42           clearable
43           @keyup.enter.native="handleQuery"
44         />
45       </el-form-item>
46       <el-form-item label="订单编号" prop="salesOrderCode">
47         <el-input
48           v-model="queryParams.salesOrderCode"
49           placeholder="请输入订单编号"
4dbe17 50           clearable
51           @keyup.enter.native="handleQuery"
52         />
53       </el-form-item>
54       <el-form-item label="车间编号" prop="workshopCode">
55         <el-input
56           v-model="queryParams.workshopCode"
57           placeholder="请输入车间编号"
58           clearable
59           @keyup.enter.native="handleQuery"
60         />
61       </el-form-item>
62       <el-form-item label="产线编号" prop="lineCode">
63         <el-input
64           v-model="queryParams.lineCode"
65           placeholder="请输入产线编号"
66           clearable
67           @keyup.enter.native="handleQuery"
68         />
69       </el-form-item>
5d5153 70       <el-form-item style="margin-left: 7px" label-width="80" label="产品BOM" prop="bomCode">
71         <el-input
72           v-model="queryParams.bomCode"
73           placeholder="请输入产品BOM"
74           clearable
75           @keyup.enter.native="handleQuery"
76         />
77       </el-form-item>
4dbe17 78       <el-form-item label="工艺流程" prop="routeCode">
79         <el-input
80           v-model="queryParams.routeCode"
81           placeholder="请输入工艺流程"
82           clearable
83           @keyup.enter.native="handleQuery"
84         />
85       </el-form-item>
5d5153 86
4dbe17 87       <el-form-item label="工艺配方" prop="recipeCode">
88         <el-input
89           v-model="queryParams.recipeCode"
90           placeholder="请输入工艺配方"
91           clearable
92           @keyup.enter.native="handleQuery"
93         />
94       </el-form-item>
95     </el-form>
5d5153 96     </el-card>
4dbe17 97
5d5153 98     <el-card style="margin-top: 10px" class="box-card">
4dbe17 99     <el-row :gutter="10" class="mb8">
100       <el-col :span="1.5">
101         <el-button
102           type="primary"
103           plain
104           icon="el-icon-plus"
105           size="mini"
106           @click="handleAdd"
107           v-hasPermi="['om:productionOrde:add']"
108         >新增</el-button>
109       </el-col>
110       <el-col :span="1.5">
111         <el-button
112           type="success"
113           plain
114           icon="el-icon-edit"
115           size="mini"
116           :disabled="single"
117           @click="handleUpdate"
118           v-hasPermi="['om:productionOrde:edit']"
119         >修改</el-button>
120       </el-col>
121       <el-col :span="1.5">
122         <el-button
123           type="danger"
124           plain
125           icon="el-icon-delete"
126           size="mini"
127           :disabled="multiple"
128           @click="handleDelete"
129           v-hasPermi="['om:productionOrde:remove']"
130         >删除</el-button>
131       </el-col>
132       <el-col :span="1.5">
133         <el-button
134           type="warning"
135           plain
136           icon="el-icon-download"
137           size="mini"
138           @click="handleExport"
139           v-hasPermi="['om:productionOrde:export']"
140         >导出</el-button>
141       </el-col>
53b67e 142       <el-col :span="1.5">
143         <el-button
144           type="warning"
145           plain
875966 146           icon="el-icon-upload2"
53b67e 147           :disabled="move"
148           size="mini"
14b533 149           @click="moveUp(val => val, 'up')"
53b67e 150         >上移</el-button>
151       </el-col>
152       <el-col :span="1.5">
153         <el-button
154           type="warning"
155           plain
156           icon="el-icon-download"
157           size="mini"
158           :disabled="move"
14b533 159           @click="moveUp(val => val, 'down')"
53b67e 160         >下移</el-button>
161       </el-col>
4dbe17 162       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
163     </el-row>
164
03bb7a 165       <el-table border v-loading="loading" :data="productionOrdeList" @selection-change="handleSelectionChange">
5d5153 166         <el-table-column type="selection" width="55" align="center" />
b800e7 167         <el-table-column label="生产工单号" width="160" align="center">
168           <template slot-scope="scope">
169             <router-link :to="{path: '/main/workReport-data/index/', query: {workOrderNo: scope.row.workOrderNo} }" class="link-type">
170               <span>{{ scope.row.workOrderNo }}</span>
171             </router-link>
172           </template>
173         </el-table-column>
174         <el-table-column label="订单编号" width="140" align="center" prop="salesOrderCode">
175         </el-table-column>
176         <el-table-column label="产品编号" width="140" align="center" prop="productCode">
177         </el-table-column>
178         <el-table-column label="产品名称" width="160" align="center" prop="productName">
179         </el-table-column>
180         <el-table-column label="工单状态" align="center" prop="orderStatus">
181           <template slot-scope="scope">
182             <dict-tag :options="dict.type.order_state" :value="scope.row.orderStatus"/>
183           </template>
184         </el-table-column>
185         <el-table-column label="车间编号" align="center" prop="workshopCode">
186         </el-table-column>
187         <el-table-column label="产线编号" align="center" prop="lineCode">
188         </el-table-column>
189         <el-table-column label="工艺流程" width="140" align="center" prop="routeCode">
190         </el-table-column>
191         <el-table-column label="产品BOM" width="140" align="center" prop="bomCode">
192         </el-table-column>
193         <el-table-column label="工艺配方" width="140" align="center" prop="recipeCode">
194         </el-table-column>
195         <el-table-column label="计划数量" align="center" prop="planQty">
196         </el-table-column>
197         <el-table-column label="实际数量" align="center" prop="actualQty">
198         </el-table-column>
199         <el-table-column label="实际上线数量" width="100" align="center" prop="actualOnlineQty">
200         </el-table-column>
201         <el-table-column label="需求日期" align="center" prop="demandDate" width="180">
202         </el-table-column>
203         <el-table-column label="计划开始时间" width="160" align="center" prop="planStartTime">
204         </el-table-column>
205         <el-table-column label="计划结束时间" width="160" align="center" prop="planEndTime">
206         </el-table-column>
207         <el-table-column label="实际开始时间" width="160" align="center" prop="actualStartTime">
208         </el-table-column>
209         <el-table-column label="实际结束时间" width="160" align="center" prop="actualEndTime">
210         </el-table-column>
211         <el-table-column width="160" label="创建时间" align="center" prop="createTime">
212         </el-table-column>
213         <el-table-column width="160" label="更新时间" align="center" prop="updateTime">
214         </el-table-column>
215         <el-table-column label="创建人" width="80" align="center" prop="createUser">
216         </el-table-column>
217         <el-table-column label="修改人" width="80" align="center" prop="updateUser">
218         </el-table-column>
219         <el-table-column label="备注" width="100" align="center" prop="remarks">
220         </el-table-column>
221         <el-table-column label="流水号" align="center" prop="streamNumber">
222         </el-table-column>
223         <el-table-column label="客户" width="80" align="center" prop="custom">
224         </el-table-column>
53b67e 225         <el-table-column fixed="right" width="350" label="操作" align="center" class-name="small-padding fixed-width">
5d5153 226           <template slot-scope="scope">
227             <!--  工单状态(1创建、2已发布、3生产中、4已冻结、5已完工、6已关闭) -->
03bb7a 228             <el-button type="success" :disabled="scope.row.orderStatus !== '1'"  style="width: 72px" plain @click="handleCommand('3',scope.row.id)" size="mini">开始</el-button>
229             <el-button style="width: 72px" :disabled="scope.row.orderStatus !== '2' && scope.row.orderStatus !== '3'" v-if="scope.row.orderStatus !== '2'&&  scope.row.orderStatus !== '4'" plain @click="handleCommand('4',scope.row.id)" type="warning" size="mini">冻结</el-button>
230             <el-button style="width: 72px" :disabled="scope.row.orderStatus !== '4'" v-if="scope.row.orderStatus === '4'" plain @click="handleCommand('3',scope.row.id)" type="warning" size="mini">解冻</el-button>
231             <el-button style="width: 72px" :disabled="scope.row.orderStatus !== '1'" plain @click="handleCommand('6',scope.row.id)" v-if="scope.row.orderStatus === '1'||scope.row.orderStatus === '3'||scope.row.orderStatus === '4'||scope.row.orderStatus === '5'" type="danger" size="mini">关闭</el-button>
232             <el-button style="width: 72px" :disabled="scope.row.orderStatus !== '6'" plain @click="handleCommand('1',scope.row.id)" v-if="scope.row.orderStatus === '6' " type="success" size="mini">启用</el-button>
53b67e 233 <!--            <el-button-->
234 <!--              :disabled="scope.row.orderStatus !== '1'"-->
235 <!--              size="mini"-->
236 <!--              type="success"-->
237 <!--              style="width: 72px"-->
238 <!--              icon="el-icon-edit"-->
239 <!--              @click="handleUpdate(scope.row)"-->
240 <!--              v-hasPermi="['om:productionOrde:edit']"-->
241 <!--            >修改</el-button>-->
242 <!--            <el-button-->
243 <!--              :disabled="scope.row.orderStatus !== '1'"-->
244 <!--              size="mini"-->
245 <!--              type="warning"-->
246 <!--              style="width: 72px"-->
247 <!--              icon="el-icon-delete"-->
248 <!--              @click="handleDelete(scope.row)"-->
249 <!--              v-hasPermi="['om:productionOrde:remove']"-->
250 <!--            >删除</el-button>-->
03bb7a 251             <el-button style="width: 72px" :disabled="scope.row.orderStatus === '4'||scope.row.orderStatus === '6'" v-if="scope.row.orderStatus !== '5'" @click="handleCommand('5',scope.row.id)" type="success" size="mini">完成</el-button>
53b67e 252             <el-button style="width: 72px" :disabled="scope.row.orderStatus === '5'" v-if="scope.row.orderStatus === '5'" type="success" size="mini">已完工</el-button>            <el-button style="width: 72px" :disabled="scope.row.orderStatus !== '6'" plain @click="handleCommand('1',scope.row.id)" v-if="scope.row.orderStatus === '6' " type="success" size="mini">启用</el-button>
5d5153 253           </template>
254         </el-table-column>
255       </el-table>
256     </el-card>
257
4dbe17 258
259     <pagination
260       v-show="total>0"
261       :total="total"
262       :page.sync="queryParams.pageNum"
263       :limit.sync="queryParams.pageSize"
264       @pagination="getList"
265     />
266
267     <!-- 添加或修改生产工单对话框 -->
45a2ee 268     <el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="1000px" append-to-body>
b800e7 269        <span slot="title">
270         <i class="el-icon-s-order"></i>
271         {{titleName}}
272       </span>
5d5153 273       <el-form ref="form" inline :model="form" :rules="rules" label-width="80px">
274         <el-form-item label="工单号" prop="workOrderNo">
4dbe17 275           <el-input v-model="form.workOrderNo" placeholder="请输入生产工单号" />
276         </el-form-item>
277         <el-form-item label="订单编号" prop="salesOrderCode">
278           <el-input v-model="form.salesOrderCode" placeholder="请输入订单编号" />
279         </el-form-item>
280         <el-form-item label="产品编号" prop="productCode">
5d5153 281           <el-input v-model="form.productCode" placeholder="请选择产品" >
282             <el-button slot="append" @click="handleSelectProduct" icon="el-icon-search"></el-button>
283           </el-input>
284           <ItemSelect ref="itemSelect" @onSelected="onItemSelected" > </ItemSelect>
4dbe17 285         </el-form-item>
286         <el-form-item label="产品名称" prop="productName">
5d5153 287           <el-input v-model="form.productName" disabled placeholder="请输入产品名称" />
4dbe17 288         </el-form-item>
289         <el-form-item label="车间编号" prop="workshopCode">
01b045 290           <el-select style="width: 93%" @change="handleSelectChange(form.workshopCode)" v-model="form.workshopCode" placeholder="请选择车间编号">
b800e7 291             <el-option
292               v-for="item in options"
293               :key="item.workshopCode"
294               :label="item.workshopName"
295               :value="item.workshopCode">
296             </el-option>
297           </el-select>
4dbe17 298         </el-form-item>
b800e7 299         <el-form-item style="margin-left: -15px" label="产线编号" prop="lineCode">
300           <el-select style="width: 93%" v-model="form.lineCode" placeholder="请选择产线编号">
301             <el-option
302               v-for="item in lineOptions"
303               :key="item.lineCode"
304               :label="item.lineName"
305               :value="item.lineCode">
306             </el-option>
307           </el-select>
4dbe17 308         </el-form-item>
b800e7 309         <el-form-item label="工艺流程" prop="routeCode">
310           <el-input v-model="form.routeCode" disabled placeholder="请输入工艺流程" />
4dbe17 311         </el-form-item>
b800e7 312         <el-form-item label="产品BOM" prop="bomCode">
313           <el-input v-model="form.bomCode" disabled placeholder="请输入产品BOM" />
4dbe17 314         </el-form-item>
315         <el-form-item label="工艺配方" prop="recipeCode">
316           <el-input v-model="form.recipeCode" placeholder="请输入工艺配方" />
317         </el-form-item>
318         <el-form-item label="计划数量" prop="planQty">
319           <el-input v-model="form.planQty" placeholder="请输入计划数量" />
320         </el-form-item>
321         <el-form-item label="需求日期" prop="demandDate">
b800e7 322           <el-date-picker style="width: 88%" clearable
4dbe17 323             v-model="form.demandDate"
324             type="date"
325             value-format="yyyy-MM-dd"
326             placeholder="请选择需求日期">
327           </el-date-picker>
328         </el-form-item>
b800e7 329         <el-form-item style="margin-left: -30px" label="备注" prop="remarks">
4dbe17 330           <el-input v-model="form.remarks" placeholder="请输入备注" />
331         </el-form-item>
b800e7 332         <el-row>
333           <el-col :span="12">
334             <el-form-item style="margin-left: 10px" label-width="120" label="计划开始时间" prop="planStartTime">
335               <el-date-picker clearable
01b045 336                 v-model="form.planStartTime"
337                 type="date"
338                 value-format="yyyy-MM-dd"
339                 placeholder="请选择计划开始时间">
b800e7 340               </el-date-picker>
341             </el-form-item>
342           </el-col>
343           <el-col :span="12">
344             <el-form-item style="margin-left: 76px" label-width="120" label="计划结束时间" prop="planEndTime">
345               <el-date-picker clearable
01b045 346                 v-model="form.planEndTime"
347                 type="date"
348                 value-format="yyyy-MM-dd"
349                 placeholder="请选择计划结束时间">
b800e7 350               </el-date-picker>
351             </el-form-item>
352           </el-col>
353
354         </el-row>
4dbe17 355       </el-form>
356       <div slot="footer" class="dialog-footer">
357         <el-button type="primary" @click="submitForm">确 定</el-button>
358         <el-button @click="cancel">取 消</el-button>
359       </div>
360     </el-dialog>
5d5153 361
4dbe17 362   </div>
363 </template>
364
365 <script>
b800e7 366 import { listLineInfo } from "@/api/main/bs/lineInfo/lineInfo";
367 import { listWorkshop } from "@/api/main/bs/workshop/workshop";
5d5153 368 import { listProductBom } from "@/api/main/bs/ProductBom/ProductBom";
369 import { listTechnologyRoute} from "@/api/main/bs/technologyRoute/technologyRoute";
370 import ItemSelect  from "@/components/itemSelect/single.vue";
875966 371 import { upDownMove, listProductionOrde, getProductionOrde, delProductionOrde, addProductionOrde, updateProductionOrde } from "@/api/main/om/productionOrde/productionOrde";
4dbe17 372
373 export default {
374   name: "ProductionOrde",
3b1976 375   dicts: ['order_state'],
5d5153 376   components: {
377     ItemSelect ,
378   },
4dbe17 379   data() {
380     return {
b800e7 381       titleName: '',
382       options: [],
383       lineOptions: [],
5d5153 384       showFlag:false,
385       advancedShowSearch: false,
7ccca2 386       workOrder: {
387         status: 'ss'
388       },
4dbe17 389       // 遮罩层
390       loading: true,
391       // 选中数组
392       ids: [],
393       // 非单个禁用
394       single: true,
395       // 非多个禁用
396       multiple: true,
53b67e 397       move: true,
398       selectedRowIndex: -1, // 存储选中行的索引
4dbe17 399       // 显示搜索条件
400       showSearch: true,
401       // 总条数
402       total: 0,
403       // 生产工单表格数据
404       productionOrdeList: [],
405       // 弹出层标题
406       title: "",
407       // 是否显示弹出层
408       open: false,
409       // 查询参数
410       queryParams: {
411         pageNum: 1,
412         pageSize: 10,
413         workOrderNo: null,
414         salesOrderCode: null,
415         productCode: null,
416         productName: null,
417         workshopCode: null,
418         lineCode: null,
419         routeCode: null,
420         bomCode: null,
421         recipeCode: null,
422         orderStatus: null,
423         custom: null,
424         marketAreaCode: null,
425         softwareVersionCode: null,
426         productCompanyCode: null,
875966 427         frontEndId: 0,
428         idNums: null,
429         flag: null,
430
4dbe17 431       },
432       // 表单参数
433       form: {},
7ccca2 434       updateStatusParameter: {
435         id: null,
436         orderStatus: null
437       },
4dbe17 438       // 表单校验
439       rules: {
440         id: [
441           { required: true, message: "ID不能为空", trigger: "blur" }
442         ],
443       }
444     };
445   },
446   created() {
447     this.getList();
b800e7 448     this.initWorkshop();
4dbe17 449   },
450   methods: {
14b533 451     moveUp(row, val){
452       console.log(val)
875966 453       const ids = row.id || this.ids
454       let str = JSON.stringify(ids);
455       let num = BigInt(str.replace(/[\[\]]/g, ''));
456       this.queryParams.frontEndId = num
457       this.queryParams.idNums = ids
14b533 458       this.queryParams.flag = val
875966 459       upDownMove(this.queryParams).then(response => {
345956 460         this.$modal.msgSuccess("移动成功");
875966 461         this.getList();
462       });
53b67e 463     },
b800e7 464     initWorkshop(){
465       listWorkshop(this.queryParams).then(response => {
466         this.options = response.rows;
467       });
468     },
469     // 在这里编写处理选中事件的逻辑
470     handleSelectChange(selectedOption) {
01b045 471       this.form.lineCode = null;
b800e7 472       this.queryParams.workshopCode = selectedOption;
473       listLineInfo(this.queryParams).then(response => {
474         this.lineOptions = response.rows;
475       });
476     },
5d5153 477     //物料选择弹出框
478     onItemSelected(obj){
479       if(obj !== undefined && obj !== null){
480         let productCode = obj.materialCode;
481         this.form.productCode = productCode;
482         this.form.productName = obj.materialName;
483         this.queryParams.productCode = productCode
484         listTechnologyRoute(this.queryParams).then(response => {
b800e7 485           this.form.routeCode = response.rows[0].routeCode;
5d5153 486         });
487         listProductBom(this.queryParams).then(response => {
b800e7 488           this.form.bomCode = response.rows[0].bomCode;
5d5153 489         });
490       }
491     },
492     handleSelectProduct(){
493       this.$refs.itemSelect.showFlag = true;
494     },
495     advancedQuery(){
496       this.advancedShowSearch = (this.advancedShowSearch) ? this.advancedShowSearch = false : this.advancedShowSearch = true;
497     },
7ccca2 498     handleCommand(status,id) {
03bb7a 499       console.log(status)
7ccca2 500       this.updateStatusParameter.id = id;
501       this.updateStatusParameter.orderStatus = status;
502       updateProductionOrde(this.updateStatusParameter).then(response => {
503         this.$modal.msgSuccess("修改成功");
504         this.open = false;
505         this.getList();
506       });
507     },
4dbe17 508     /** 查询生产工单列表 */
509     getList() {
510       this.loading = true;
511       listProductionOrde(this.queryParams).then(response => {
14b533 512         console.log(response)
4dbe17 513         this.productionOrdeList = response.rows;
514         this.total = response.total;
515         this.loading = false;
516       });
517     },
518     // 取消按钮
519     cancel() {
520       this.open = false;
521       this.reset();
522     },
523     // 表单重置
524     reset() {
525       this.form = {
526         id: null,
527         workOrderNo: null,
528         salesOrderCode: null,
529         productCode: null,
530         productName: null,
531         workshopCode: null,
532         lineCode: null,
533         routeCode: null,
534         bomCode: null,
535         recipeCode: null,
536         planQty: null,
537         actualQty: null,
538         badQty: null,
539         scrapQty: null,
540         repairQty: null,
541         actualOnlineQty: null,
542         onlineCompletionMark: null,
543         demandDate: null,
544         planStartTime: null,
545         planEndTime: null,
546         actualStartTime: null,
547         actualEndTime: null,
548         serialNumber: null,
549         orderStatus: null,
550         createTime: null,
551         updateTime: null,
552         createUser: null,
553         updateUser: null,
554         remarks: null,
555         streamNumber: null,
556         custom: null,
557         marketAreaCode: null,
558         softwareVersionCode: null,
559         productCompanyCode: null,
560         spareField1: null,
561         spareField2: null,
562         spareField3: null,
563         spareField4: null
564       };
565       this.resetForm("form");
566     },
567     /** 搜索按钮操作 */
568     handleQuery() {
569       this.queryParams.pageNum = 1;
570       this.getList();
571     },
572     /** 重置按钮操作 */
573     resetQuery() {
574       this.resetForm("queryForm");
575       this.handleQuery();
576     },
577     // 多选框选中数据
578     handleSelectionChange(selection) {
579       this.ids = selection.map(item => item.id)
345956 580       this.move = selection.length!==1
581       if(!selection.length){
53b67e 582         this.single = true
583         this.multiple = true
c8a732 584       }else {
585         if(selection[0].orderStatus === '1' && selection.length === 1){
586           this.single = false
587           this.multiple = false
588         }
53b67e 589       }
c8a732 590
4dbe17 591     },
592     /** 新增按钮操作 */
593     handleAdd() {
06205a 594       this.initWorkshop();
4dbe17 595       this.reset();
596       this.open = true;
b800e7 597       this.titleName = "添加生产工单";
4dbe17 598     },
599     /** 修改按钮操作 */
600     handleUpdate(row) {
06205a 601       this.initWorkshop();
4dbe17 602       this.reset();
603       const id = row.id || this.ids
604       getProductionOrde(id).then(response => {
03bb7a 605         console.log(response.data)
4dbe17 606         this.form = response.data;
607         this.open = true;
b800e7 608         this.titleName = "修改生产工单";
4dbe17 609       });
610     },
611     /** 提交按钮 */
612     submitForm() {
613       this.$refs["form"].validate(valid => {
614         if (valid) {
615           if (this.form.id != null) {
616             updateProductionOrde(this.form).then(response => {
617               this.$modal.msgSuccess("修改成功");
618               this.open = false;
619               this.getList();
620             });
621           } else {
622             addProductionOrde(this.form).then(response => {
623               this.$modal.msgSuccess("新增成功");
624               this.open = false;
625               this.getList();
626             });
627           }
628         }
629       });
630     },
631     /** 删除按钮操作 */
632     handleDelete(row) {
633       const ids = row.id || this.ids;
634       this.$modal.confirm('是否确认删除生产工单编号为"' + ids + '"的数据项?').then(function() {
635         return delProductionOrde(ids);
636       }).then(() => {
637         this.getList();
638         this.$modal.msgSuccess("删除成功");
639       }).catch(() => {});
640     },
641     /** 导出按钮操作 */
642     handleExport() {
643       this.download('om/productionOrde/export', {
644         ...this.queryParams
645       }, `productionOrde_${new Date().getTime()}.xlsx`)
646     }
647   }
648 };
649 </script>
74df87 650 <style lang="scss" scoped>
651 //::v-deep .el-dialog__header{
652 //  /*background-color: #f8f8f8;*/
653 //  background-color: #f8f8f9;
654 //}
b800e7 655 </style>