|
|
@ -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() { // 新建包装 |
|
|
|