From 752670ad623900bd8ffdbfd68d2a0e34f4d623ed Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期一, 15 四月 2024 18:00:55 +0800
Subject: [PATCH] 1.新增订单启动 工单启动功能
---
src/views/workOrder/workOrderClose.vue | 62 ++++++++++++++++++++++++++-----
1 files changed, 52 insertions(+), 10 deletions(-)
diff --git a/src/views/workOrder/workOrderClose.vue b/src/views/workOrder/workOrderClose.vue
index 4435910..9fb197a 100644
--- a/src/views/workOrder/workOrderClose.vue
+++ b/src/views/workOrder/workOrderClose.vue
@@ -3,7 +3,8 @@
<div class="body" :style="{height:mainHeight+'px'}">
<div class="bodyTopButtonGroup">
- <el-button v-waves icon="el-icon-switch-button" type="success" @click="orderClose()">宸ュ崟鍏抽棴</el-button>
+ <el-button v-waves icon="el-icon-switch-button" type="danger" @click="orderClose()">宸ュ崟鍏抽棴</el-button>
+ <el-button v-waves icon="el-icon-thumb" type="success" @click="orderOpen()">宸ュ崟鍚姩</el-button>
</div>
<div class="bodyTopFormGroup">
@@ -136,6 +137,7 @@
</div>
<div class="elTableDiv">
+ <!-- @row-click="rowClick"-->
<el-table
ref="tableDataRef"
class="tableFixed"
@@ -148,17 +150,16 @@
:header-cell-style="this.$headerCellStyle"
:cell-style="this.$cellStyle"
@sort-change="sortChange"
- @row-click="rowClick"
@selection-change="handleSelectionChange"
>
<el-table-column
type="selection"
width="50"
- :selectable="selected"
/>
+ <!-- :selectable="selected"-->
<el-table-column
prop="rowNum"
- width="50"
+ width="80"
label="搴忓彿"
fixed
/>
@@ -347,10 +348,20 @@
<el-tooltip class="item" effect="dark" content="宸ュ崟鍏抽棴" placement="top">
<i
+ v-if="row.status!=='CLOSED'"
class="el-icon-switch-button"
style="cursor: pointer;margin-left: 15px"
- :style="{color:$store.state.settings.theme}"
+ :style="{color:'red'}"
@click.stop="orderClose(row)"
+ />
+ </el-tooltip>
+ <el-tooltip class="item" effect="dark" content="宸ュ崟鍚姩" placement="top">
+ <i
+ v-if="row.status==='CLOSED'"
+ class="el-icon-thumb"
+ style="cursor: pointer;margin-left: 15px"
+ :style="{color:$store.state.settings.theme}"
+ @click.stop="orderOpen(row)"
/>
</el-tooltip>
@@ -1976,7 +1987,7 @@
AddUpdateMesOrder, DeleteMesOrder,
MesBadOrderSearch, MesOrderDistribution,
MesOrderClosedSearch,
- UpdateMesOrderStepSearch, MesOrderBitchClosedSeave
+ UpdateMesOrderStepSearch, MesOrderBitchClosedSeave, MesOrderBitchReverseClosedSeave
} from '@/api/WorkOrder'
import { PartSelect } from '@/api/ProductModel'
import { PrentOrganization, PrentOrganizationNoCompany, StepData } from '@/api/GeneralBasicData'
@@ -2423,7 +2434,7 @@
this.dialogVisibleTask = false
},
handleSelectionChange(val) {
- this.multipleSelection = val.map(i => i.wo_code)
+ this.multipleSelection = val
},
selected(row, index) {
@@ -2520,15 +2531,19 @@
},
// 宸ュ崟鍏抽棴浜嬩欢
async orderClose(row) {
- this.$confirm('鏄惁纭鍒犻櫎?', '鎻愮ず', {
+ this.$confirm('鏄惁纭鍏抽棴?', '鎻愮ず', {
confirmButtonText: '纭畾',
cancelButtonText: '鍙栨秷',
type: 'warning'
}).then(() => {
+ let data = null
if (row) { // 琛屽叧闂伐鍗�
- this.multipleSelection = [row.wo_code]
+ data = [row.wo_code]
+ } else {
+ data = this.multipleSelection.filter(i => i.status !== 'CLOSED').map(i => i.wo_code)
}
- MesOrderBitchClosedSeave(this.multipleSelection).then(res => {
+
+ MesOrderBitchClosedSeave(data).then(res => {
if (res.code === '200') {
this.$notify.success('鍏抽棴鎴愬姛!')
// if (this.form.page > 1 && this.tableData.length === 1) {
@@ -2541,6 +2556,33 @@
this.$notify.info('宸插彇娑堝垹闄わ紒')
})
},
+ // 宸ュ崟鍚姩浜嬩欢
+ async orderOpen(row) {
+ this.$confirm('鏄惁纭鍚姩?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning'
+ }).then(() => {
+ let data = null
+ if (row) { // 琛屽惎鍔ㄥ伐鍗�
+ data = [row.wo_code]
+ } else {
+ data = this.multipleSelection.filter(i => i.status === 'CLOSED').map(i => i.wo_code)
+ }
+
+ MesOrderBitchReverseClosedSeave(data).then(res => {
+ if (res.code === '200') {
+ this.$notify.success('鍚姩鎴愬姛!')
+ // if (this.form.page > 1 && this.tableData.length === 1) {
+ // this.form.page--
+ // }
+ this.getMesOrderClosedSearch()
+ }
+ })
+ }).catch(() => {
+ this.$notify.info('宸插彇娑堝垹闄わ紒')
+ })
+ },
// 瀵硅瘽妗嗕骇鍝佷俊鎭�兼敼鍙�
partcodeChangeDialog(val) {
console.log(val)
--
Gitblit v1.9.3