Browse Source

包装项状态完善

pull/65/head
wangxy 3 years ago
parent
commit
ff3c971639
1 changed files with 5 additions and 69 deletions
  1. +5
    -69
      src/views/quality/pkg.vue

+ 5
- 69
src/views/quality/pkg.vue View File

@ -34,14 +34,13 @@
<span v-else>{{scope.row[item]}}</span>
</template>
</el-table-column>
<!-- status: 0 完成 status:1 等待 status:2||3 处理中 -->
<!-- LOG_PackOrderItemlst-Status: 80 完成 26 等待 40 处理中 98取消-->
<el-table-column width="120" label="状态" align="center">
<template slot-scope="scope">
<div v-if="scope.row.status == 2 || scope.row.status == 3"
class="pkg-list-status"
:class="[{'error-bg':scope.row.status == 3},{'process-bg':scope.row.status == 2}]">处理中</div>
<div v-if="scope.row.status == 1" class="wait-bg pkg-list-status">等待</div>
<div v-if="scope.row.status == 0" class="complete-bg pkg-list-status">完成</div>
<div v-if="scope.row['LOG_PackOrderItemlst-Status'] == 40" class=" process-bg pkg-list-status">处理中</div>
<div v-if="scope.row['LOG_PackOrderItemlst-Status'] == 98" class=" error-bg pkg-list-status">取消</div>
<div v-if="scope.row['LOG_PackOrderItemlst-Status'] == 26" class="wait-bg pkg-list-status">等待</div>
<div v-if="scope.row['LOG_PackOrderItemlst-Status'] == 80" class="complete-bg pkg-list-status">完成</div>
</template>
</el-table-column>
</el-table>
@ -162,28 +161,10 @@ export default {
packorderitemlst() { //
this.tableLoading = true
api.packorderitemlst(this.activePkg).then((res) => {
if (res.data && res.data.length) {
res.data.forEach((item, index) => {
if (index == 0) {
this.$set(item, 'status', 2)
} else {
this.$set(item, 'status', 1)
}
})
}
this.tableData = res.data
this.tableLoading = false
})
},
// getColumn(id) { //
// api.packorderitemlst(id).then((res) => {
// if (res.data && res.data.length && !this.tableColumn.length) {
// for (const key in res.data[0]) {
// this.tableColumn.push(key)
// }
// }
// })
// },
checkCodeInPkgs(code) { //
this.pkgs.forEach(el => {
if (el['LOG_PackOrder-PackOrderId'] === code) {
@ -256,41 +237,6 @@ export default {
}
})
},
// closePkg(isSelf = false) { //
// let params = [this.activePkg]
// //
// if (isSelf) {
// let isCom = []
// this.tableData.forEach((item) => {
// if (item.status == 0) {
// isCom.push(item['LOG_PackOrderItemlst-Pos'])
// }
// })
// params.push(isCom)
// } else {
// params.push([])
// }
// return
// api.closePkg(params).then((res) => {
// if (res.code == 200) {
// this.pkgs = this.pkgs.filter((pkg) => pkg.PackOrderId != this.activePkg)
// if (isSelf) {
// this.$message({
// message: `${this.activePkg}`,
// type: 'success',
// })
// } else {
// this.$message({
// message: `${this.activePkg}`,
// type: 'success',
// })
// }
// this.activePkg = ''
// this.actPkgObj = null
// this.tableData = []
// }
// })
// },
selfClosePkg() { //
this.$confirm(`是否关闭包装${this.activePkg}`, '提示', {
confirmButtonText: '确定',
@ -325,16 +271,6 @@ export default {
this.tempData = res.data
this.isVisible = true
}
// if (res.data) {
// if (res.data.length == 1) {
// this.tempData = res.data
// // this.chooseTemRow = res.data[0]
// // this.completeCreatePkg()
// } else {
// this.tempData = res.data
// this.isVisible = true
// }
// }
})
},
openPkg() { //


Loading…
Cancel
Save