Merge remote-tracking branch 'origin/dev_天津_建诚恒商贸' into dev_天津_建诚恒商贸
| | |
| | | */
|
| | |
|
| | | // 日期格式化
|
| | | export function parseDate(time, pattern) {
|
| | | if (arguments.length === 0 || !time) {
|
| | | return null
|
| | | }
|
| | | const format = pattern || '{y}-{m}-{d}'
|
| | | let date
|
| | | if (typeof time === 'object') {
|
| | | date = time
|
| | | } else {
|
| | | if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) {
|
| | | time = parseInt(time)
|
| | | } else if (typeof time === 'string') {
|
| | | time = time.replace(new RegExp(/-/gm), '/').replace('T', ' ').replace(new RegExp(/\.[\d]{3}/gm), '')
|
| | | }
|
| | | if ((typeof time === 'number') && (time.toString().length === 10)) {
|
| | | time = time * 1000
|
| | | }
|
| | | date = new Date(time)
|
| | | }
|
| | | const formatObj = {
|
| | | y: date.getFullYear(),
|
| | | m: date.getMonth() + 1,
|
| | | d: date.getDate(),
|
| | | h: date.getHours(),
|
| | | i: date.getMinutes(),
|
| | | s: date.getSeconds(),
|
| | | a: date.getDay()
|
| | | }
|
| | | const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
|
| | | let value = formatObj[key]
|
| | | // Note: getDay() returns 0 on Sunday
|
| | | if (key === 'a') { return ['日', '一', '二', '三', '四', '五', '六'][value] }
|
| | | if (result.length > 0 && value < 10) {
|
| | | value = '0' + value
|
| | | }
|
| | | return value || 0
|
| | | })
|
| | | return time_str
|
| | | }
|
| | |
|
| | | // 日期格式化
|
| | | export function parseTime(time, pattern) {
|
| | | if (arguments.length === 0 || !time) {
|
| | | return null
|
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="使用次数" prop="usageCount"> |
| | | <el-input-number v-model="form.usageCount" :min="0" style="width: 100%" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <!-- <el-col :span="12">--> |
| | | <!-- <el-form-item label="使用次数" prop="usageCount">--> |
| | | <!-- <el-input-number v-model="form.usageCount" :min="0" style="width: 100%" />--> |
| | | <!-- </el-form-item>--> |
| | | <!-- </el-col>--> |
| | | </el-row> |
| | | </el-form> |
| | | </FormDialog> |
| | |
| | | {{ getEfficiencyLabel(currentKnowledge.efficiency) }} |
| | | </el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="使用次数"> |
| | | <el-tag type="info">{{ currentKnowledge.usageCount }} 次</el-tag> |
| | | </el-descriptions-item> |
| | | <!-- <el-descriptions-item label="使用次数">--> |
| | | <!-- <el-tag type="info">{{ currentKnowledge.usageCount }} 次</el-tag>--> |
| | | <!-- </el-descriptions-item>--> |
| | | <el-descriptions-item label="创建人"> |
| | | {{ currentKnowledge.creator }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="创建时间"> |
| | | {{ currentKnowledge.createTime }} |
| | | {{dayjs(currentKnowledge.createTime).format("YYYY-MM-DD")}} |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | |
| | |
| | | <h4>使用统计</h4> |
| | | <div class="usage-stats"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <div class="stat-item"> |
| | | <div class="stat-number">{{ currentKnowledge.usageCount }}</div> |
| | | <div class="stat-label">使用次数</div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <!-- <el-col :span="8">--> |
| | | <!-- <div class="stat-item">--> |
| | | <!-- <div class="stat-number">{{ currentKnowledge.usageCount }}</div>--> |
| | | <!-- <div class="stat-label">使用次数</div>--> |
| | | <!-- </div>--> |
| | | <!-- </el-col>--> |
| | | <el-col :span="12"> |
| | | <div class="stat-item"> |
| | | <div class="stat-number">{{ getEfficiencyScore(currentKnowledge.efficiency) }}%</div> |
| | | <div class="stat-label">效率提升</div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-col :span="12"> |
| | | <div class="stat-item"> |
| | | <div class="stat-number">{{ getTimeSaved(currentKnowledge.efficiency) }}</div> |
| | | <div class="stat-label">平均节省时间</div> |
| | |
| | | <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 dayjs from "dayjs"; |
| | | import { parseDate } from "@/utils/ruoyi"; |
| | | |
| | | // 日期回显格式化(YYYY-MM-DD) |
| | | const formatDate = (row, column, cellValue) => parseDate(cellValue) || '-'; |
| | | |
| | | // 表单验证规则 |
| | | const rules = { |
| | |
| | | return typeMap[params] || "info"; |
| | | } |
| | | }, |
| | | { |
| | | label: "文件数量", |
| | | prop: "fileCount", |
| | | width: 100, |
| | | align: "center" |
| | | }, |
| | | { |
| | | label: "切片数量", |
| | | prop: "totalChunkCount", |
| | | width: 100, |
| | | align: "center" |
| | | }, |
| | | { |
| | | label: "使用次数", |
| | | prop: "usageCount", |
| | | width: 100, |
| | | align: "center" |
| | | }, |
| | | // { |
| | | // label: "文件数量", |
| | | // prop: "fileCount", |
| | | // width: 100, |
| | | // align: "center" |
| | | // }, |
| | | // { |
| | | // label: "切片数量", |
| | | // prop: "totalChunkCount", |
| | | // width: 100, |
| | | // align: "center" |
| | | // }, |
| | | // { |
| | | // label: "使用次数", |
| | | // prop: "usageCount", |
| | | // width: 100, |
| | | // align: "center" |
| | | // }, |
| | | { |
| | | label: "创建人", |
| | | prop: "creator", |
| | |
| | | openFilesDialog(row); |
| | | } |
| | | }, |
| | | { |
| | | name: "问答", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | openChatDialog(row); |
| | | } |
| | | }, |
| | | // { |
| | | // name: "问答", |
| | | // type: "text", |
| | | // clickFun: (row) => { |
| | | // openChatDialog(row); |
| | | // } |
| | | // }, |
| | | { |
| | | name: "详情", |
| | | type: "text", |
| | |
| | | <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"); |
| | |
| | | <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) || '-' |
| | | |
| | | // 响应式数据 |
| | | // 用印申请相关 |
| | |
| | | { prop: "registrant", label: "登记人", minWidth: 120 }, |
| | | { |
| | | prop: "createTime", label: "登记日期", minWidth: 180, |
| | | formatData: cell => { if (!cell) return "-"; try { return dayjs(cell).format("YYYY-MM-DD HH:mm:ss"); } catch { return cell; } }, |
| | | formatData: cell => { if (!cell) return "-"; try { return dayjs(cell).format("YYYY-MM-DD"); } catch { return cell; } }, |
| | | }, |
| | | { prop: "abnormalDescription", label: "异常描述", minWidth: 150 }, |
| | | ]); |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="验收时间"> |
| | | <el-input v-model="form.acceptanceTime" |
| | | disabled /> |
| | | <el-date-picker |
| | | v-model="form.acceptanceTime" |
| | | type="date" |
| | | value-format="YYYY-MM-DD" |
| | | :disabled="true" |
| | | ></el-date-picker> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | |
| | | { label: "备件名称", prop: "sparePartsName" }, |
| | | { label: "领用数量", prop: "quantity" }, |
| | | { label: "操作人", prop: "operator" }, |
| | | { label: "时间", prop: "createTime" }, |
| | | { label: "时间", prop: "createTime",dataType:"date" }, |
| | | ]); |
| | | |
| | | const handleTabChange = async (name) => { |
| | |
| | | label: "登记日期", |
| | | minWidth: 100, |
| | | formatData: cell => |
| | | cell ? dayjs(cell).format("YYYY-MM-DD HH:mm:ss") : "-", |
| | | cell ? dayjs(cell).format("YYYY-MM-DD") : "-", |
| | | }, |
| | | { |
| | | fixed: "right", |
| | |
| | | <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 /> |
| | |
| | | prop="createTime" |
| | | width="200" |
| | | show-overflow-tooltip |
| | | v-if="searchForm.reportType !== 'inout'" /> |
| | | v-if="searchForm.reportType !== 'inout'" > |
| | | <template #default="scope"> |
| | | {{ getDate(scope.row.createTime) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="入库批次" |
| | | prop="inboundBatches" |
| | | width="180" |
| | |
| | | import { ref, reactive, onMounted, nextTick, getCurrentInstance } from "vue"; |
| | | import { ElMessage } from "element-plus"; |
| | | import * as echarts from "echarts"; |
| | | import dayjs from "dayjs"; |
| | | import pagination from "@/components/PIMTable/Pagination.vue"; |
| | | import { |
| | | getStockInventoryInAndOutReportList, |
| | |
| | | ); |
| | | }; |
| | | |
| | | const getDate = val =>{ |
| | | console.log(val) |
| | | if(!val){ |
| | | return "--" |
| | | } |
| | | return dayjs(val).isValid() ? dayjs(val).format('YYYY‑MM‑DD') : '--' |
| | | } |
| | | |
| | | // 获取来源类型选项 |
| | | const fetchStockRecordTypeOptions = () => { |
| | | findAllQualifiedStockInRecordTypeOptions().then(res => { |
| | |
| | | <!-- 第一行:合同开始 / 合同结束 / 试用期 / 转正 --> |
| | | <el-row :gutter="24"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="入职日期" prop="contractStartTime"> |
| | | <el-form-item label="合同开始日期" prop="contractStartTime"> |
| | | <el-date-picker |
| | | v-model="form.contractStartTime" |
| | | type="date" |
| | |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "入职日期", |
| | | label: "合同开始日期", |
| | | prop: "contractStartTime", |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "转正日期", |
| | | prop: "positiveDate", |
| | | width: 120, |
| | | dataType: "slot", |
| | | slot: "positiveDate", |
| | | }, |
| | | // { |
| | | // label: "转正日期", |
| | | // prop: "positiveDate", |
| | | // width: 120, |
| | | // dataType: "slot", |
| | | // slot: "positiveDate", |
| | | // }, |
| | | { |
| | | label: "年龄", |
| | | prop: "age", |
| | |
| | | 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" |
| | |
| | | </el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="客户名称">{{ rowData.productionOrderDto?.customerName || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="开始日期">{{ parseTime(rowData.productionOrderDto?.startTime) || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="开始日期">{{ parseDate(rowData.productionOrderDto?.startTime) || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="完成进度"> |
| | | <el-progress :percentage="rowData.productionOrderDto?.completionStatus>=100?100:rowData.productionOrderDto?.completionStatus" |
| | | :color="customColors(rowData.productionOrderDto?.completionStatus)" |
| | |
| | | <el-descriptions-item label="生产工单号">{{ detailData.workOrder.workOrderNo || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="计划数量">{{ detailData.workOrder.planQuantity || 0 }}</el-descriptions-item> |
| | | <el-descriptions-item label="完成数量">{{ detailData.workOrder.completeQuantity || 0 }}</el-descriptions-item> |
| | | <el-descriptions-item label="实际开始时间">{{ parseTime(detailData.workOrder.actualStartTime) || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="实际结束时间">{{ parseTime(detailData.workOrder.actualEndTime) || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="实际开始时间">{{ parseDate(detailData.workOrder.actualStartTime) || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="实际结束时间">{{ parseDate(detailData.workOrder.actualEndTime) || '-' }}</el-descriptions-item> |
| | | <!-- <el-descriptions-item label="完成进度"> |
| | | <el-progress :percentage="detailData.workOrder.completionStatus >= 100 ? 100 : (detailData.workOrder.completionStatus || 0)" |
| | | :color="customColors(detailData.workOrder.completionStatus)" |
| | |
| | | <el-table-column label="创建时间" |
| | | align="center"> |
| | | <template #default="{ row }"> |
| | | {{ parseTime(row.createTime) }} |
| | | {{ parseDate(row.createTime) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="工时(h)" |
| | |
| | | :key="record.id" |
| | | class="quality-record-block"> |
| | | <div class="detail-section"> |
| | | <h3 class="section-title">检测记录 {{ index + 1 }} - {{ parseTime(record.createTime) }}</h3> |
| | | <h3 class="section-title">检测记录 {{ index + 1 }} - {{ parseDate(record.createTime) }}</h3> |
| | | <el-descriptions :column="3" |
| | | border> |
| | | <el-descriptions-item label="检测日期">{{ parseTime(record.createTime) || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="检测日期">{{ parseDate(record.createTime) || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="报工单号">{{ record.reportNo || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="检验员">{{ record.userName || '-' }}</el-descriptions-item> |
| | | <el-descriptions-item label="产品名称">{{ record.productName || '-' }}</el-descriptions-item> |
| | |
| | | import { ref, reactive, onMounted, computed } from "vue"; |
| | | import { useRoute, useRouter } from "vue-router"; |
| | | import { ElMessage } from "element-plus"; |
| | | import { parseTime } from "@/utils/ruoyi"; |
| | | import { parseDate } from "@/utils/ruoyi"; |
| | | import InputModal from "@/views/productionManagement/productionReporting/Input.vue"; |
| | | import { |
| | | getOrderDetail, |