Merge branch 'dev_天津_建诚恒商贸' of http://114.132.189.42:9002/r/product-inventory-management into dev_天津_建诚恒商贸
| | |
| | | {{ 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(); |
| | |
| | | */
|
| | |
|
| | | // 日期格式化
|
| | | 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
|
| | |
| | | { |
| | | 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([]); |
| | |
| | | </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", |
| | |
| | | label: "创建时间", |
| | | prop: "createTime", |
| | | width: 180, |
| | | dataType:"date" |
| | | }, |
| | | { |
| | | dataType: "action", |
| | |
| | | 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"); |
| | |
| | | }, |
| | | { 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', |
| | |
| | | { 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-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;"> |
| | |
| | | width: 200, |
| | | align: "center", |
| | | }, |
| | | { |
| | | label: "证书编号", |
| | | prop: "model", |
| | | width: 200, |
| | | align: "center", |
| | | }, |
| | | // { |
| | | // label: "证书编号", |
| | | // prop: "model", |
| | | // width: 200, |
| | | // align: "center", |
| | | // }, |
| | | { |
| | | label: "最新鉴定日期", |
| | | prop: "mostDate", |
| | |
| | | </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"> |
| | |
| | | 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: "sparePartsName" }, |
| | | { label: "领用数量", prop: "quantity" }, |
| | | { label: "操作人", prop: "operator" }, |
| | | { label: "时间", prop: "createTime" }, |
| | | { label: "时间", prop: "createTime",dataType:"date" }, |
| | | ]); |
| | | |
| | | const handleTabChange = async (name) => { |
| | |
| | | <el-table-column label="实际保养人" prop="maintenanceActuallyName" align="center" /> |
| | | <el-table-column label="实际保养日期" align="center"> |
| | | <template #default="{ row }"> |
| | | {{ row.maintenanceActuallyTime ? dayjs(row.maintenanceActuallyTime).format('YYYY-MM-DD HH:mm:ss') : '-' }} |
| | | {{ row.maintenanceActuallyTime ? dayjs(row.maintenanceActuallyTime).format('YYYY-MM-DD') : '-' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="保养结果" align="center"> |
| | |
| | | label: "登记日期", |
| | | minWidth: 100, |
| | | formatData: cell => |
| | | cell ? dayjs(cell).format("YYYY-MM-DD HH:mm:ss") : "-", |
| | | cell ? dayjs(cell).format("YYYY-MM-DD") : "-", |
| | | }, |
| | | { |
| | | fixed: "right", |
| | |
| | | align: "center", |
| | | prop: "maintenanceActuallyTime", |
| | | formatData: cell => |
| | | cell ? dayjs(cell).format("YYYY-MM-DD HH:mm:ss") : "-", |
| | | cell ? dayjs(cell).format("YYYY-MM-DD") : "-", |
| | | }, |
| | | { |
| | | label: "保养结果", |
| | |
| | | { 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> |
| | |
| | | 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-descriptions-item label="发货订单号">{{ detailData.shippingInfo.shippingNo || "--" }}</el-descriptions-item> |
| | | <el-descriptions-item label="客户名称">{{ detailData.shippingInfo.customerName || "--" }}</el-descriptions-item> |
| | | <el-descriptions-item label="发货类型">{{ detailData.shippingInfo.type || "--" }}</el-descriptions-item> |
| | | <el-descriptions-item label="发货日期">{{ detailData.shippingInfo.shippingDateDate || "--" }}</el-descriptions-item> |
| | | <el-descriptions-item label="发货日期">{{ detailData.shippingInfo.shippingDate || "--" }}</el-descriptions-item> |
| | | <el-descriptions-item label="审核状态">{{ detailData.shippingInfo.status || "--" }}</el-descriptions-item> |
| | | <el-descriptions-item label="发货车牌号">{{ detailData.shippingInfo.shippingCarNumber || "--" }}</el-descriptions-item> |
| | | <el-descriptions-item label="快递公司">{{ detailData.shippingInfo.expressCompany || "--" }}</el-descriptions-item> |
| | |
| | | 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) { |
| | |
| | | <!-- 第一行:合同开始 / 合同结束 / 试用期 / 转正 --> |
| | | <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", |
| | |
| | | { 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", |
| | |
| | | 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" |
| | |
| | | }, |
| | | }); |
| | | const { form, rules } = toRefs(data); |
| | | const { form: searchForm } = useFormData({ |
| | | ...data.searchForm, |
| | | // 设置录入日期范围为当天 |
| | | entryDate: [ |
| | | dayjs().startOf("day").format("YYYY-MM-DD"), |
| | | dayjs().endOf("day").format("YYYY-MM-DD"), |
| | | ], |
| | | entryDateStart: dayjs().startOf("day").format("YYYY-MM-DD"), |
| | | entryDateEnd: dayjs().endOf("day").format("YYYY-MM-DD"), |
| | | }); |
| | | const { form: searchForm } = useFormData(data.searchForm); |
| | | |
| | | // 产品表单弹框数据 |
| | | const productFormVisible = ref(false); |
| | |
| | | prop: "process", |
| | | minWidth: 100, |
| | | }, |
| | | { |
| | | label: "工时(h)", |
| | | prop: "workHour", |
| | | minWidth: 100, |
| | | }, |
| | | // { |
| | | // label: "工时(h)", |
| | | // prop: "workHour", |
| | | // minWidth: 100, |
| | | // }, |
| | | { |
| | | label: "生产数量", |
| | | prop: "quantity", |
| | | minWidth: 100, |
| | | }, |
| | | { |
| | | label: "工时定额", |
| | | prop: "workHours", |
| | | minWidth: 100, |
| | | }, |
| | | { |
| | | label: "工资", |
| | | prop: "wages", |
| | | minWidth: 100, |
| | | }, |
| | | // { |
| | | // label: "工时定额", |
| | | // prop: "workHours", |
| | | // minWidth: 100, |
| | | // }, |
| | | // { |
| | | // label: "工资", |
| | | // prop: "wages", |
| | | // minWidth: 100, |
| | | // }, |
| | | ]); |
| | | |
| | | // 左侧汇总台账列(生产人、产量、工资、合格率) |
| | |
| | | prop: "finishedNum", |
| | | minWidth: 100, |
| | | }, |
| | | { |
| | | label: "工资", |
| | | prop: "wages", |
| | | minWidth: 100, |
| | | }, |
| | | // { |
| | | // label: "工资", |
| | | // prop: "wages", |
| | | // minWidth: 100, |
| | | // }, |
| | | { |
| | | label: "合格率", |
| | | prop: "outputRate", |
| | |
| | | prop: "nickName", |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "工时(h)", |
| | | width: 100, |
| | | prop: "workHour", |
| | | }, |
| | | // { |
| | | // label: "工时(h)", |
| | | // width: 100, |
| | | // prop: "workHour", |
| | | // }, |
| | | { |
| | | label: "工序", |
| | | prop: "process", |
| | |
| | | label: "创建时间", |
| | | prop: "createTime", |
| | | width: 120, |
| | | dataType: "date" |
| | | }, |
| | | { |
| | | dataType: "action", |
| | |
| | | </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, |
| | |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "检测单位", |
| | | prop: "checkCompany", |
| | | width: 120, |
| | | }, |
| | | { |
| | | label: "检测结果", |
| | | prop: "checkResult", |
| | | dataType: "tag", |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="typeNum"> |
| | | <div class="typeNum-left"> |
| | | <img src="~@/assets/images/chartCard2.svg" alt="图表" |
| | | style="width: 40px; height: 40px; object-fit: contain;"> |
| | | <div class="typeNum-left-text" style="color: #5EB334;">半成品</div> |
| | | </div> |
| | | <div class="typeNum-center"> |
| | | <div class="typeNum-leftLine2">-</div> |
| | | <div class="typeNum-rightLine2"></div> |
| | | </div> |
| | | <div class="typeNum-right"> |
| | | <div class="typeNum-right-top"> |
| | | <div class="typeNum-right-top-name">总数量</div> |
| | | <div class="typeNum-right-top-text">{{ getInspectStatValue(1, 'totalCount') }} <span |
| | | class="unit">个</span></div> |
| | | </div> |
| | | <div class="typeNum-right-bottom"> |
| | | <div class="typeNum-right-top-name">已完成数</div> |
| | | <div class="typeNum-right-top-text">{{ getInspectStatValue(1, 'completedCount') }} <span |
| | | class="unit">个</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="typeNum">--> |
| | | <!-- <div class="typeNum-left">--> |
| | | <!-- <img src="~@/assets/images/chartCard2.svg" alt="图表"--> |
| | | <!-- style="width: 40px; height: 40px; object-fit: contain;">--> |
| | | <!-- <div class="typeNum-left-text" style="color: #5EB334;">半成品</div>--> |
| | | <!-- </div>--> |
| | | <!-- <div class="typeNum-center">--> |
| | | <!-- <div class="typeNum-leftLine2">-</div>--> |
| | | <!-- <div class="typeNum-rightLine2"></div>--> |
| | | <!-- </div>--> |
| | | <!-- <div class="typeNum-right">--> |
| | | <!-- <div class="typeNum-right-top">--> |
| | | <!-- <div class="typeNum-right-top-name">总数量</div>--> |
| | | <!-- <div class="typeNum-right-top-text">{{ getInspectStatValue(1, 'totalCount') }} <span--> |
| | | <!-- class="unit">个</span></div>--> |
| | | <!-- </div>--> |
| | | <!-- <div class="typeNum-right-bottom">--> |
| | | <!-- <div class="typeNum-right-top-name">已完成数</div>--> |
| | | <!-- <div class="typeNum-right-top-text">{{ getInspectStatValue(1, 'completedCount') }} <span--> |
| | | <!-- class="unit">个</span>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <div class="typeNum"> |
| | | <div class="typeNum-left"> |
| | | <img src="~@/assets/images/chartCard3.svg" alt="图表" |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="quality-card green-card"> |
| | | <div class="quality-card-title"> |
| | | <img src="~@/assets/images/chartCard2.svg" alt="半成品" |
| | | style="width: 24px; height: 24px; margin-right: 8px;"> |
| | | 半成品合格率 |
| | | </div> |
| | | <div class="quality-card-content"> |
| | | <div class="quality-item"> |
| | | <div> |
| | | <div class="quality-item-label blue-label">完成率</div> |
| | | <div class="quality-item-tip">占比</div> |
| | | <div class="quality-item-value">{{ getPassRateStatValue(1, 'completionRate') }}</div> |
| | | </div> |
| | | <div class="quality-item-chart" ref="semiCompletionChart"></div> |
| | | </div> |
| | | <div class="quality-item"> |
| | | <div> |
| | | <div class="quality-item-label green-label">合格率</div> |
| | | <div class="quality-item-tip">占比</div> |
| | | <div class="quality-item-value">{{ getPassRateStatValue(1, 'passRate') }}</div> |
| | | </div> |
| | | <div class="quality-item-chart" ref="semiQualityChart"></div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="quality-card green-card">--> |
| | | <!-- <div class="quality-card-title">--> |
| | | <!-- <img src="~@/assets/images/chartCard2.svg" alt="半成品"--> |
| | | <!-- style="width: 24px; height: 24px; margin-right: 8px;">--> |
| | | <!-- 半成品合格率--> |
| | | <!-- </div>--> |
| | | <!-- <div class="quality-card-content">--> |
| | | <!-- <div class="quality-item">--> |
| | | <!-- <div>--> |
| | | <!-- <div class="quality-item-label blue-label">完成率</div>--> |
| | | <!-- <div class="quality-item-tip">占比</div>--> |
| | | <!-- <div class="quality-item-value">{{ getPassRateStatValue(1, 'completionRate') }}</div>--> |
| | | <!-- </div>--> |
| | | <!-- <div class="quality-item-chart" ref="semiCompletionChart"></div>--> |
| | | <!-- </div>--> |
| | | <!-- <div class="quality-item">--> |
| | | <!-- <div>--> |
| | | <!-- <div class="quality-item-label green-label">合格率</div>--> |
| | | <!-- <div class="quality-item-tip">占比</div>--> |
| | | <!-- <div class="quality-item-value">{{ getPassRateStatValue(1, 'passRate') }}</div>--> |
| | | <!-- </div>--> |
| | | <!-- <div class="quality-item-chart" ref="semiQualityChart"></div>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <div class="quality-card purple-card"> |
| | | <div class="quality-card-title"> |
| | | <img src="~@/assets/images/chartCard3.svg" alt="成品" |
| | |
| | | <div class="chart-box-title">原材料总数</div> |
| | | <div class="chart-box-num">{{ getYearlyStatValue(0, 'totalCount') }}</div> |
| | | </div> |
| | | <div class="inspection-chart-box"> |
| | | <div class="chart-box-title">半成品总数</div> |
| | | <div class="chart-box-num">{{ getYearlyStatValue(1, 'totalCount') }}</div> |
| | | </div> |
| | | <!-- <div class="inspection-chart-box">--> |
| | | <!-- <div class="chart-box-title">半成品总数</div>--> |
| | | <!-- <div class="chart-box-num">{{ getYearlyStatValue(1, 'totalCount') }}</div>--> |
| | | <!-- </div>--> |
| | | <div class="inspection-chart-box"> |
| | | <div class="chart-box-title">成品总数</div> |
| | | <div class="chart-box-num">{{ getYearlyStatValue(2, 'totalCount') }}</div> |
| | |
| | | <!-- Tab 选择器 --> |
| | | <div class="tab-selector"> |
| | | <div class="tab-item" :class="{ active: activeTab === 'raw' }" @click="activeTab = 'raw'">原材料</div> |
| | | <div class="tab-item" :class="{ active: activeTab === 'semi' }" @click="activeTab = 'semi'">半成品</div> |
| | | <!-- <div class="tab-item" :class="{ active: activeTab === 'semi' }" @click="activeTab = 'semi'">半成品</div>--> |
| | | <div class="tab-item" :class="{ active: activeTab === 'final' }" @click="activeTab = 'final'">成品</div> |
| | | </div> |
| | | </el-card> |
| | |
| | | containLabel: true, |
| | | }, |
| | | legend: { |
| | | data: ["原材料", "半成品", "成品"], // 图例数据 |
| | | // data: ["原材料", "半成品", "成品"], // 图例数据 |
| | | data: ["原材料", "成品"], // 图例数据 |
| | | icon: ["circle", "circle", "circle"], |
| | | itemWidth: 10, // 设置图标宽度 |
| | | itemHeight: 10, |
| | |
| | | color: "#409EFF", |
| | | }, |
| | | }, |
| | | { |
| | | name: "半成品", |
| | | type: "bar", |
| | | barWidth: "15%", |
| | | |
| | | data: monthlyCompletionDetailsData.value.map(item => item.processCount), |
| | | itemStyle: { |
| | | color: "#67C23A", |
| | | }, |
| | | }, |
| | | // { |
| | | // name: "半成品", |
| | | // type: "bar", |
| | | // barWidth: "15%", |
| | | // |
| | | // data: monthlyCompletionDetailsData.value.map(item => item.processCount), |
| | | // itemStyle: { |
| | | // color: "#67C23A", |
| | | // }, |
| | | // }, |
| | | { |
| | | name: "成品", |
| | | type: "bar", |
| | |
| | | radius: "70%", |
| | | data: [ |
| | | { value: getYearlyStatValue(0, 'totalCount'), name: "原材料", itemStyle: { color: "#1890FF" } }, |
| | | { value: getYearlyStatValue(1, 'totalCount'), name: "半成品", itemStyle: { color: "#F7BA1E" } }, |
| | | // { value: getYearlyStatValue(1, 'totalCount'), name: "半成品", itemStyle: { color: "#F7BA1E" } }, |
| | | { value: getYearlyStatValue(2, 'totalCount'), name: "成品", itemStyle: { color: "#14C9C9" } }, |
| | | ], |
| | | label: { |
| | |
| | | }, |
| | | // 图例配置 |
| | | legend: { |
| | | data: ["原材料", "半成品", "成品"], // 图例数据 |
| | | // data: ["原材料", "半成品", "成品"], // 图例数据 |
| | | data: ["原材料", "成品"], // 图例数据 |
| | | icon: ["circle", "circle", "circle"], |
| | | itemWidth: 10, // 设置图标宽度 |
| | | itemHeight: 10, |
| | |
| | | |
| | | .typeNum { |
| | | height: 100%; |
| | | width: 33.33%; |
| | | width: 50%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | |
| | | <div class="app-container vat-page"> |
| | | <el-row :gutter="20" class="vat-row"> |
| | | <!-- 左侧:增值税明细列表 --> |
| | | <el-col :span="15" class="vat-col"> |
| | | <el-col :span="12" class="vat-col"> |
| | | <el-card shadow="never" class="vat-card"> |
| | | <template #header> |
| | | <div class="card-header"> |
| | |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="invoiceNo" label="发票号" min-width="140" show-overflow-tooltip /> |
| | | <!-- <el-table-column prop="invoiceNo" label="发票号" min-width="140" show-overflow-tooltip />--> |
| | | <el-table-column prop="salesContractNo" label="合同号" min-width="140" show-overflow-tooltip /> |
| | | <el-table-column prop="supplierName" label="供应商" min-width="100" show-overflow-tooltip /> |
| | | <!-- <el-table-column prop="supplierName" label="供应商" min-width="100" show-overflow-tooltip />--> |
| | | <el-table-column prop="customerName" label="客户" min-width="100" show-overflow-tooltip /> |
| | | <el-table-column prop="invoiceDate" label="开票日期" width="110" align="center" /> |
| | | <el-table-column prop="taxRate" label="税率" width="75" align="center"> |
| | |
| | | </el-col> |
| | | |
| | | <!-- 右侧:柱状对比图 --> |
| | | <el-col :span="9" class="vat-col"> |
| | | <el-col :span="12" class="vat-col"> |
| | | <el-card shadow="never" class="vat-card"> |
| | | <template #header> |
| | | <span class="card-title">进销项增值税对比</span> |
| | |
| | | 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" |