| | |
| | | }); |
| | | } |
| | | |
| | | // 清除当前用户的全部消息 |
| | | export function clearAllMessage() { |
| | | return request({ |
| | | url: "/system/notice/clearAll", |
| | | method: "delete", |
| | | }); |
| | | } |
| | | |
| | | // 确认消息 |
| | | export function confirmMessage(noticeId, status) { |
| | | return request({ |
| | |
| | | {{ formatters(scope.row[item.prop], item.formatData) }} |
| | | </el-tag> |
| | | </div> |
| | | <!-- 时间类型 --> |
| | | <div v-else-if="item.dataType === 'date'"> |
| | | {{ scope.row[item.prop] ? dayjs(scope.row[item.prop]).format('YYYY-MM-DD') : '' }} |
| | | </div> |
| | | <!-- 按钮 --> |
| | | <div v-else-if="item.dataType == 'action'" |
| | | @click.stop> |
| | |
| | | import pagination from "./Pagination.vue"; |
| | | import { computed, ref, inject, getCurrentInstance } from "vue"; |
| | | import { ElMessage } from "element-plus"; |
| | | import dayjs from "dayjs"; |
| | | |
| | | // 获取全局的 uploadHeader |
| | | const { proxy } = getCurrentInstance(); |
| | |
| | | <div class="notification-popover-content"> |
| | | <div class="popover-header"> |
| | | <span class="popover-title">消息通知</span> |
| | | <el-button type="primary" |
| | | size="small" |
| | | @click="handleMarkAllAsRead" |
| | | :disabled="unreadCount === 0"> |
| | | 一键已读 |
| | | </el-button> |
| | | <div class="popover-actions"> |
| | | <el-button type="primary" |
| | | size="small" |
| | | @click="handleMarkAllAsRead" |
| | | :disabled="unreadCount === 0"> |
| | | 一键已读 |
| | | </el-button> |
| | | <el-button type="danger" |
| | | size="small" |
| | | plain |
| | | @click="handleClearAll"> |
| | | 清除 |
| | | </el-button> |
| | | </div> |
| | | </div> |
| | | <div class="notification-content"> |
| | | <el-tabs v-model="activeTab" |
| | |
| | | listMessage, |
| | | markAsRead, |
| | | markAllAsRead, |
| | | clearAllMessage, |
| | | confirmMessage, |
| | | getUnreadCount, |
| | | } from "@/api/system/message"; |
| | | import { ElMessage } from "element-plus"; |
| | | import { ElMessage, ElMessageBox } from "element-plus"; |
| | | import useUserStore from "@/store/modules/user"; |
| | | import { useRouter } from "vue-router"; |
| | | |
| | |
| | | } |
| | | }; |
| | | |
| | | // 清除全部消息 |
| | | const handleClearAll = async () => { |
| | | try { |
| | | await ElMessageBox.confirm("确认清除全部消息吗?清除后无法恢复。", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }); |
| | | } catch (error) { |
| | | // 取消清除 |
| | | return; |
| | | } |
| | | try { |
| | | const res = await clearAllMessage(); |
| | | if (res.code === 200) { |
| | | ElMessage.success("清除成功"); |
| | | unreadList.value = []; |
| | | readList.value = []; |
| | | total.value = 0; |
| | | pageNum.value = 1; |
| | | loadMessages(); |
| | | loadUnreadCount(); |
| | | } |
| | | } catch (error) { |
| | | console.error("清除消息失败:", error); |
| | | ElMessage.error("清除失败"); |
| | | } |
| | | }; |
| | | |
| | | // 分页大小改变 |
| | | const handleSizeChange = size => { |
| | | pageSize.value = size; |
| | |
| | | font-weight: 500; |
| | | color: var(--text-primary); |
| | | } |
| | | |
| | | .popover-actions { |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | } |
| | | |
| | | .notification-content { |
| | |
| | | { |
| | | label: "创建时间", |
| | | prop: "createTime", |
| | | dataType:"date" |
| | | }, |
| | | { |
| | | label: "操作", |
| | |
| | | const formCreateTimeDate = computed({ |
| | | get: () => (formData.createTime ? String(formData.createTime).split(" ")[0] : ""), |
| | | set: (value) => { |
| | | formData.createTime = value ? `${value} ${dayjs().format("HH:mm:ss")}` : ""; |
| | | formData.createTime = value ? dayjs(value).format("YYYY-MM-DD") : ""; |
| | | }, |
| | | }); |
| | | // const productTypes = ref([]); |
| | |
| | | <span v-else style="color: #909399">-</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="createTime" label="上传时间" width="180" /> |
| | | <el-table-column prop="createTime" label="上传时间" width="120" :formatter="formatDate" /> |
| | | <el-table-column label="操作" width="150" align="center"> |
| | | <template #default="{ row }"> |
| | | <el-button |
| | |
| | | import useUserStore from '@/store/modules/user'; |
| | | import { userListNoPageByTenantId } from '@/api/system/user.js'; |
| | | import { getToken } from "@/utils/auth"; |
| | | import { parseDate } from "@/utils/ruoyi"; |
| | | |
| | | // 日期回显格式化(YYYY-MM-DD) |
| | | const formatDate = (row, column, cellValue) => parseDate(cellValue) || '-'; |
| | | |
| | | // 表单验证规则 |
| | | const rules = { |
| | |
| | | label: "创建时间", |
| | | prop: "createTime", |
| | | width: 180, |
| | | dataType:"date" |
| | | }, |
| | | { |
| | | dataType: "action", |
| | |
| | | <el-descriptions-item label="分类">{{ getCategoryText(currentRegulationDetail.category) }}</el-descriptions-item> |
| | | <el-descriptions-item label="版本">{{ currentRegulationDetail.version }}</el-descriptions-item> |
| | | <el-descriptions-item label="发布人">{{ currentRegulationDetail.createUserName }}</el-descriptions-item> |
| | | <el-descriptions-item label="发布时间">{{ currentRegulationDetail.createTime }}</el-descriptions-item> |
| | | <el-descriptions-item label="发布时间">{{ formatDate(currentRegulationDetail.createTime) }}</el-descriptions-item> |
| | | </el-descriptions> |
| | | <div class="mt-20"> |
| | | <h4>制度内容</h4> |
| | |
| | | addRuleFile, |
| | | } from "@/api/collaborativeApproval/rulesRegulationsManagementFile.js"; |
| | | import PIMTable from "@/components/PIMTable/PIMTable.vue"; |
| | | import { parseDate } from "@/utils/ruoyi"; |
| | | |
| | | // 日期回显格式化(YYYY-MM-DD) |
| | | const formatDate = value => parseDate(value) || "-"; |
| | | |
| | | // 响应式数据 |
| | | const operationType = ref("add"); |
| | |
| | | }, |
| | | { label: "版本", prop: "version", width: 120 }, |
| | | { label: "发布人", prop: "createUserName", width: 120 }, |
| | | { label: "发布时间", prop: "createTime", width: 180 }, |
| | | { label: "发布时间", prop: "createTime", width: 180,dataType: "date" }, |
| | | { |
| | | label: "状态", |
| | | prop: "status", |
| | |
| | | <el-descriptions-item label="申请人">{{ currentSealDetail.createUserName }}</el-descriptions-item> |
| | | <el-descriptions-item label="所属部门">{{ currentSealDetail.department }}</el-descriptions-item> |
| | | <el-descriptions-item label="用印类型">{{ getSealTypeText(currentSealDetail.sealType) }}</el-descriptions-item> |
| | | <el-descriptions-item label="申请时间">{{ currentSealDetail.createTime }}</el-descriptions-item> |
| | | <el-descriptions-item label="申请时间">{{ formatDate(currentSealDetail.createTime) }}</el-descriptions-item> |
| | | <el-descriptions-item label="状态"> |
| | | <el-tag :type="getStatusType(currentSealDetail.status)"> |
| | | {{ getStatusText(currentSealDetail.status) }} |
| | |
| | | import AttachmentUploadFile from '@/components/AttachmentUpload/file/index.vue' |
| | | import FilePreview from '@/components/filePreview/index.vue' |
| | | import download from '@/plugins/download.js' |
| | | import { parseDate } from '@/utils/ruoyi' |
| | | |
| | | // 日期回显格式化(YYYY-MM-DD) |
| | | const formatDate = value => parseDate(value) || '-' |
| | | |
| | | // 响应式数据 |
| | | // 用印申请相关 |
| | |
| | | formatData: (v) => getSealTypeText(v), |
| | | formatType: () => 'info' |
| | | }, |
| | | { label: '申请时间', prop: 'createTime', width: 180 }, |
| | | { label: '申请时间', prop: 'createTime', width: 180,dataType: "date" }, |
| | | { |
| | | label: '状态', |
| | | prop: 'status', |
| | |
| | | <el-descriptions-item label="含税总价">{{ detailData.taxIncludingPriceTotal }}</el-descriptions-item> |
| | | <el-descriptions-item label="税率(%)">{{ detailData.taxRate }}</el-descriptions-item> |
| | | <el-descriptions-item label="不含税总价">{{ detailData.unTaxIncludingPriceTotal }}</el-descriptions-item> |
| | | <el-descriptions-item label="录入日期">{{ detailData.createTime }}</el-descriptions-item> |
| | | <el-descriptions-item label="录入日期">{{ detailData.createTime ? dayjs(detailData.createTime).format('YYYY-MM-DD') : '' }}</el-descriptions-item> |
| | | <el-descriptions-item label="预计运行时间">{{ detailData.planRuntimeTime ? dayjs(detailData.planRuntimeTime).format('YYYY-MM-DD') : '' }}</el-descriptions-item> |
| | | <el-descriptions-item label="设备图片" :span="2"> |
| | | <div v-if="detailData.storageBlobVOs && detailData.storageBlobVOs.length > 0" style="display: flex; gap: 10px; flex-wrap: wrap;"> |
| | |
| | | form.storageBlobDTOs = data.storageBlobVOs || []; |
| | | form.maintenanceName = data.maintenanceName; |
| | | form.acceptanceName = data.acceptanceName; |
| | | form.acceptanceTime = data.acceptanceTime; |
| | | form.acceptanceTime = data.acceptanceTime |
| | | ? dayjs(data.acceptanceTime).format("YYYY-MM-DD") |
| | | : undefined; |
| | | form.acceptanceRemark = data.acceptanceRemark; |
| | | }; |
| | | |
| | |
| | | { label: "退货单号", prop: "returnNo", minWidth: "150" }, |
| | | { label: "供应商", prop: "supplierName", minWidth: "180" }, |
| | | { label: "关联入库单号", prop: "inboundBatches", minWidth: "150" }, |
| | | { label: "退货日期", prop: "preparedAt", minWidth: "170" }, |
| | | { label: "退货日期", prop: "preparedAt", minWidth: "170",dataType: "date"}, |
| | | { |
| | | label: "退款总额", |
| | | prop: "totalAmount", |
| | |
| | | { label: "退货单号", prop: "returnNo", minWidth: "150" }, |
| | | { label: "客户名称", prop: "customerName", minWidth: "180" }, |
| | | { label: "关联发货单号", prop: "shippingNo", minWidth: "150" }, |
| | | { label: "退货日期", prop: "makeTime", minWidth: "170" }, |
| | | { label: "退货日期", prop: "makeTime", minWidth: "170",dataType: "date" }, |
| | | { |
| | | label: "退款总额", |
| | | prop: "refundAmount", |
| | |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="出库日期" |
| | | prop="createTime" |
| | | show-overflow-tooltip /> |
| | | show-overflow-tooltip > |
| | | <template #default="scope"> |
| | | {{ scope.row.createTime ? scope.row.createTime.split(' ')[0] : '-' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="产品大类" |
| | | prop="productName" |
| | | show-overflow-tooltip /> |
| | |
| | | prop="inboundBatches" |
| | | width="200" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="入库时间" |
| | | prop="createTime" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="入库时间" show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | {{ scope.row.createTime ? scope.row.createTime.split(' ')[0] : '-' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="产品大类" |
| | | prop="productName" |
| | | show-overflow-tooltip /> |
| | |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column label="备注" prop="remark" show-overflow-tooltip /> |
| | | <el-table-column |
| | | label="最近更新时间" |
| | | prop="updateTime" |
| | | show-overflow-tooltip |
| | | /> |
| | | <el-table-column label="最近更新时间" |
| | | prop="updateTime" |
| | | show-overflow-tooltip > |
| | | <template #default="scope"> |
| | | {{ scope.row.updateTime ? scope.row.updateTime.split(' ')[0] : '-' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="操作" min-width="180" align="center"> |
| | | <template #default="scope"> |
| | | <el-button |
| | |
| | | <el-table-column label="冻结数量" prop="lockedQuantity" show-overflow-tooltip /> |
| | | <el-table-column label="库存预警数量" prop="warnNum" show-overflow-tooltip /> |
| | | <el-table-column label="备注" prop="remark" show-overflow-tooltip /> |
| | | <el-table-column label="最近更新时间" prop="updateTime" show-overflow-tooltip /> |
| | | <el-table-column label="最近更新时间" |
| | | prop="updateTime" |
| | | show-overflow-tooltip > |
| | | <template #default="scope"> |
| | | {{ scope.row.updateTime ? scope.row.updateTime.split(' ')[0] : '-' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="操作" min-width="90" align="center"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="showSubtractModal(scope.row)" :disabled="scope.row.unLockedQuantity === 0">领用</el-button> |
| | |
| | | <el-table-column label="不合格冻结数量" |
| | | prop="unQualifiedLockedQuantity" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="库存预警数量" |
| | | <!-- <el-table-column label="库存预警数量" |
| | | prop="warnNum" |
| | | show-overflow-tooltip /> |
| | | show-overflow-tooltip /> --> |
| | | <el-table-column label="备注" |
| | | prop="remark" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="最近更新时间" |
| | | prop="updateTime" |
| | | show-overflow-tooltip /> |
| | | show-overflow-tooltip > |
| | | <template #default="scope"> |
| | | {{ scope.row.updateTime ? scope.row.updateTime.split(' ')[0] : '-' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" |
| | | label="操作" |
| | | min-width="80" |
| | |
| | | <el-table-column label="库存数量" prop="qualitity" show-overflow-tooltip /> |
| | | <el-table-column label="冻结数量" prop="lockedQuantity" show-overflow-tooltip /> |
| | | <el-table-column label="备注" prop="remark" show-overflow-tooltip /> |
| | | <el-table-column label="最近更新时间" prop="updateTime" show-overflow-tooltip /> |
| | | <el-table-column label="最近更新时间" |
| | | prop="updateTime" |
| | | show-overflow-tooltip > |
| | | <template #default="scope"> |
| | | {{ scope.row.updateTime ? scope.row.updateTime.split(' ')[0] : '-' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="操作" min-width="90" align="center"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="showSubtractModal(scope.row)" :disabled="scope.row.unLockedQuantity === 0">领用</el-button> |
| | |
| | |
|
| | | <el-table ref="operlogRef" v-loading="loading" :data="operlogList" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
|
| | | <el-table-column type="selection" width="50" align="center" />
|
| | | <el-table-column label="日志编号" align="center" prop="operId" />
|
| | | <el-table-column label="日志编号" align="center">
|
| | | <template #default="scope">
|
| | | <span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
|
| | | </template>
|
| | | </el-table-column>
|
| | | <el-table-column label="系统模块" align="center" prop="title" :show-overflow-tooltip="true" />
|
| | | <el-table-column label="操作类型" align="center" prop="businessType">
|
| | | <template #default="scope">
|
| | |
| | | </el-table-column>
|
| | | <el-table-column label="操作日期" align="center" prop="operTime" width="180" sortable="custom" :sort-orders="['descending', 'ascending']">
|
| | | <template #default="scope">
|
| | | <span>{{ parseTime(scope.row.operTime) }}</span>
|
| | | <span>{{ dayjs(scope.row.operTime).format("YYYY-MM-DD") }}</span>
|
| | | </template>
|
| | | </el-table-column>
|
| | | <el-table-column label="消耗时间" align="center" prop="costTime" width="110" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']">
|
| | |
| | | :total="total"
|
| | | v-model:page="queryParams.pageNum"
|
| | | v-model:limit="queryParams.pageSize"
|
| | | :page-sizes="[10, 20, 30, 50, 100, 200]"
|
| | | @pagination="getList"
|
| | | />
|
| | |
|
| | |
| | | <el-col :span="24">
|
| | | <el-form-item label="操作方法:">{{ form.method }}</el-form-item>
|
| | | </el-col>
|
| | | <el-col :span="24">
|
| | | <el-form-item label="请求参数:">{{ form.operParam }}</el-form-item>
|
| | | </el-col>
|
| | | <!-- <el-col :span="24">-->
|
| | | <!-- <el-form-item label="请求参数:">{{ form.operParam }}</el-form-item>-->
|
| | | <!-- </el-col>-->
|
| | | <el-col :span="24">
|
| | | <el-form-item label="返回参数:">{{ form.jsonResult }}</el-form-item>
|
| | | </el-col>
|
| | |
| | | <el-form-item label="消耗时间:">{{ form.costTime }}毫秒</el-form-item>
|
| | | </el-col>
|
| | | <el-col :span="8">
|
| | | <el-form-item label="操作时间:">{{ parseTime(form.operTime) }}</el-form-item>
|
| | | <el-form-item label="操作时间:">{{ dayjs(form.operTime).format("YYYY-MM-DD") }}</el-form-item>
|
| | | </el-col>
|
| | | <el-col :span="24">
|
| | | <el-form-item label="异常信息:" v-if="form.status === 1">{{ form.errorMsg }}</el-form-item>
|
| | |
| | | <script setup name="Operlog">
|
| | | import { list, delOperlog, cleanOperlog } from "@/api/monitor/operlog"
|
| | | import {onMounted} from "vue";
|
| | | import dayjs from "dayjs";
|
| | |
|
| | | const { proxy } = getCurrentInstance()
|
| | | const { sys_oper_type, sys_common_status } = proxy.useDict("sys_oper_type","sys_common_status")
|
| | |
| | | if (val == null || val === "") return ""; |
| | | if (Array.isArray(val) && val.length >= 3) { |
| | | const [y, m, d, h = 0, min = 0, s = 0] = val; |
| | | return dayjs(new Date(y, m - 1, d, h, min, s)).format("YYYY-MM-DD HH:mm:ss"); |
| | | // return dayjs(new Date(y, m - 1, d, h, min, s)).format("YYYY-MM-DD HH:mm:ss"); |
| | | return dayjs(new Date(y, m - 1, d, h, min, s)).format("YYYY-MM-DD"); |
| | | |
| | | } |
| | | if (typeof val === "number") { |
| | | const d = val > 1e12 ? dayjs(val) : dayjs.unix(val); |
| | | return d.isValid() ? d.format("YYYY-MM-DD HH:mm:ss") : ""; |
| | | return d.isValid() ? d.format("YYYY-MM-DD") : ""; |
| | | } |
| | | const s = String(val).trim(); |
| | | if (!s) return ""; |
| | | const parsed = dayjs(s.includes("T") ? s : s.replace(/-/g, "/")); |
| | | return parsed.isValid() ? parsed.format("YYYY-MM-DD HH:mm:ss") : s; |
| | | return parsed.isValid() ? parsed.format("YYYY-MM-DD") : s; |
| | | } |
| | | |
| | | export function formatDisplayTime(val) { |
| | |
| | | { label: "保险类型", prop: "insuranceTypes", width: 120 }, |
| | | { label: "使用范围", prop: "deptNames", width: 120 }, |
| | | { label: "备注", prop: "remark", minWidth: 120 }, |
| | | { label: "创建时间", prop: "createTime", width: 160 }, |
| | | { label: "创建时间", prop: "createTime", width: 160,dataType: "date" }, |
| | | { label: "创建人", prop: "createUserName", width: 100 }, |
| | | { |
| | | dataType: "action", |
| | |
| | | <div style="display: flex;justify-content: flex-end;margin-bottom: 20px;"> |
| | | <el-button type="success" |
| | | plain |
| | | v-if="false" |
| | | @click="handleBatchGenerate">批量生成数据</el-button> |
| | | <el-button type="primary" |
| | | @click="openForm('add')">新增台账</el-button> |
| | |
| | | prop="purchaseContractNumber" |
| | | width="160" |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="销售合同号" |
| | | prop="salesContractNo" |
| | | width="160" |
| | | show-overflow-tooltip /> |
| | | <!-- <el-table-column label="销售合同号"--> |
| | | <!-- prop="salesContractNo"--> |
| | | <!-- width="160"--> |
| | | <!-- show-overflow-tooltip />--> |
| | | <el-table-column label="供应商名称" |
| | | prop="supplierName" |
| | | width="160" |
| | |
| | | </template> |
| | | </el-dialog> |
| | | <!-- 来源数据弹窗 --> |
| | | <el-dialog |
| | | v-model="sourceDataDialogVisible" |
| | | title="来源数据" |
| | | width="1200px" |
| | | > |
| | | <div v-if="sourceRowData" class="applyno-summary1"> |
| | | <el-dialog v-model="sourceDataDialogVisible" |
| | | title="来源数据" |
| | | width="1200px" |
| | | custom-class="source-data-dialog"> |
| | | <div v-if="sourceRowData" |
| | | class="applyno-summary1"> |
| | | <div class="summary-item"> |
| | | <span class="summary-label">产品名称:</span> |
| | | <span class="summary-value"> |
| | |
| | | text-shadow: 0 1px 2px rgba(64, 158, 255, 0.2); |
| | | } |
| | | |
| | | .source-table-container { |
| | | margin-top: 20px; |
| | | } |
| | | .source-data-dialog { |
| | | display: flex; |
| | | flex-direction: column; |
| | | max-height: 80vh; |
| | | |
| | | .el-dialog__body { |
| | | overflow-y: auto; |
| | | flex: 1; |
| | | } |
| | | } |
| | | |
| | | .source-table-container { |
| | | margin-top: 20px; |
| | | } |
| | | |
| | | .source-data-cards-container { |
| | | display: flex; |
| | |
| | | label: "创建时间", |
| | | prop: "createTime", |
| | | width: 120, |
| | | dataType: "date" |
| | | }, |
| | | { |
| | | dataType: "action", |
| | |
| | | filterable |
| | | remote |
| | | reserve-keyword |
| | | placeholder="请输入生产订单号" |
| | | placeholder="请输入生产订单号搜索" |
| | | :loading="npsNoLoading" |
| | | :remote-method="handleNpsNoSearch" |
| | | @change="handleSearch" |
| | |
| | | :key="option.id" |
| | | :label="option.npsNo + '-' + option.productName + '-' + option.model" |
| | | :value="option.id" /> |
| | | <template #footer> |
| | | <div v-if="npsNoHasMore" |
| | | class="select-load-more" |
| | | @click="loadMoreNpsNo"> |
| | | <span v-if="npsNoLoadingMore">加载中...</span> |
| | | <span v-else>点击加载更多</span> |
| | | </div> |
| | | <div v-else-if="npsNoOptions.length > 0" |
| | | class="select-load-more no-more"> |
| | | 没有更多了 |
| | | </div> |
| | | </template> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | }); |
| | | const selectedNpsNo = ref(null); |
| | | const npsNoLoading = ref(false); |
| | | const npsNoLoadingMore = ref(false); |
| | | const npsNoOptions = ref([]); |
| | | const npsNoPage = reactive({ current: 1, size: 20, total: 0 }); |
| | | const npsNoHasMore = computed(() => npsNoOptions.value.length < npsNoPage.total); |
| | | const npsNoSearchKeyword = ref(""); |
| | | |
| | | // 详情数据 |
| | | const rowData = reactive({ |
| | |
| | | return "#67c23a"; |
| | | }; |
| | | |
| | | // 模拟搜索方法 |
| | | const handleNpsNoSearch = async query => { |
| | | npsNoSearchKeyword.value = query || ""; |
| | | npsNoPage.current = 1; |
| | | npsNoOptions.value = []; |
| | | npsNoLoading.value = true; |
| | | try { |
| | | const res = await productOrderListPage({ |
| | | npsNo: query || "", |
| | | pageNum: 1, |
| | | pageSize: 50, |
| | | current: npsNoPage.current, |
| | | size: npsNoPage.size, |
| | | }); |
| | | // 参照 productionOrder/index.vue 的数据结构 res.data.records |
| | | npsNoOptions.value = res.data?.records || res.rows || []; |
| | | const records = res.data?.records || []; |
| | | npsNoOptions.value = records; |
| | | npsNoPage.total = res.data?.total || 0; |
| | | } catch (error) { |
| | | console.error(error); |
| | | } finally { |
| | | npsNoLoading.value = false; |
| | | } |
| | | }; |
| | | |
| | | const loadMoreNpsNo = async () => { |
| | | if (npsNoLoadingMore.value || !npsNoHasMore.value) return; |
| | | npsNoLoadingMore.value = true; |
| | | npsNoPage.current++; |
| | | try { |
| | | const res = await productOrderListPage({ |
| | | npsNo: npsNoSearchKeyword.value, |
| | | current: npsNoPage.current, |
| | | size: npsNoPage.size, |
| | | }); |
| | | const records = res.data?.records || []; |
| | | npsNoOptions.value = [...npsNoOptions.value, ...records]; |
| | | npsNoPage.total = res.data?.total || 0; |
| | | } catch (error) { |
| | | console.error(error); |
| | | npsNoPage.current--; |
| | | } finally { |
| | | npsNoLoadingMore.value = false; |
| | | } |
| | | }; |
| | | |
| | |
| | | .param-detail-list { |
| | | padding: 10px; |
| | | } |
| | | |
| | | .select-load-more { |
| | | text-align: center; |
| | | padding: 8px 0; |
| | | font-size: 13px; |
| | | color: #409eff; |
| | | cursor: pointer; |
| | | border-top: 1px solid #ebeef5; |
| | | |
| | | &:hover { |
| | | background-color: #f5f7fa; |
| | | } |
| | | |
| | | &.no-more { |
| | | color: #c0c4cc; |
| | | cursor: default; |
| | | |
| | | &:hover { |
| | | background-color: transparent; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | show-overflow-tooltip /> |
| | | <el-table-column label="上报时间" |
| | | prop="createTime" |
| | | show-overflow-tooltip /> |
| | | show-overflow-tooltip > |
| | | <template #default="scope"> |
| | | {{ scope.row.createTime ? scope.row.createTime.split(' ')[0] : '-' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="整改完成期限" |
| | | prop="rectifyTime" |
| | | width="120" |
| | |
| | | </el-table-column>
|
| | | <el-table-column label="创建时间" align="center" prop="createTime" width="200">
|
| | | <template #default="scope">
|
| | | <span>{{ parseTime(scope.row.createTime) }}</span>
|
| | | <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
| | | </template>
|
| | | </el-table-column>
|
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
| | |
| | | <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
|
| | | <el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
| | | <template #default="scope">
|
| | | <span>{{ parseTime(scope.row.createTime) }}</span>
|
| | | <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
| | | </template>
|
| | | </el-table-column>
|
| | | <el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width">
|
| | |
| | | <el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
|
| | | <el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
| | | <template #default="scope">
|
| | | <span>{{ parseTime(scope.row.createTime) }}</span>
|
| | | <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
| | | </template>
|
| | | </el-table-column>
|
| | | <el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width">
|
| | |
| | | </el-table-column>
|
| | | <el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
| | | <template #default="scope">
|
| | | <span>{{ parseTime(scope.row.createTime) }}</span>
|
| | | <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
| | | </template>
|
| | | </el-table-column>
|
| | | <el-table-column label="操作" width="180" align="center" class-name="small-padding fixed-width">
|
| | |
| | | ></el-switch>
|
| | | </template>
|
| | | </el-table-column>
|
| | | <el-table-column label="创建时间" align="center" prop="createTime">
|
| | | <template #default="scope">
|
| | | <span>{{ parseTime(scope.row.createTime) }}</span>
|
| | | </template>
|
| | | </el-table-column>
|
| | | <el-table-column label="创建时间" align="center" prop="createTime">
|
| | | <template #default="scope">
|
| | | <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
| | | </template>
|
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
| | | <template #default="scope">
|
| | | <el-tooltip content="修改" placement="top" v-if="scope.row.roleId !== 1">
|