|
|
@@ -6,11 +6,13 @@
|
|
|
:datasource="form.datasource"
|
|
|
row-key="id"
|
|
|
@columns-change="handleColumnChange"
|
|
|
+ @row-click="handleRowClick"
|
|
|
:cache-key="cacheKeyUrl"
|
|
|
height="350"
|
|
|
full-height="calc(100vh - 76px)"
|
|
|
show-summary
|
|
|
:summary-method="getSummaries"
|
|
|
+ :row-class-name="tableRowClassName"
|
|
|
>
|
|
|
<template v-slot:technicalDrawings="{ row }">
|
|
|
<fileMain v-model="row.technicalDrawings" type="view"></fileMain>
|
|
|
@@ -452,6 +454,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,
|
|
|
@@ -470,6 +492,9 @@
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
+ ::v-deep .el-table .warning-row {
|
|
|
+ background: #d9ecff;
|
|
|
+ }
|
|
|
.headbox {
|
|
|
display: flex;
|
|
|
justify-content: flex-start;
|
|
|
@@ -508,9 +533,9 @@
|
|
|
background-color: transparent !important;
|
|
|
}
|
|
|
|
|
|
- ::v-deep .time-form .el-table tr {
|
|
|
- background-color: #ffffff;
|
|
|
- }
|
|
|
+ // ::v-deep .time-form .el-table tr {
|
|
|
+ // background-color: #ffffff;
|
|
|
+ // }
|
|
|
|
|
|
.pricebox {
|
|
|
display: flex;
|