From ca1a6bae22d176c12fdc8e86f754c4df4d661191 Mon Sep 17 00:00:00 2001
From: liyong <18434998025@163.com>
Date: 星期三, 04 三月 2026 17:01:00 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_KTHG' into dev_KTHG
---
src/views/index.vue | 619 +++++++++++++++-------------------
src/views/equipmentManagement/spareParts/index.vue | 124 +++---
src/views/productionManagement/workOrder/index.vue | 23
src/api/viewIndex.js | 26 +
src/views/inventoryManagement/stockManagement/Qualified.vue | 2
src/api/collaborativeApproval/customerVisit.js | 10
src/views/collaborativeApproval/customerVisit/index.vue | 269 ++++++++++++++
7 files changed, 656 insertions(+), 417 deletions(-)
diff --git a/src/api/collaborativeApproval/customerVisit.js b/src/api/collaborativeApproval/customerVisit.js
new file mode 100644
index 0000000..dce1fdf
--- /dev/null
+++ b/src/api/collaborativeApproval/customerVisit.js
@@ -0,0 +1,10 @@
+import request from '@/utils/request'
+
+// 鑾峰彇鎷滆璁板綍鍒楄〃
+export function getVisitRecords(query) {
+ return request({
+ url: '/customerVisits/listPage',
+ method: 'get',
+ params: query
+ })
+}
diff --git a/src/api/viewIndex.js b/src/api/viewIndex.js
index 0fd1390..8b5d144 100644
--- a/src/api/viewIndex.js
+++ b/src/api/viewIndex.js
@@ -1,12 +1,21 @@
// 棣栭〉鎺ュ彛
import request from "@/utils/request";
-// 宸ュ崟鎵ц鏁堢巼鍒嗘瀽
-export const workOrderEfficiencyAnalysis = (query) => {
+// 宸ュ簭鏁版嵁鐢熶骇缁熻鏄庣粏
+export const processDataProductionStatistics = (params) => {
return request({
- url: "/home/workOrderEfficiencyAnalysis",
+ url: "/home/processDataProductionStatistics",
method: "get",
- params: query,
+ params,
+ });
+};
+
+// 璐ㄩ噺缁熻
+export const qualityInspectionStatistics = (params) => {
+ return request({
+ url: "/home/qualityInspectionStatistics",
+ method: "get",
+ params,
});
};
@@ -100,6 +109,15 @@
});
};
+// 宸ュ崟鎵ц鏁堢巼鍒嗘瀽锛坉ateType: 1鍛� 2鏈� 3瀛e害锛�
+export const workOrderEfficiencyAnalysis = (params) => {
+ return request({
+ url: "/home/workOrderEfficiencyAnalysis",
+ method: "get",
+ params,
+ });
+};
+
// 鐢熶骇鏍哥畻鍒嗘瀽
export const productionAccountingAnalysis = (query) => {
return request({
diff --git a/src/views/collaborativeApproval/customerVisit/index.vue b/src/views/collaborativeApproval/customerVisit/index.vue
new file mode 100644
index 0000000..3122f3f
--- /dev/null
+++ b/src/views/collaborativeApproval/customerVisit/index.vue
@@ -0,0 +1,269 @@
+<template>
+ <div class="app-container">
+ <div class="search_form">
+ <el-form :model="searchForm" :inline="true">
+ <el-form-item label="瀹㈡埛鍚嶇О锛�">
+ <el-input
+ v-model="searchForm.customerName"
+ placeholder="璇疯緭鍏ュ鎴峰悕绉�"
+ clearable
+ prefix-icon="Search"
+ style="width: 200px"
+ @change="handleQuery"
+ />
+ </el-form-item>
+ <el-form-item label="鎷滆浜猴細">
+ <el-input
+ v-model="searchForm.visitingPeople"
+ placeholder="璇疯緭鍏ユ嫓璁夸汉"
+ clearable
+ prefix-icon="Search"
+ style="width: 200px"
+ @change="handleQuery"
+ />
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" @click="handleQuery">鎼滅储</el-button>
+ </el-form-item>
+ </el-form>
+ </div>
+ <div class="table_list">
+ <el-table
+ :data="tableData"
+ border
+ v-loading="tableLoading"
+ style="width: 100%"
+ height="calc(100vh - 18.5em)"
+ >
+ <el-table-column align="center" label="搴忓彿" type="index" width="60" />
+ <el-table-column label="瀹㈡埛鍚嶇О" prop="customerName" width="150" show-overflow-tooltip />
+ <el-table-column label="鑱旂郴浜�" prop="contact" width="120" show-overflow-tooltip />
+ <el-table-column label="鑱旂郴鐢佃瘽" prop="contactPhone" width="140" show-overflow-tooltip />
+ <el-table-column label="鎷滆鐩殑" prop="purposeVisit" width="150" show-overflow-tooltip />
+ <el-table-column label="鎷滆鏃堕棿" prop="purposeDate" width="180" show-overflow-tooltip />
+ <el-table-column label="鎷滆鍦扮偣" prop="visitAddress" min-width="200" show-overflow-tooltip />
+ <el-table-column label="鎷滆浜�" prop="visitingPeople" width="120" show-overflow-tooltip />
+ <el-table-column fixed="right" label="鎿嶄綔" width="100" align="center">
+ <template #default="scope">
+ <el-button link type="primary" size="small" @click="viewDetail(scope.row)">鏌ョ湅</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ <pagination
+ v-show="total > 0"
+ :total="total"
+ layout="total, sizes, prev, pager, next, jumper"
+ :page="page.current"
+ :limit="page.size"
+ @pagination="paginationChange"
+ />
+ </div>
+
+ <!-- 璇︽儏寮圭獥 -->
+ <el-dialog
+ v-model="detailVisible"
+ title="瀹㈡埛鎷滆璁板綍璇︽儏"
+ width="600px"
+ @close="closeDetail"
+ >
+ <div class="content-container">
+ <!-- 瀹㈡埛淇℃伅 -->
+ <div class="section">
+ <div class="section-title">瀹㈡埛淇℃伅</div>
+ <div class="info-item">
+ <span class="info-label">瀹㈡埛鍚嶇О</span>
+ <span class="info-value">{{ detailForm.customerName || '-' }}</span>
+ </div>
+ <div class="info-item">
+ <span class="info-label">鑱旂郴浜�</span>
+ <span class="info-value">{{ detailForm.contact || '-' }}</span>
+ </div>
+ <div class="info-item">
+ <span class="info-label">鑱旂郴鐢佃瘽</span>
+ <span class="info-value">{{ detailForm.contactPhone || '-' }}</span>
+ </div>
+ </div>
+
+ <!-- 鎷滆淇℃伅 -->
+ <div class="section">
+ <div class="section-title">鎷滆淇℃伅</div>
+ <div class="info-item">
+ <span class="info-label">鎷滆鐩殑</span>
+ <span class="info-value">{{ detailForm.purposeVisit || '-' }}</span>
+ </div>
+ <div class="info-item">
+ <span class="info-label">鎷滆鏃堕棿</span>
+ <span class="info-value">{{ detailForm.purposeDate || '-' }}</span>
+ </div>
+ <div class="info-item">
+ <span class="info-label">鎷滆鍦扮偣</span>
+ <span class="info-value multi-line">{{ detailForm.visitAddress || '-' }}</span>
+ </div>
+ <div class="info-item">
+ <span class="info-label">鎷滆浜�</span>
+ <span class="info-value">{{ detailForm.visitingPeople || '-' }}</span>
+ </div>
+ <div class="info-item" v-if="detailForm.latitude && detailForm.longitude">
+ <span class="info-label">缁忕含搴�</span>
+ <span class="info-value">{{ detailForm.latitude }}, {{ detailForm.longitude }}</span>
+ </div>
+ </div>
+
+ <!-- 澶囨敞淇℃伅 -->
+ <div class="section">
+ <div class="section-title">澶囨敞淇℃伅</div>
+ <div class="info-item remark-item">
+ <span class="info-label">澶囨敞</span>
+ <span class="info-value multi-line">{{ detailForm.remark || '-' }}</span>
+ </div>
+ </div>
+ </div>
+ <template #footer>
+ <div class="dialog-footer">
+ <el-button @click="closeDetail">鍏抽棴</el-button>
+ </div>
+ </template>
+ </el-dialog>
+ </div>
+</template>
+
+<script setup>
+import { ref, reactive, onMounted, getCurrentInstance } from 'vue'
+import pagination from '@/components/PIMTable/Pagination.vue'
+import { getVisitRecords } from '@/api/collaborativeApproval/customerVisit.js'
+
+const { proxy } = getCurrentInstance()
+const tableData = ref([])
+const tableLoading = ref(false)
+const page = reactive({
+ current: 1,
+ size: 10,
+})
+const total = ref(0)
+
+// 鎼滅储琛ㄥ崟
+const searchForm = reactive({
+ customerName: '',
+ visitingPeople: '',
+})
+
+// 璇︽儏鐩稿叧
+const detailVisible = ref(false)
+const detailForm = ref({})
+
+// 鏌ヨ鍒楄〃
+const handleQuery = () => {
+ page.current = 1
+ getList()
+}
+
+// 鍒嗛〉鍙樺寲
+const paginationChange = (obj) => {
+ page.current = obj.page
+ page.size = obj.limit
+ getList()
+}
+
+// 鑾峰彇鍒楄〃鏁版嵁
+const getList = () => {
+ tableLoading.value = true
+ getVisitRecords({ ...searchForm, ...page })
+ .then((res) => {
+ tableLoading.value = false
+ if (res.code === 200) {
+ tableData.value = res.data?.records || res.records || []
+ total.value = res.data?.total || res.total || 0
+ } else {
+ proxy.$modal.msgError(res.msg || '鑾峰彇鏁版嵁澶辫触')
+ }
+ })
+ .catch(() => {
+ tableLoading.value = false
+ })
+}
+
+// 鏌ョ湅璇︽儏
+const viewDetail = (row) => {
+ detailForm.value = { ...row }
+ detailVisible.value = true
+}
+
+// 鍏抽棴璇︽儏
+const closeDetail = () => {
+ detailVisible.value = false
+ detailForm.value = {}
+}
+
+onMounted(() => {
+ getList()
+})
+</script>
+
+<style scoped lang="scss">
+.table_list {
+ margin-top: unset;
+}
+
+.content-container {
+ padding: 10px;
+}
+
+.section {
+ margin-bottom: 24px;
+
+ &:last-child {
+ margin-bottom: 0;
+ }
+}
+
+.section-title {
+ font-size: 16px;
+ font-weight: bold;
+ color: #303133;
+ margin-bottom: 16px;
+ padding-bottom: 8px;
+ border-bottom: 1px solid #e4e7ed;
+}
+
+.info-item {
+ display: flex;
+ margin-bottom: 12px;
+ line-height: 1.6;
+
+ &:last-child {
+ margin-bottom: 0;
+ }
+
+ &.remark-item {
+ flex-direction: column;
+ align-items: flex-start;
+
+ .info-label {
+ margin-bottom: 8px;
+ }
+
+ .info-value {
+ width: 100%;
+ }
+ }
+}
+
+.info-label {
+ font-weight: 500;
+ color: #606266;
+ min-width: 100px;
+ margin-right: 12px;
+ flex-shrink: 0;
+}
+
+.info-value {
+ color: #303133;
+ flex: 1;
+ word-break: break-all;
+
+ &.multi-line {
+ white-space: pre-wrap;
+ word-break: break-word;
+ }
+}
+</style>
diff --git a/src/views/equipmentManagement/spareParts/index.vue b/src/views/equipmentManagement/spareParts/index.vue
index db82a7d..68e0f6e 100644
--- a/src/views/equipmentManagement/spareParts/index.vue
+++ b/src/views/equipmentManagement/spareParts/index.vue
@@ -19,59 +19,19 @@
<el-button type="primary" @click="addCategory" >鏂板</el-button>
</div>
</div>
-
- <div class="table_list">
- <el-table
- v-loading="loading"
- :data="renderTableData"
- style="width: 100%; margin-top: 10px;"
- border
- row-key="id"
- >
- <el-table-column prop="deviceNameStr" label="璁惧鍚嶇О" width="300"></el-table-column>
- <el-table-column prop="name" label="澶囦欢鍚嶇О" width="200"></el-table-column>
- <el-table-column prop="sparePartsNo" label="澶囦欢缂栧彿" width="200"></el-table-column>
- <el-table-column prop="status" label="鐘舵��" width="100">
- <template #default="{ row }">
- <el-tag type="success" size="small">{{ row.status }}</el-tag>
- </template>
- </el-table-column>
- <el-table-column prop="quantity" label="鏁伴噺" width="140"></el-table-column>
- <el-table-column prop="description" label="鎻忚堪"></el-table-column>
- <el-table-column label="鎿嶄綔" width="150" fixed="right" align="center">
- <template #default="{ row }">
- <el-button
- link
- type="primary"
- @click="() => editCategory(row)"
- :disabled="loading"
- >
- 缂栬緫
- </el-button>
- <el-button
- link
- @click="() => deleteCategory(row.id)"
- style="color: #f56c6c;"
- :disabled="loading"
- >
- 鍒犻櫎
- </el-button>
- </template>
- </el-table-column>
- </el-table>
- <!-- 鍒嗛〉缁勪欢 -->
- <div class="pagination-container">
- <el-pagination
- v-model:current-page="pagination.current"
- v-model:page-size="pagination.size"
- :page-sizes="[10, 20, 50, 100]"
- :total="pagination.total"
- layout="total, sizes, prev, pager, next, jumper"
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- />
- </div>
- </div>
+ <PIMTable
+ rowKey="id"
+ :column="columns"
+ :tableData="renderTableData"
+ :tableLoading="loading"
+ :page="pagination"
+ :isShowPagination="true"
+ @pagination="handleSizeChange"
+ >
+ <template #status="{ row }">
+ <el-tag type="success" size="small">{{ row.status }}</el-tag>
+ </template>
+ </PIMTable>
<el-dialog title="鍒嗙被绠$悊" v-model="dialogVisible" width="60%">
<el-form :model="form" :rules="rules" ref="formRef" label-width="100px">
<el-form-item label="璁惧" prop="deviceLedgerIds">
@@ -126,6 +86,7 @@
import { ElMessage, ElMessageBox } from 'element-plus';
import { getSparePartsList, addSparePart, editSparePart, delSparePart } from "@/api/equipmentManagement/spareParts";
import { getDeviceLedger } from "@/api/equipmentManagement/ledger";
+import PIMTable from "@/components/PIMTable/PIMTable.vue";
// 鍔犺浇鐘舵��
const loading = ref(false);
@@ -193,6 +154,56 @@
}
]
});
+const columns = ref([
+ {
+ label: "璁惧鍚嶇О",
+ prop: "deviceNameStr",
+ },
+ {
+ label: "澶囦欢鍚嶇О",
+ prop: "name",
+ },
+ {
+ label: "澶囦欢缂栧彿",
+ prop: "sparePartsNo",
+ },
+ {
+ label: "鐘舵��",
+ prop: "status",
+ slot: "status",
+ dataType: "slot",
+ },
+ {
+ label: "鏁伴噺",
+ prop: "quantity",
+ },
+ {
+ label: "鎻忚堪",
+ prop: "description",
+ },
+ {
+ label: "鎿嶄綔",
+ prop: "operation",
+ width: 150,
+ fixed: 'right',
+ align: "center",
+ dataType: "action",
+ operation: [
+ {
+ name: "缂栬緫",
+ clickFun: (row) => {
+ editCategory(row)
+ },
+ },
+ {
+ name: "鍒犻櫎",
+ clickFun: (row) => {
+ deleteCategory(row.id)
+ },
+ },
+ ],
+ },
+]);
// 鑾峰彇缂╄繘閲�
const getIndentation = (row) => {
// 杩欓噷绠�鍗曡繑鍥� 20锛屽彲鏍规嵁瀹為檯闇�姹傚疄鐜板眰绾х缉杩涢�昏緫
@@ -255,9 +266,9 @@
}
// 鍒嗛〉澶у皬鏀瑰彉
-const handleSizeChange = (size) => {
- pagination.size = size;
- pagination.current = 1;
+const handleSizeChange = (obj) => {
+ pagination.current = obj.page;
+ pagination.size = obj.limit;
fetchListData();
}
@@ -285,6 +296,7 @@
form.sparePartsNo = '';
form.status = '';
form.description = '';
+ form.quantity = undefined;
form.deviceLedgerIds = [];
operationType.value = 'add'
dialogVisible.value = true;
diff --git a/src/views/index.vue b/src/views/index.vue
index 59eb106..bf488c5 100644
--- a/src/views/index.vue
+++ b/src/views/index.vue
@@ -1,8 +1,7 @@
<template>
<div class="dashboard">
- <!-- 椤堕儴妯悜涓ゆ爮 -->
+ <!-- 椤堕儴锛氬乏鐢ㄦ埛淇℃伅锛屼腑闂村簱瀛樺崱鐗囷紝鍙充晶寰呭姙 -->
<div class="dashboard-top">
- <!-- 宸︼細浼佷笟淇℃伅+涓夊ぇ鏁版嵁鍗$墖锛堜笂涓嬫帓鍒楋級 -->
<div class="top-left">
<div class="company-info">
<!-- 椤堕儴闂�欐潯 -->
@@ -31,90 +30,66 @@
</div>
</div>
</div>
- <div class="data-cards">
- <div class="data-card sales">
- <div class="data-title">閿�鍞暟鎹�</div>
- <div class="data-num">
- <div>
- <div class="data-desc">鏈湀閿�鍞/鍏�</div>
- <div class="data-value">{{businessInfo.monthSaleMoney}}</div>
- </div>
- <div>
- <div class="data-desc">鏈紑绁ㄩ噾棰�/鍏�</div>
- <div class="data-value">{{businessInfo.monthSaleHaveMoney}}</div>
- </div>
- </div>
- </div>
- <div class="data-card purchase">
- <div class="data-title">閲囪喘鏁版嵁</div>
- <div class="data-num">
- <div>
- <div class="data-desc">鏈湀閲囪喘棰�/鍏�</div>
- <div class="data-value">{{businessInfo.monthPurchaseMoney}}</div>
- </div>
- <div>
- <div class="data-desc">寰呬粯娆鹃噾棰�/鍏�</div>
- <div class="data-value">{{businessInfo.monthPurchaseHaveMoney}}</div>
- </div>
- </div>
- </div>
+ <div class="top-middle">
<div class="data-card inventory">
<div class="data-title">搴撳瓨鏁版嵁</div>
<div class="data-num">
<div>
<div class="data-desc">褰撳墠搴撳瓨鎬婚噺/浠�</div>
- <div class="data-value">{{businessInfo.inventoryNum}}</div>
+ <div class="data-value">{{ businessInfo.inventoryNum }}</div>
</div>
<div>
<div class="data-desc">浠婃棩鍏ュ簱/浠�</div>
- <div class="data-value">{{businessInfo.todayInventoryNum}}</div>
+ <div class="data-value">{{ businessInfo.todayInventoryNum }}</div>
</div>
</div>
</div>
</div>
- <!-- 鍙筹細寰呭姙浜嬮」 -->
- <div class="todo-panel">
- <div class="section-title">寰呭姙浜嬮」</div>
- <ul class="todo-list" v-if="todoList.length > 0">
- <li v-for="item in todoList" :key="item.id">
- <div style="display: flex;flex-direction: column;justify-content: space-between;width: 100%;gap: 20px">
- <div style="display: flex;justify-content: space-between;align-items: center;">
- <div class="todo-title">寰呭姙缂栧彿锛歿{item.approveId}}</div>
- <div class="todo-division">閮ㄩ棬锛歿{item.approveDeptName}}</div>
- <div class="todo-time">{{item.approveTime}}</div>
+
+ <div class="top-right">
+ <div class="todo-panel">
+ <div class="section-title">寰呭姙浜嬮」</div>
+ <ul class="todo-list" v-if="todoList.length > 0">
+ <li v-for="item in todoList" :key="item.id">
+ <div style="display: flex;flex-direction: column;justify-content: space-between;width: 100%;gap: 20px">
+ <div style="display: flex;justify-content: space-between;align-items: center;">
+ <div class="todo-title">寰呭姙缂栧彿锛歿{ item.approveId }}</div>
+ <div class="todo-division">閮ㄩ棬锛歿{ item.approveDeptName }}</div>
+ <div class="todo-time">{{ item.approveTime }}</div>
+ </div>
+ <div class="todo-division">寰呭姙浜嬬敱锛歿{ item.approveReason }}</div>
</div>
- <div class="todo-division">寰呭姙浜嬬敱锛歿{item.approveReason}}</div>
- </div>
- </li>
- </ul>
- <div v-else style="text-align: center">
- 鏆傛棤鏁版嵁
+ </li>
+ </ul>
+ <div v-else style="text-align: center">
+ 鏆傛棤鏁版嵁
+ </div>
</div>
</div>
</div>
+
+ <!-- 涓儴锛氬伐搴忔暟鎹粺璁� -->
<div class="dashboard-row">
<div class="main-panel process-panel">
<div class="process-panel__header">
<div class="section-title">宸ュ簭鏁版嵁鐢熶骇缁熻鏄庣粏</div>
- <el-radio-group v-model="processRange" size="small" @change="refreshProcessStats">
- <el-radio-button :value="'week'">鎸夊懆</el-radio-button>
- <el-radio-button :value="'month'">鎸夋湀</el-radio-button>
- <el-radio-button :value="'quarter'">鎸夊搴�</el-radio-button>
- </el-radio-group>
+ <div style="display: flex; gap: 10px; align-items: center;">
+ <el-button type="primary" size="small" plain icon="Filter" @click="openProcessDialog">閫夋嫨宸ュ簭</el-button>
+ <el-button type="info" size="small" plain icon="Refresh" @click="resetProcessFilter">閲嶇疆</el-button>
+ <el-radio-group v-model="processRange" size="small" @change="refreshProcessStats">
+ <el-radio-button :value="1">鏃�</el-radio-button>
+ <el-radio-button :value="2">鍛�</el-radio-button>
+ <el-radio-button :value="3">鏈�</el-radio-button>
+ </el-radio-group>
+ </div>
</div>
<div class="process-panel__body">
<div class="process-panel__chart">
- <Echarts
- :chartStyle="{ width: '100%', height: '100%' }"
- :grid="processGrid"
- :series="processSeries"
- :tooltip="processTooltip"
- :xAxis="processXAxis"
- :yAxis="processYAxis"
- style="height: 100%"
- />
+ <Echarts :chartStyle="{ width: '100%', height: '100%' }" :grid="processGrid" :series="processSeries"
+ :tooltip="processTooltip" :xAxis="processXAxis" :yAxis="processYAxis" style="height: 100%"
+ @click="handleChartClick" />
</div>
<div class="process-panel__aside">
@@ -134,107 +109,61 @@
<div class="process-card">
<div class="process-card__label">绱鎬绘姇鍏�</div>
- <div class="process-card__value">{{ formatAmount(processAside.totalInput) }}<span class="unit">涓囧厓</span></div>
+ <div class="process-card__value">{{ formatAmount(processAside.totalInput) }}
+ </div>
</div>
<div class="process-card">
<div class="process-card__label">绱鎬绘姤搴�</div>
- <div class="process-card__value">{{ formatAmount(processAside.totalScrap) }}<span class="unit">涓囧厓</span></div>
+ <div class="process-card__value">{{ formatAmount(processAside.totalScrap) }}
+ </div>
</div>
<div class="process-card">
<div class="process-card__label">绱鎬讳骇鍑�</div>
- <div class="process-card__value">{{ formatAmount(processAside.totalOutput) }}<span class="unit">涓囧厓</span></div>
+ <div class="process-card__value">{{ formatAmount(processAside.totalOutput) }}
+ </div>
</div>
</div>
</div>
</div>
</div>
- <!-- 涓儴妯悜涓ゆ爮 -->
+
+ <!-- 宸ュ簭閫夋嫨寮圭獥 -->
+ <el-dialog v-model="processDialogVisible" title="閫夋嫨宸ュ簭" width="500px" append-to-body>
+ <div class="process-selection-wrapper">
+ <el-checkbox-group v-model="tempProcessIds">
+ <div class="process-grid">
+ <el-checkbox v-for="item in processOptions" :key="item.id" :label="item.id" border>
+ {{ item.name }}
+ </el-checkbox>
+ </div>
+ </el-checkbox-group>
+ </div>
+ <template #footer>
+ <span class="dialog-footer">
+ <el-button @click="processDialogVisible = false">鍙栨秷</el-button>
+ <el-button type="primary" @click="handleProcessDialogConfirm">纭</el-button>
+ </span>
+ </template>
+ </el-dialog>
+
+ <!-- 搴曢儴锛氳川閲忕粺璁� -->
<div class="dashboard-row">
<div class="main-panel">
- <div class="section-title">瀹㈡埛鍚堝悓閲戦鍒嗘瀽</div>
- <div class="contract-summary">
- <div class="contract-info">
- <img src="../assets/images/khtitle.png" alt="" style="width: 42px"/>
- <div class="contract-card">
- <div class="contract-name">鎬诲悎鍚岄噾棰�(鍏�)</div>
- <div class="contract-meta">
- <div class="main-amount">{{sum}}</div>
- <div>鍛ㄥ悓姣�: <span class="up">{{yny}}% </span> 鏃ョ幆姣�: <span class="up">{{chain}}% </span></div>
- </div>
- </div>
- </div>
+ <div style="display: flex;justify-content: space-between;align-items: center;margin-bottom: 10px;">
+ <div class="section-title" style="margin-bottom: 0;">璐ㄩ噺缁熻</div>
+ <el-radio-group v-model="qualityRange" size="small" @change="qualityStatisticsInfo">
+ <el-radio-button :value="1">鍛�</el-radio-button>
+ <el-radio-button :value="2">鏈�</el-radio-button>
+ <el-radio-button :value="3">瀛e害</el-radio-button>
+ </el-radio-group>
</div>
- <div style="display: flex;align-items: center;gap: 20px;justify-content: space-evenly;height: 180px;margin-top: 20px">
- <div>
- <Echarts ref="chart" :legend="pieLegend" :chartStyle="chartStylePie"
- :series="materialPieSeries"
- :tooltip="pieTooltip"></Echarts>
- </div>
- <ul class="contract-list">
- <li v-for="item in materialPieSeries[0].data" :key="item.name">
- <div style="display: flex;align-items: center;justify-content: space-between;width: 100%">
- <div class="line" :style="{color: item.itemStyle.color}">鈼弡{item.name}}</div>
- <div style="width: 70px">{{item.rate}}%</div>
- <div>锟{item.value}}</div>
- </div>
- </li>
- </ul>
+ <div class="quality-cards">
+ <div class="quality-card one">鍘熸潗鏂欏凡妫�娴嬫暟 <span>{{ qualityStatisticsObject.supplierNum }}浠�</span></div>
+ <div class="quality-card two">杩囩▼妫�楠屾暟閲� <span>{{ qualityStatisticsObject.processNum }}浠�</span></div>
+ <div class="quality-card three">鍑哄巶宸叉鏁伴噺 <span>{{ qualityStatisticsObject.factoryNum }}浠�</span></div>
</div>
- </div>
- <div class="main-panel">
- <div style="display: flex;justify-content: space-between;">
- <div class="section-title">搴旀敹搴斾粯缁熻</div>
- <!-- <el-radio-group v-model="radio1" size="large" @change="statisticsReceivable">-->
- <!-- <el-radio-button label="鎸夊懆" :value="1" />-->
- <!-- <el-radio-button label="鎸夋湀" :value="2" />-->
- <!-- <el-radio-button label="鎸夊搴�" :value="3" />-->
- <!-- </el-radio-group>-->
- </div>
- <Echarts ref="chart"
- :color="barColors2"
- :chartStyle="chartStyle"
- :grid="grid"
- :series="barSeries"
- :tooltip="tooltip"
- :xAxis="xAxis"
- :yAxis="yAxis"
- style="height: 260px"></Echarts>
- </div>
- </div>
-
- <!-- 搴曢儴妯悜涓ゆ爮 -->
- <div class="dashboard-row">
- <div class="main-panel">
- <div class="section-title">璐ㄩ噺缁熻</div>
- <div class="quality-cards">
- <div class="quality-card one">鍘熸潗鏂欏凡妫�娴嬫暟 <span>{{qualityStatisticsObject.supplierNum}}浠�</span></div>
- <div class="quality-card two">杩囩▼妫�楠屾暟閲� <span>{{qualityStatisticsObject.processNum}}浠�</span></div>
- <div class="quality-card three">鍑哄巶宸叉鏁伴噺 <span>{{qualityStatisticsObject.factoryNum}}浠�</span></div>
- </div>
- <Echarts ref="chart"
- :chartStyle="chartStyle"
- :grid="grid"
- :legend="barLegend"
- :series="barSeries1"
- :tooltip="tooltip"
- :xAxis="xAxis1"
- :yAxis="yAxis1"
- style="height: 260px"></Echarts>
- </div>
-
- <div class="main-panel">
- <div class="section-title">鍥炴涓庡紑绁ㄥ垎鏋�</div>
- <Echarts
- ref="invoiceChart"
- :chartStyle="chartStyle"
- :grid="grid"
- :legend="lineLegend"
- :series="lineSeries"
- :tooltip="tooltipLine"
- :xAxis="xAxis2"
- :yAxis="yAxis2"
- style="height: 270px;"
- />
+ <Echarts ref="chart" :chartStyle="chartStyle" :grid="grid" :legend="barLegend" :series="barSeries1"
+ :tooltip="tooltip" :xAxis="xAxis1" :yAxis="yAxis1" style="height: 260px"></Echarts>
</div>
</div>
</div>
@@ -249,11 +178,20 @@
analysisCustomerContractAmounts, getAmountHalfYear,
getBusiness,
homeTodos,
- qualityStatistics,
- statisticsReceivablePayable
+ processDataProductionStatistics,
+ statisticsReceivablePayable,
+ qualityInspectionStatistics
} from "@/api/viewIndex.js";
+import { list } from '@/api/productionManagement/productionProcess';
+
const userStore = useUserStore()
+
+const processOptions = ref([])
+const selectedProcessIds = ref([])
+const tempProcessIds = ref([])
+const processDialogVisible = ref(false)
+const activeProcessIndex = ref(0)
const businessInfo = ref({
inventoryNum: 0,
@@ -354,7 +292,7 @@
}])
const yAxis = [{
type: 'category',
- data: [ '搴斾粯璐︽', '搴旀敹璐︽',]
+ data: ['搴斾粯璐︽', '搴旀敹璐︽',]
}]
const yAxis1 = [{
type: 'value'
@@ -407,7 +345,7 @@
data: [],
axisLabel: {
interval: 0,
- formatter: function(value) {
+ formatter: function (value) {
return value.replace(/~/g, '\n');
},
}
@@ -417,6 +355,7 @@
// 寰呭姙浜嬮」
const todoList = ref([])
const radio1 = ref(1)
+const qualityRange = ref(1)
// 鍥捐〃寮曠敤
const barChart = ref(null)
@@ -435,11 +374,12 @@
statisticsReceivable()
qualityStatisticsInfo()
getAmountHalfYearNum()
+ getProcessList()
})
// 鏁版嵁缁熻
const getBusinessData = () => {
getBusiness().then((res) => {
- businessInfo.value = {...res.data}
+ businessInfo.value = { ...res.data }
})
}
// 鍚堝悓閲戦
@@ -461,9 +401,38 @@
todoList.value = res.data
})
}
+// 鑾峰彇宸ュ簭鍒楄〃
+const getProcessList = () => {
+ list().then(res => {
+ processOptions.value = res.data
+ })
+}
+
+const openProcessDialog = () => {
+ tempProcessIds.value = [...selectedProcessIds.value]
+ processDialogVisible.value = true
+}
+
+const handleProcessDialogConfirm = () => {
+ selectedProcessIds.value = [...tempProcessIds.value]
+ processDialogVisible.value = false
+ refreshProcessStats()
+}
+
+const resetProcessFilter = () => {
+ selectedProcessIds.value = []
+ tempProcessIds.value = []
+ refreshProcessStats()
+}
+
+const handleChartClick = (params) => {
+ if (params && params.dataIndex !== undefined) {
+ activeProcessIndex.value = params.dataIndex
+ }
+}
// 搴斾粯搴旀敹缁熻
const statisticsReceivable = () => {
- statisticsReceivablePayable({type: radio1.value}).then((res) => {
+ statisticsReceivablePayable({ type: radio1.value }).then((res) => {
barSeries.value[0].data = [
// { value: res.data.prepayMoney, itemStyle: { color: barColors2[0] } },
{ value: res.data.payableMoney, itemStyle: { color: barColors2[0] } },
@@ -474,7 +443,11 @@
}
// 璐ㄦ缁熻
const qualityStatisticsInfo = () => {
- qualityStatistics().then((res) => {
+ qualityInspectionStatistics({ type: qualityRange.value }).then((res) => {
+ xAxis1.value[0].data = []
+ barSeries1.value[0].data = []
+ barSeries1.value[1].data = []
+ barSeries1.value[2].data = []
res.data.item.forEach(item => {
xAxis1.value[0].data.push(item.date)
barSeries1.value[0].data.push(item.supplierNum)
@@ -504,7 +477,7 @@
{
name: '寮�绁�',
type: 'line',
- data: receiptAmount,
+ data: invoiceAmount,
stack: 'Total',
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
@@ -533,7 +506,7 @@
{
name: '鍥炴',
type: 'line',
- data: invoiceAmount,
+ data: receiptAmount,
stack: 'Total',
lineStyle: {
width: 0
@@ -563,7 +536,7 @@
}
// 宸ュ簭鏁版嵁鐢熶骇缁熻鏄庣粏锛堝亣鏁版嵁 + 鍥捐〃锛�
-const processRange = ref('week')
+const processRange = ref(1)
const processChartData = ref([])
const processXAxis = ref([
@@ -593,11 +566,11 @@
const name = params?.[0]?.name ?? ''
const list = Array.isArray(params) ? params : []
const lines = list
- .map((p) => {
- const colorBox = `<span style="display:inline-block;margin-right:6px;border-radius:2px;width:10px;height:10px;background:${p.color}"></span>`
- return `${colorBox}${p.seriesName} <b style="float:right;">${Number(p.value || 0).toFixed(2)}</b>`
- })
- .join('<br/>')
+ .map((p) => {
+ const colorBox = `<span style="display:inline-block;margin-right:6px;border-radius:2px;width:10px;height:10px;background:${p.color}"></span>`
+ return `${colorBox}${p.seriesName} <b style="float:right;">${Number(p.value || 0).toFixed(2)}</b>`
+ })
+ .join('<br/>')
return `<div style="min-width:140px;"><div style="font-weight:700;margin-bottom:6px;">${name}</div>${lines}</div>`
},
})
@@ -637,14 +610,12 @@
const processAside = computed(() => {
const list = processChartData.value
- const totalInput = list.reduce((s, i) => s + Number(i.input || 0), 0)
- const totalScrap = list.reduce((s, i) => s + Number(i.scrap || 0), 0)
- const totalOutput = list.reduce((s, i) => s + Number(i.output || 0), 0)
+ const item = list[activeProcessIndex.value] || {}
return {
- processName: '宸ュ簭鍚嶇О',
- totalInput,
- totalScrap,
- totalOutput,
+ processName: item.name || '鏆傛棤鏁版嵁',
+ totalInput: item.input || 0,
+ totalScrap: item.scrap || 0,
+ totalOutput: item.output || 0,
}
})
@@ -653,27 +624,20 @@
return num.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 })
}
-const buildProcessFake = (range) => {
- // 璁╀笉鍚屽垏鎹㈡湁鐐瑰樊寮�
- const factor = range === 'week' ? 1 : range === 'month' ? 1.4 : 1.9
- const baseNames = ['宸ュ簭1', '宸ュ簭2', '宸ュ簭3', '宸ュ簭4', '宸ュ簭5', '宸ュ簭6', '宸ュ簭7']
- return baseNames.map((name, idx) => {
- const seed = (idx + 1) * 120 * factor
- const input = seed + (idx % 2 === 0 ? 80 : 40)
- const scrap = Math.max(20, seed * 0.15)
- const output = Math.max(30, seed * 0.35)
- return {
- name,
- input: Number(input.toFixed(2)),
- scrap: Number(scrap.toFixed(2)),
- output: Number(output.toFixed(2)),
- }
- })
-}
-
const refreshProcessStats = () => {
- processChartData.value = buildProcessFake(processRange.value)
- processYAxis.value[0].data = processChartData.value.map((i) => i.name)
+ processDataProductionStatistics({
+ type: processRange.value,
+ processIds: selectedProcessIds.value.length > 0 ? selectedProcessIds.value.join(',') : null
+ }).then(res => {
+ processChartData.value = res.data.map(item => ({
+ name: item.processName,
+ input: item.totalInput,
+ scrap: item.totalScrap,
+ output: item.totalOutput
+ }))
+ processYAxis.value[0].data = processChartData.value.map((i) => i.name)
+ activeProcessIndex.value = 0
+ })
}
onMounted(() => {
@@ -694,74 +658,13 @@
padding: 20px;
box-sizing: border-box;
}
+
.dashboard-top {
display: flex;
gap: 20px;
margin-bottom: 20px;
align-items: stretch;
- justify-content: flex-start;
- flex-wrap: nowrap;
-}
-
-.top-left {
- display: flex;
- flex-direction: column;
- gap: 20px;
- height: 180px;
- flex: 0 0 320px;
- min-width: 280px;
-}
-
-.data-cards {
- flex: 1 1 auto;
- min-width: 0;
- display: flex;
- gap: 16px;
- justify-content: flex-start;
- background: #ffffff;
- border-radius: 12px;
- padding: 20px;
- overflow: hidden;
-}
-
-.todo-panel {
- background: #fff;
- border-radius: 12px;
- padding: 20px;
- height: 180px;
- flex: 0 0 360px;
- min-width: 320px;
-}
-
-.welcome-banner {
- padding: 12px 14px;
- background: linear-gradient(135deg, rgba(229, 240, 255, 0.95), rgba(214, 232, 255, 0.75), rgba(207, 236, 255, 0.95));
- display: flex;
- align-items: flex-start;
justify-content: space-between;
- gap: 4px;
- flex-direction: column;
-}
-
-.welcome-title {
- flex: 1 1 auto;
- min-width: 0;
- font-size: 12px;
- font-weight: bolder;
- color: #222;
- line-height: 1.3;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
-}
-
-.welcome-time {
- flex: 0 0 auto;
- margin-top: 0;
- font-size: 8px;
- font-weight: bold;
- color: rgba(0, 0, 0, 0.55);
- white-space: nowrap;
}
.company-info {
@@ -770,6 +673,29 @@
border-radius: 12px;
background: #fff;
height: 100%;
+ width: 100%;
+}
+
+.welcome-banner {
+ padding: 10px 10px;
+ background: linear-gradient(135deg, rgba(229, 240, 255, 0.9), rgba(214, 232, 255, 0.7), rgba(207, 236, 255, 0.9));
+}
+
+.welcome-title {
+ font-size: 18px;
+ font-weight: 700;
+ color: #222;
+ line-height: 1.3;
+}
+
+.welcome-user {
+ margin-right: 6px;
+}
+
+.welcome-time {
+ margin-top: 10px;
+ font-size: 16px;
+ color: rgba(0, 0, 0, 0.55);
}
.user-card {
@@ -777,6 +703,7 @@
align-items: center;
gap: 10px;
padding: 18px 22px;
+ width: 100%;
}
.user-card-main {
@@ -825,25 +752,27 @@
object-fit: cover;
flex: 0 0 auto;
}
-.data-cards {
- display: flex;
- gap: 16px;
- justify-content: flex-start;
- background: #ffffff;
- border-radius: 12px;
- padding: 20px;
-}
+
.data-title {
font-weight: 700;
font-size: 26px;
color: #FFFFFF;
+ text-align: center;
+ margin-top: 20px;
}
+
.data-num {
display: flex;
align-items: center;
- justify-content: space-between;
- margin-top: 20px;
+ justify-content: center;
+ margin-top: 36px;
+ gap: 60px;
}
+
+.data-num > div {
+ text-align: center;
+}
+
.data-card {
background: #fff;
border-radius: 12px;
@@ -852,62 +781,67 @@
box-shadow: 0 2px 8px #eee;
display: flex;
flex-direction: column;
- width: 32%;
- height: 140px;
+ width: 100%;
+ height: 100%;
}
+
.data-card.sales {
background-image: url("../assets/images/xioashoushuju.png");
background-size: cover;
background-position: center;
background-repeat: no-repeat;
}
+
.data-card.purchase {
background-image: url("../assets/images/caigou.png");
background-size: cover;
background-position: center;
background-repeat: no-repeat;
}
+
.data-card.inventory {
background-image: url("../assets/images/kucun.png");
background-size: cover;
background-position: center;
background-repeat: no-repeat;
}
+
.data-desc {
font-weight: 500;
- font-size: 13px;
+ font-size: 16px;
color: #FFFFFF;
}
+
.data-value {
- font-size: 18px;
- font-weight: 500;
- margin: 10px 0;
+ font-size: 26px;
+ font-weight: 600;
+ margin: 12px 0 0;
color: #FFFFFF;
}
-.top-left {
+
+.top-left,
+.top-middle,
+.top-right {
+ flex: 1;
display: flex;
- flex-direction: column;
- gap: 20px;
- height: 180px;
- flex: 0 0 320px;
- min-width: 280px;
}
+
.todo-panel {
background: #fff;
border-radius: 12px;
padding: 20px;
- height: 180px;
- flex: 0 0 360px;
- min-width: 320px;
+ width: 100%;
}
+
.todo-list {
- height: 100px;
list-style: none;
padding: 0;
margin: 0;
font-size: 15px;
+ max-height: 120px;
overflow-y: auto;
}
+
.todo-list li {
border-radius: 8px;
margin-bottom: 12px;
@@ -916,44 +850,58 @@
display: flex;
justify-content: space-between;
align-items: center;
- background: rgba(225,227,250,0.62);
+ background: rgba(225, 227, 250, 0.62);
}
+
.todo-title {
font-weight: 400;
font-size: 12px;
color: #000000;
position: relative;
}
+
.todo-title::before {
- content: ''; /* 蹇呴渶锛岃〃绀鸿繖閲屾湁涓�涓唴瀹� */
+ content: '';
+ /* 蹇呴渶锛岃〃绀鸿繖閲屾湁涓�涓唴瀹� */
position: absolute;
- left: -10px; /* 瀹氫綅鍒板乏渚� */
- top: 50%; /* 鍨傜洿灞呬腑 */
- transform: translateY(-50%); /* 寰皟鍨傜洿灞呬腑 */
- width: 6px; /* 鍦嗙殑鐩村緞 */
- height: 6px; /* 鍦嗙殑鐩村緞 */
+ left: -10px;
+ /* 瀹氫綅鍒板乏渚� */
+ top: 50%;
+ /* 鍨傜洿灞呬腑 */
+ transform: translateY(-50%);
+ /* 寰皟鍨傜洿灞呬腑 */
+ width: 6px;
+ /* 鍦嗙殑鐩村緞 */
+ height: 6px;
+ /* 鍦嗙殑鐩村緞 */
background: #498CEB;
- border-radius: 50%; /* 璁╁叾鍙樻垚鍦嗗舰 */
+ border-radius: 50%;
+ /* 璁╁叾鍙樻垚鍦嗗舰 */
}
+
.todo-division {
font-weight: 400;
font-size: 12px;
color: #000000;
}
+
.todo-time {
font-weight: 400;
font-size: 12px;
color: #000000;
}
+
.todo-meta {
color: #888;
font-size: 13px;
}
+
.dashboard-row {
display: flex;
gap: 20px;
margin-bottom: 20px;
}
+
.main-panel {
background: #fff;
border-radius: 12px;
@@ -963,6 +911,7 @@
display: flex;
flex-direction: column;
}
+
.section-title {
position: relative;
font-size: 18px;
@@ -982,42 +931,52 @@
background-color: #002FA7;
border-radius: 2px;
}
+
.contract-info {
display: flex;
align-items: center;
gap: 20px;
height: 90px;
- background: rgba(245,245,245,0.59);
+ background: rgba(245, 245, 245, 0.59);
width: 100%;
border-radius: 10px;
padding: 10px 30px;
}
+
.contract-summary {
display: flex;
align-items: center;
gap: 30px;
}
+
.contract-card {
display: flex;
flex-direction: column;
gap: 10px;
}
+
.contract-name {
font-weight: 400;
font-size: 14px;
color: #050505;
}
+
.contract-meta {
display: flex;
align-items: center;
width: 100%;
gap: 80px;
}
+
.main-amount {
font-size: 24px;
- color: rgba(51,50,50,0.85);
+ color: rgba(51, 50, 50, 0.85);
}
-.up { color: #e57373; }
+
+.up {
+ color: #e57373;
+}
+
.contract-list {
margin-top: 16px;
font-size: 14px;
@@ -1028,10 +987,12 @@
overflow-y: auto;
width: 460px;
}
+
.line {
position: relative;
width: 230px;
}
+
.line::after {
content: '';
position: absolute;
@@ -1042,46 +1003,55 @@
background-color: #C9C5C5;
border-radius: 2px;
}
+
.contract-list li {
margin-top: 10px;
}
+
.quality-cards {
display: flex;
gap: 12px;
margin-bottom: 12px;
}
+
.quality-card {
border-radius: 8px;
padding: 15px 10px 10px 50px;
font-weight: 400;
font-size: 12px;
- color: rgba(0,0,0,0.67);
+ color: rgba(0, 0, 0, 0.67);
width: 236px;
height: 49px;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
}
+
.quality-card.one {
background-image: url("../assets/images/yuancailiao.png");
}
+
.quality-card.two {
background-image: url("../assets/images/guocheng.png");
}
+
.quality-card.three {
background-image: url("../assets/images/chuchang.png");
}
+
.quality-card span {
color: #4fc3f7;
font-weight: bold;
margin-left: 6px;
}
+
.chart {
width: 100%;
height: 220px;
margin-top: 10px;
}
+
.process-panel {
padding-bottom: 10px;
}
@@ -1183,76 +1153,33 @@
.process-panel__body {
flex-direction: column;
}
+
.process-panel__aside {
width: 100%;
flex-direction: row;
flex-wrap: wrap;
}
+
.process-card {
flex: 1;
min-width: 220px;
}
}
-@media (max-width: 1280px) {
- .dashboard-top {
- flex-wrap: wrap;
- }
-
- .top-left {
- flex: 1 1 320px;
- }
-
- .data-cards {
- flex: 1 1 560px;
- }
-
- .todo-panel {
- flex: 1 1 320px;
- min-width: 280px;
- height: auto;
- }
+.process-selection-wrapper {
+ max-height: 400px;
+ overflow-y: auto;
+ padding: 10px;
}
-@media (max-width: 768px) {
- .dashboard {
- padding: 12px;
- }
+.process-grid {
+ display: grid;
+ grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
+ gap: 12px;
+}
- .dashboard-top {
- flex-direction: column;
- align-items: stretch;
- }
-
- .top-left,
- .data-cards,
- .todo-panel {
- width: 100%;
- flex: 1 1 auto;
- min-width: 0;
- }
-
- .top-left {
- height: auto;
- }
-
- .data-cards {
- flex-wrap: wrap;
- }
-
- .data-card {
- width: calc(50% - 8px);
- min-width: 160px;
- }
-
- .welcome-banner {
- flex-direction: column;
- align-items: flex-start;
-
- }
-
- .welcome-title {
- white-space: normal;
- }
+:deep(.el-checkbox.is-bordered) {
+ margin-left: 0 !important;
+ width: 100%;
}
</style>
\ No newline at end of file
diff --git a/src/views/inventoryManagement/stockManagement/Qualified.vue b/src/views/inventoryManagement/stockManagement/Qualified.vue
index d463b5e..0b79b00 100644
--- a/src/views/inventoryManagement/stockManagement/Qualified.vue
+++ b/src/views/inventoryManagement/stockManagement/Qualified.vue
@@ -35,7 +35,7 @@
<el-table-column label="鏈�杩戞洿鏂版椂闂�" prop="updateTime" show-overflow-tooltip />
<el-table-column fixed="right" label="鎿嶄綔" min-width="60" align="center">
<template #default="scope">
- <el-button link type="primary" size="small" @click="showSubtractModal(scope.row)" :disabled="scope.row.unLockedQuantity === 0">棰嗙敤</el-button>
+ <el-button link type="primary" size="small" @click="showSubtractModal(scope.row)" :disabled="scope.row.unLockedQuantity === 0">鍑哄簱</el-button>
<el-button link type="primary" size="small" v-if="scope.row.unLockedQuantity > 0" @click="showFrozenModal(scope.row)">鍐荤粨</el-button>
<el-button link type="primary" size="small" v-if="scope.row.lockedQuantity > 0" @click="showThawModal(scope.row)">瑙e喕</el-button>
</template>
diff --git a/src/views/productionManagement/workOrder/index.vue b/src/views/productionManagement/workOrder/index.vue
index e07d605..621501c 100644
--- a/src/views/productionManagement/workOrder/index.vue
+++ b/src/views/productionManagement/workOrder/index.vue
@@ -24,10 +24,12 @@
:page="page"
:tableLoading="tableLoading"
@pagination="pagination">
- <template #completionStatus="{ row }">
- <el-progress :percentage="toProgressPercentage(row?.completionStatus)" :color="progressColor(toProgressPercentage(row?.completionStatus))" :status="toProgressPercentage(row?.completionStatus) >= 100 ? 'success' : ''" />
- </template>
- </PIMTable>
+ <template #completionStatus="{ row }">
+ <el-progress :percentage="toProgressPercentage(row?.completionStatus)"
+ :color="progressColor(toProgressPercentage(row?.completionStatus))"
+ :status="toProgressPercentage(row?.completionStatus) >= 100 ? 'success' : ''" />
+ </template>
+ </PIMTable>
</div>
<el-dialog v-model="editDialogVisible"
title="缂栬緫鏃堕棿"
@@ -104,7 +106,6 @@
transferCardRowData.status
}}</span>
</div> -->
-
<div class="info-item">
<span class="info-label">璁″垝寮�濮嬫椂闂�</span>
<span class="info-value">{{ transferCardRowData.planStartTime }}</span>
@@ -196,7 +197,7 @@
@change="handleUserChange">
<el-option v-for="user in userOptions"
:key="user.userId"
- :label="user.userName"
+ :label="user.nickName"
:value="user.userId" />
</el-select>
</el-form-item>
@@ -425,7 +426,9 @@
// 鍒涘缓 Blob URL
const fileBlob =
- blob instanceof Blob ? blob : new Blob([blob], { type: blob.type || "application/octet-stream" });
+ blob instanceof Blob
+ ? blob
+ : new Blob([blob], { type: blob.type || "application/octet-stream" });
const url = window.URL.createObjectURL(fileBlob);
// 鍒涘缓闅愯棌 iframe锛岀敤浜庤Е鍙戞祻瑙堝櫒鎵撳嵃
@@ -500,7 +503,7 @@
.then(res => {
if (res.code === 200) {
reportForm.userId = res.data.userId;
- reportForm.userName = res.data.userName;
+ reportForm.userName = res.data.nickName;
}
})
.catch(err => {
@@ -561,11 +564,11 @@
};
// 鐢ㄦ埛閫夋嫨鍙樺寲鏃舵洿鏂� userName
- const handleUserChange = (userId) => {
+ const handleUserChange = userId => {
if (userId) {
const selectedUser = userOptions.value.find(user => user.userId === userId);
if (selectedUser) {
- reportForm.userName = selectedUser.userName;
+ reportForm.userName = selectedUser.nickName;
}
} else {
reportForm.userName = "";
--
Gitblit v1.9.3