|
@@ -178,39 +178,48 @@
|
|
|
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 || (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>
|
|
|
+ <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
|
|
@@ -1699,6 +1708,7 @@ import {
|
|
|
ExecDataByConfig,
|
|
|
GetAccount,
|
|
|
transData,
|
|
|
+ handleWechatPushOfWorkOrder,
|
|
|
} from "@/api/common";
|
|
|
import Pagination from "@/components/Pagination1";
|
|
|
import { MessageBox } from "element-ui";
|
|
@@ -3000,6 +3010,9 @@ export default {
|
|
|
}
|
|
|
|
|
|
this.createProductionOrderParm = {
|
|
|
+ common: {
|
|
|
+ returnmap: "0",
|
|
|
+ },
|
|
|
data: [
|
|
|
{
|
|
|
name: "createProductionOrder",
|
|
@@ -3053,6 +3066,22 @@ export default {
|
|
|
};
|
|
|
ExecDataByConfig(this.createProductionOrderParm).then((response) => {
|
|
|
if (response.msg !== "fail") {
|
|
|
+ var workOrderRowId = response.data[0].resultmaps.LastInsertId;
|
|
|
+
|
|
|
+ var send_weixin_data1 = {
|
|
|
+ name: "getRemindData",
|
|
|
+ parammaps: {
|
|
|
+ userId: Cookies.get("g_userId"),
|
|
|
+ remindId: 82,
|
|
|
+ remindTypeName: "生产工单",
|
|
|
+ rowId: workOrderRowId,
|
|
|
+ },
|
|
|
+ };
|
|
|
+
|
|
|
+ handleWechatPushOfWorkOrder(send_weixin_data1, 82).catch((error) => {
|
|
|
+ console.error("微信推送失败:", error);
|
|
|
+ });
|
|
|
+
|
|
|
this.get_production_work_order();
|
|
|
this.resetForm();
|
|
|
this.get_production_work_order();
|
|
@@ -3306,9 +3335,3 @@ export default {
|
|
|
text-overflow: ellipsis; /* 使用省略号表示溢出内容 */
|
|
|
}
|
|
|
</style>
|
|
|
-<<<<<<< HEAD
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-=======
|
|
|
->>>>>>> f1f1d66c68304db39e340601f5791d2da4a32a97
|