|
@@ -178,32 +178,39 @@
|
|
|
align="center"
|
|
|
width="160"
|
|
|
>
|
|
|
- <template slot-scope="scope">
|
|
|
- <template
|
|
|
- v-if="
|
|
|
- scope.row.days_diff !== null &&
|
|
|
- scope.row.days_diff !== undefined &&
|
|
|
- scope.row.days_diff !== ''
|
|
|
- "
|
|
|
- >
|
|
|
- <span
|
|
|
- :class="{
|
|
|
- 'normal-time': scope.row.days_diff > 3,
|
|
|
- 'warning-time':
|
|
|
- scope.row.days_diff >= 0 && scope.row.days_diff <= 3,
|
|
|
- 'overdue-time': scope.row.days_diff < 0,
|
|
|
- }"
|
|
|
- >
|
|
|
- <template v-if="scope.row.days_diff < 0">
|
|
|
- 已逾期 {{ Math.abs(scope.row.days_diff) }} 天
|
|
|
- </template>
|
|
|
- <template v-else> {{ scope.row.days_diff }} 天 </template>
|
|
|
- </span>
|
|
|
- </template>
|
|
|
- <template v-else>
|
|
|
- <!-- 如果 days_diff 是空字符串、null 或 undefined,显示空 -->
|
|
|
- </template>
|
|
|
- </template>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <template
|
|
|
+ v-if="
|
|
|
+ scope.row.days_diff !== null &&
|
|
|
+ scope.row.days_diff !== undefined &&
|
|
|
+ scope.row.days_diff !== ''
|
|
|
+ "
|
|
|
+ >
|
|
|
+ <span
|
|
|
+ :class="{
|
|
|
+ 'normal-time': scope.row.days_diff > 3 || (scope.row.days_diff < 0),
|
|
|
+ 'warning-time': scope.row.days_diff >= 0 && scope.row.days_diff <= 3,
|
|
|
+ 'overdue-time': scope.row.days_diff < 0,
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <template v-if="scope.row.days_diff < 0">
|
|
|
+ 已逾期 {{ Math.abs(scope.row.days_diff) }} 天 <!-- 负数全部显示为已逾期 -->
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <!-- 如果 orderStatus 是 '生产完成' 且 days_diff > 0,显示 '提前 X 天' -->
|
|
|
+ <template v-if="scope.row.orderStatus === '生产完成' && scope.row.days_diff > 0">
|
|
|
+ 提前 {{ scope.row.days_diff }} 天
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ {{ scope.row.days_diff }} 天 <!-- 其他情况直接显示天数 -->
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <!-- 如果 days_diff 是空字符串、null 或 undefined,显示空 -->
|
|
|
+ </template>
|
|
|
+</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column
|