|
|
@@ -123,11 +123,13 @@
|
|
|
:needPage="false"
|
|
|
:columns="columns"
|
|
|
@columns-change="handleColumnChange"
|
|
|
+ @row-click="handleRowClick"
|
|
|
:cache-key="cacheKeyUrl"
|
|
|
:datasource="detailData.productList"
|
|
|
row-key="id"
|
|
|
show-summary
|
|
|
:summary-method="getSummaries"
|
|
|
+ :row-class-name="tableRowClassName"
|
|
|
>
|
|
|
<template v-slot:stockLedger="scope">
|
|
|
<el-popover placement="right" width="60%" trigger="hover">
|
|
|
@@ -669,6 +671,26 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 通过挂起状态设置行样式
|
|
|
+ tableRowClassName({row}) {
|
|
|
+ // console.log('tableRowClassName', row)
|
|
|
+ if (row.isSuspend == 1) {
|
|
|
+ return 'warning-row';
|
|
|
+ }
|
|
|
+ return '';
|
|
|
+ },
|
|
|
+ handleRowClick(row) {
|
|
|
+ // this.current = row;
|
|
|
+ // console.log('handleRowClick', row)
|
|
|
+ if (row.isSuspend === 1) {
|
|
|
+ this.$alert(`替代批次号:${row.offsetDetail[0].batchNo}`, {
|
|
|
+ confirmButtonText: '知道了',
|
|
|
+ type: 'none'
|
|
|
+ }).catch(() => {
|
|
|
+ // 捕获用户取消操作时的Promise rejection
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
getSummaries(param) {
|
|
|
return getSummaries(
|
|
|
param,
|
|
|
@@ -734,6 +756,9 @@
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
+ ::v-deep .el-table .warning-row {
|
|
|
+ background: #d9ecff;
|
|
|
+ }
|
|
|
.title {
|
|
|
font-size: 22px;
|
|
|
font-weight: 800;
|