From e08ecce83feab5d2aee0772a1c12b27fbabe369b Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期四, 05 二月 2026 09:12:14 +0800
Subject: [PATCH] Merge branch 'dev_New' of http://114.132.189.42:9002/r/product-inventory-management into dev_天津军泰伟业
---
src/api/basicData/enum.js | 28 +
src/views/salesManagement/receiptPayment/index.vue | 2
src/views/basicData/product/index.vue | 54 ++
src/api/productionManagement/productionOrder.js | 16
src/views/qualityManagement/rawMaterialInspection/index.vue | 5
src/views/salesManagement/salesLedger/index.vue | 8
src/views/salesManagement/salesQuotation/index.vue | 93 +++-
src/views/qualityManagement/finalInspection/index.vue | 5
src/views/qualityManagement/processInspection/index.vue | 5
src/views/collaborativeApproval/sealManagement/index.vue | 491 --------------------------
src/views/inventoryManagement/dispatchLog/Record.vue | 8
src/views/reportAnalysis/productionAnalysis/components/right-top.vue | 49 +-
src/views/procurementManagement/procurementLedger/index.vue | 10
src/views/productionManagement/productionOrder/New.vue | 192 ++++++++++
src/api/viewIndex.js | 9
src/views/productionManagement/productionOrder/index.vue | 44 ++
src/views/inventoryManagement/stockReport/index.vue | 10
src/views/inventoryManagement/receiptManagement/Record.vue | 7
src/views/safeProduction/dangerInvestigation/index.vue | 10
19 files changed, 465 insertions(+), 581 deletions(-)
diff --git a/src/api/basicData/enum.js b/src/api/basicData/enum.js
index 0d35692..350df17 100644
--- a/src/api/basicData/enum.js
+++ b/src/api/basicData/enum.js
@@ -7,17 +7,35 @@
})
}
-
-export function findAllQualifiedStockRecordTypeOptions() {
+// 鍚堟牸鍏ュ簱鏉ユ簮绫诲瀷
+export function findAllQualifiedStockInRecordTypeOptions() {
return request({
- url: '/basic/enum/StockQualifiedRecordTypeEnum',
+ url: '/basic/enum/StockInQualifiedRecordTypeEnum',
method: 'get'
})
}
-export function findAllUnqualifiedStockRecordTypeOptions() {
+// 涓嶅悎鏍煎叆搴撴潵婧愮被鍨�
+export function findAllUnQualifiedStockInRecordTypeOptions() {
return request({
- url: '/basic/enum/StockUnQualifiedRecordTypeEnum',
+ url: '/basic/enum/StockInUnQualifiedRecordTypeEnum',
method: 'get'
})
}
+
+// 鍚堟牸鍑哄簱鏉ユ簮绫诲瀷
+export function findAllQualifiedStockOutRecordTypeOptions() {
+ return request({
+ url: '/basic/enum/StockOutQualifiedRecordTypeEnum',
+ method: 'get'
+ })
+}
+
+// 涓嶅悎鏍煎嚭搴撴潵婧愮被鍨�
+export function findAllUnQualifiedStockOutRecordTypeOptions() {
+ return request({
+ url: '/basic/enum/StockOutUnQualifiedRecordTypeEnum',
+ method: 'get'
+ })
+}
+
diff --git a/src/api/productionManagement/productionOrder.js b/src/api/productionManagement/productionOrder.js
index 9f110a7..6c8dbe2 100644
--- a/src/api/productionManagement/productionOrder.js
+++ b/src/api/productionManagement/productionOrder.js
@@ -36,6 +36,22 @@
});
}
+// 鐢熶骇璁㈠崟-鏂板
+export function addProductOrder(data) {
+ return request({
+ url: "/productOrder/addProductOrder",
+ method: "post",
+ data: data,
+ });
+}
+
+export function delProductOrder(ids) {
+ return request({
+ url: `/productOrder/${ids}`,
+ method: "delete",
+ });
+}
+
// 鐢熶骇璁㈠崟-鏌ヨ浜у搧缁撴瀯鍒楄〃
export function listProcessBom(query) {
return request({
diff --git a/src/api/viewIndex.js b/src/api/viewIndex.js
index 1ec8c49..980e4b0 100644
--- a/src/api/viewIndex.js
+++ b/src/api/viewIndex.js
@@ -1,6 +1,15 @@
// 棣栭〉鎺ュ彛
import request from "@/utils/request";
+// 宸ュ崟鎵ц鏁堢巼鍒嗘瀽
+export const workOrderEfficiencyAnalysis = (query) => {
+ return request({
+ url: "/home/workOrderEfficiencyAnalysis",
+ method: "get",
+ params: query,
+ });
+};
+
// 鍘熸潗鏂欐娴�
export const rawMaterialDetection = (query) => {
return request({
diff --git a/src/views/basicData/product/index.vue b/src/views/basicData/product/index.vue
index 3f0921a..c9058aa 100644
--- a/src/views/basicData/product/index.vue
+++ b/src/views/basicData/product/index.vue
@@ -30,11 +30,8 @@
:props="{ children: 'children', label: 'label' }"
highlight-current
node-key="id"
- style="
- height: calc(100vh - 190px);
- overflow-y: scroll;
- scrollbar-width: none;
- "
+ class="product-tree-scroll"
+ style="height: calc(100vh - 190px); overflow-y: auto"
>
<template #default="{ node, data }">
<div class="custom-tree-node">
@@ -43,7 +40,7 @@
<component :is="data.children && data.children.length > 0
? node.expanded ? 'FolderOpened' : 'Folder' : 'Tickets'" />
</el-icon>
- {{ data.label }}
+ <span class="tree-node-label">{{ data.label }}</span>
</span>
<div>
<el-button
@@ -111,6 +108,8 @@
<el-input
v-model="form.productName"
placeholder="璇疯緭鍏ヤ骇鍝佸悕绉�"
+ maxlength="20"
+ show-word-limit
clearable
@keydown.enter.prevent
/>
@@ -239,7 +238,10 @@
productName: "",
},
rules: {
- productName: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
+ productName: [
+ { required: true, message: "璇疯緭鍏�", trigger: "blur" },
+ { max: 20, message: "浜у搧鍚嶇О涓嶈兘瓒呰繃20涓瓧绗�", trigger: "blur" },
+ ],
},
modelForm: {
model: "",
@@ -467,18 +469,21 @@
display: flex;
}
.left {
- width: 380px;
+ width: 450px;
+ min-width: 450px;
padding: 16px;
background: #ffffff;
}
.right {
- width: calc(100% - 380px);
+ flex: 1;
+ min-width: 0;
padding: 16px;
margin-left: 20px;
background: #ffffff;
}
.custom-tree-node {
flex: 1;
+ min-width: 0;
display: flex;
align-items: center;
justify-content: space-between;
@@ -486,13 +491,42 @@
padding-right: 8px;
}
.tree-node-content {
+ flex: 1;
+ min-width: 0;
display: flex;
- align-items: center; /* 鍨傜洿灞呬腑 */
+ align-items: center;
height: 100%;
+ overflow: hidden;
+}
+.tree-node-content .orange-icon {
+ flex-shrink: 0;
+}
+.tree-node-label {
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
}
.orange-icon {
color: orange;
font-size: 18px;
margin-right: 8px; /* 鍥炬爣涓庢枃瀛椾箣闂村姞鐐归棿璺� */
}
+.product-tree-scroll {
+ scrollbar-width: thin;
+ scrollbar-color: #c0c4cc #f5f7fa;
+}
+.product-tree-scroll::-webkit-scrollbar {
+ width: 8px;
+}
+.product-tree-scroll::-webkit-scrollbar-track {
+ background: #f5f7fa;
+ border-radius: 4px;
+}
+.product-tree-scroll::-webkit-scrollbar-thumb {
+ background: #c0c4cc;
+ border-radius: 4px;
+}
+.product-tree-scroll::-webkit-scrollbar-thumb:hover {
+ background: #909399;
+}
</style>
diff --git a/src/views/collaborativeApproval/sealManagement/index.vue b/src/views/collaborativeApproval/sealManagement/index.vue
index b4a1886..c0d13f2 100644
--- a/src/views/collaborativeApproval/sealManagement/index.vue
+++ b/src/views/collaborativeApproval/sealManagement/index.vue
@@ -95,55 +95,6 @@
</el-form>
</FormDialog>
- <!-- 瑙勭珷鍒跺害鍙戝竷瀵硅瘽妗� -->
- <!-- <el-dialog v-model="showRegulationDialog" :title="operationType === 'add' ? '鍙戝竷鍒跺害' : '缂栬緫鍒跺害'" width="800px">
- <el-form :model="regulationForm" :rules="regulationRules" ref="regulationFormRef" label-width="100px">
- <el-form-item label="鍒跺害缂栧彿" prop="regulationNum">
- <el-input v-model="regulationForm.regulationNum" placeholder="璇疯緭鍏ュ埗搴︾紪鍙�" />
- </el-form-item>
- <el-form-item label="鍒跺害鏍囬" prop="title">
- <el-input v-model="regulationForm.title" placeholder="璇疯緭鍏ュ埗搴︽爣棰�" />
- </el-form-item>
- <el-form-item label="鍒跺害鍒嗙被" prop="category">
- <el-select v-model="regulationForm.category" placeholder="璇烽�夋嫨鍒跺害鍒嗙被" style="width: 100%">
- <el-option label="浜轰簨鍒跺害" value="hr" />
- <el-option label="璐㈠姟鍒跺害" value="finance" />
- <el-option label="瀹夊叏鍒跺害" value="safety" />
- <el-option label="鎶�鏈埗搴�" value="tech" />
- </el-select>
- </el-form-item>
- <el-form-item label="鍒跺害鍐呭" prop="content">
- <el-input v-model="regulationForm.content" type="textarea" :rows="10" placeholder="璇疯緭鍏ュ埗搴﹁缁嗗唴瀹�" />
- </el-form-item>
- <el-form-item label="鍒跺害鐗堟湰" prop="version">
- <el-input v-model="regulationForm.version" placeholder="璇疯緭鍏ュ埗搴︾増鏈�" />
- </el-form-item>
- <el-form-item label="鐢熸晥鏃堕棿" prop="effectiveTime">
- <el-date-picker v-model="regulationForm.effectiveTime" type="datetime" format="YYYY-MM-DD HH:mm:ss"
- value-format="YYYY-MM-DD HH:mm:ss" placeholder="閫夋嫨鐢熸晥鏃堕棿" style="width: 100%" />
- </el-form-item>
- <el-form-item label="閫傜敤鑼冨洿" prop="scope">
- <el-checkbox-group v-model="regulationForm.scope">
- <el-checkbox label="all">鍏ㄤ綋鍛樺伐</el-checkbox>
- <el-checkbox label="manager">绠$悊灞�</el-checkbox>
- <el-checkbox label="hr">浜轰簨閮ㄩ棬</el-checkbox>
- <el-checkbox label="finance">璐㈠姟閮ㄩ棬</el-checkbox>
- <el-checkbox label="tech">鎶�鏈儴闂�</el-checkbox>
- </el-checkbox-group>
- </el-form-item>
- <el-form-item label="鏄惁闇�瑕佺‘璁�" prop="requireConfirm">
- <el-switch v-model="regulationForm.requireConfirm" />
- <span class="ml-10">寮�鍚悗鍛樺伐闇�瑕侀槄璇荤‘璁�</span>
- </el-form-item>
- </el-form>
- <template #footer>
- <span class="dialog-footer">
- <el-button @click="showRegulationDialog = false">鍙栨秷</el-button>
- <el-button type="primary" @click="submitRegulation">鍙戝竷鍒跺害</el-button>
- </span>
- </template>
- </el-dialog> -->
-
<!-- 鐢ㄥ嵃璇︽儏瀵硅瘽妗� -->
<FormDialog
v-model="showSealDetailDialog"
@@ -171,81 +122,6 @@
</div>
</FormDialog>
- <!-- 瑙勭珷鍒跺害璇︽儏瀵硅瘽妗� -->
- <FormDialog
- v-model="showRegulationDetailDialog"
- title="瑙勭珷鍒跺害璇︽儏"
- :width="'800px'"
- @close="closeRegulationDetailDialog"
- @confirm="handleRegulationDetailConfirm"
- @cancel="closeRegulationDetailDialog"
- >
- <div v-if="currentRegulationDetail">
- <el-descriptions :column="2" border>
- <el-descriptions-item label="鍒跺害缂栧彿">{{ currentRegulationDetail.id }}</el-descriptions-item>
- <el-descriptions-item label="鍒跺害鏍囬">{{ currentRegulationDetail.title }}</el-descriptions-item>
- <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>
- <div class="mt-20">
- <h4>鍒跺害鍐呭</h4>
- <div class="regulation-content">{{ currentRegulationDetail.content }}</div>
- </div>
- <!-- 濡傛灉tableData>0 鏄剧ず -->
- <div style="margin: 10px 0;" v-if="tableData && tableData.length > 0" >
- <el-button type="success" @click="resetForm(currentRegulationDetail)">纭鏌ョ湅</el-button>
- </div>
- </div>
- </FormDialog>
-
- <!-- 鐗堟湰鍘嗗彶瀵硅瘽妗� -->
- <FormDialog
- v-model="showVersionHistoryDialog"
- title="鐗堟湰鍘嗗彶"
- :width="'800px'"
- @close="closeVersionHistoryDialog"
- @confirm="closeVersionHistoryDialog"
- @cancel="closeVersionHistoryDialog"
- >
- <el-table :data="versionHistory" style="width: 100%;margin-bottom: 10px">
- <el-table-column prop="version" label="鐗堟湰鍙�" width="100" />
- <el-table-column prop="updateTime" label="鏇存柊鏃堕棿" width="180" />
- <el-table-column prop="createUserName" label="鏇存柊浜�" width="120" />
- <el-table-column prop="changeLog" label="鍙樻洿璇存槑">
- <template #default="scope">
- <el-tag :type="scope.row.status === 'active' ? 'success' : 'info'">
- {{ scope.row.status === 'active' ? '鐢熸晥涓�' : '宸插簾姝�' }}
- </el-tag>
- </template>
- </el-table-column>
- </el-table>
- </FormDialog>
-
- <!-- 闃呰鐘舵�佸璇濇 -->
- <FormDialog
- v-model="showReadStatusDialog"
- title="闃呰鐘舵��"
- :width="'800px'"
- @close="closeReadStatusDialog"
- @confirm="closeReadStatusDialog"
- @cancel="closeReadStatusDialog"
- >
- <el-table :data="readStatusList" style="width: 100%;margin-bottom: 10px">
- <el-table-column prop="employee" label="鍛樺伐濮撳悕" width="120" />
- <el-table-column prop="department" label="鎵�灞為儴闂�" width="150" />
- <el-table-column prop="createTime" label="闃呰鏃堕棿" width="180" />
- <el-table-column prop="confirmTime" label="纭鏃堕棿" width="180" />
- <el-table-column prop="status" label="鐘舵��" width="100">
- <template #default="scope">
- <el-tag :type="scope.row.status === 'confirmed' ? 'success' : 'warning'">
- {{ scope.row.status === 'confirmed' ? '宸茬‘璁�' : '鏈‘璁�' }}
- </el-tag>
- </template>
- </el-table-column>
- </el-table>
- </FormDialog>
</div>
</template>
@@ -253,21 +129,13 @@
import { ref, reactive, onMounted, getCurrentInstance, watch } from 'vue'
import { useRoute } from 'vue-router'
import { ElMessage, ElMessageBox } from 'element-plus'
-import { Plus } from '@element-plus/icons-vue'
-import { listSealApplication, addSealApplication, updateSealApplication,listRuleManagement,addRuleManagement,updateRuleManagement,delRuleManagement,getReadingStatusByRuleId,getReadingStatusList,addReadingStatus,updateReadingStatus } from '@/api/collaborativeApproval/sealManagement.js'
-import { el } from 'element-plus/es/locales.mjs'
-import { getUserProfile, userListNoPageByTenantId } from '@/api/system/user.js'
+import { listSealApplication, addSealApplication, updateSealApplication } from '@/api/collaborativeApproval/sealManagement.js'
+import { userListNoPageByTenantId } from '@/api/system/user.js'
import useUserStore from '@/store/modules/user'
-import { userLoginFacotryList } from "@/api/system/user.js"
-import {staffOnJobListPage} from "@/api/personnelManagement/staffOnJob.js"
import FormDialog from '@/components/Dialog/FormDialog.vue'
import PIMTable from '@/components/PIMTable/PIMTable.vue'
// 鍝嶅簲寮忔暟鎹�
-const currentUser = ref(null)
-const activeTab = ref('seal')
-const operationType = ref('add')
-const tableData = ref([])
// 鐢ㄥ嵃鐢宠鐩稿叧
const userStore = useUserStore()
const route = useRoute()
@@ -306,61 +174,8 @@
size: 10,
total: 0
})
-// 瑙勭珷鍒跺害鐩稿叧
-const showRegulationDialog = ref(false)
-const showRegulationDetailDialog = ref(false)
-const showVersionHistoryDialog = ref(false)
-const showReadStatusDialog = ref(false)
-const currentRegulationDetail = ref(null)
-const regulationFormRef = ref()
-const regulationForm = reactive({
- id: '',
- regulationNum: '',
- title: '',
- category: '',
- content: '',
- version: '',
- status: 'active',
- readCount: 0,
- effectiveTime: '',
- scope: [],
- requireConfirm: false
-})
-const readStatus = ref({
- id: '',
- ruleId: '',
- employee: '',
- department: '',
- createTime: '',
- confirmTime: '',
- status: 'unconfirmed'
-})
-
-const regulationRules = {
- title: [{ required: true, message: '璇疯緭鍏ュ埗搴︽爣棰�', trigger: 'blur' }],
- category: [{ required: true, message: '璇烽�夋嫨鍒跺害鍒嗙被', trigger: 'change' }],
- content: [{ required: true, message: '璇疯緭鍏ュ埗搴﹀唴瀹�', trigger: 'blur' }],
- effectiveTime: [{ required: true, message: '璇烽�夋嫨鐢熸晥鏃堕棿', trigger: 'change' }],
- scope: [{ required: true, message: '璇烽�夋嫨閫傜敤鑼冨洿', trigger: 'change' }]
-}
-
-const regulationSearchForm = reactive({
- title: '',
- category: ''
-})
-
-// 鍋囨暟鎹�
const sealApplications = ref([])
-
-const regulations = ref([])
-
-const versionHistory = ref([])
-
-const readStatusList = ref([])
- // { employee: '闄堝織寮�', department: '閿�鍞儴', readTime: '2025-01-11 10:30:00', confirmTime: '2025-01-11 10:35:00', status: 'confirmed' },
- // { employee: '鍒橀泤濠�', department: '鎶�鏈儴', readTime: '2025-01-11 14:20:00', confirmTime: '', status: 'unconfirmed' },
- // { employee: '鐜嬪缓鍥�', department: '璐㈠姟閮�', readTime: '2025-01-12 09:15:00', confirmTime: '2025-01-12 09:20:00', status: 'confirmed' }
// 鐢ㄥ嵃鐢宠鐘舵��
const getStatusType = (status) => {
@@ -371,7 +186,7 @@
}
return statusMap[status] || 'info'
}
-// 鍒跺害鐘舵��
+// 鐢ㄥ嵃鐢宠鐘舵�佹枃鏈�
const getStatusText = (status) => {
const statusMap = {
pending: '寰呭鎵�',
@@ -436,16 +251,6 @@
}
])
-// 鍒跺害鍒嗙被
-const getCategoryText = (category) => {
- const categoryMap = {
- hr: '浜轰簨鍒跺害',
- finance: '璐㈠姟鍒跺害',
- safety: '瀹夊叏鍒跺害',
- tech: '鎶�鏈埗搴�'
- }
- return categoryMap[category] || '鏈煡'
-}
// 鎼滅储鍗扮珷鐢宠
const searchSealApplications = () => {
page.current=1
@@ -459,17 +264,6 @@
sealSearchForm.status = ''
sealSearchForm.applicationNum = ''
searchSealApplications()
-}
-// 鎼滅储鍒跺害
-const searchRegulations = () => {
- page.current=1
- getRegulationList()
-}
-// 閲嶇疆鍒跺害鎼滅储
-const resetRegulationSearch = () => {
- regulationSearchForm.title = ''
- regulationSearchForm.category = ''
- searchRegulations()
}
// 鎻愪氦鐢ㄥ嵃鐢宠
const submitSealApplication = async () => {
@@ -519,106 +313,6 @@
const closeSealDetailDialog = () => {
showSealDetailDialog.value = false
}
-// 鍏抽棴瑙勭珷鍒跺害璇︽儏瀵硅瘽妗�
-const closeRegulationDetailDialog = () => {
- showRegulationDetailDialog.value = false
-}
-// 澶勭悊瑙勭珷鍒跺害璇︽儏纭
-const handleRegulationDetailConfirm = () => {
- // 濡傛灉tableData>0锛屾墽琛岀‘璁ゆ煡鐪嬫搷浣�
- if (currentRegulationDetail.value && tableData.value && tableData.value.length > 0) {
- resetForm(currentRegulationDetail.value)
- }
- closeRegulationDetailDialog()
-}
-// 鍏抽棴鐗堟湰鍘嗗彶瀵硅瘽妗�
-const closeVersionHistoryDialog = () => {
- showVersionHistoryDialog.value = false
-}
-// 鍏抽棴闃呰鐘舵�佸璇濇
-const closeReadStatusDialog = () => {
- showReadStatusDialog.value = false
-}
-// 鏂板
-const handleAdd = () => {
- operationType.value = 'add'
- resetRegulationForm()
- showRegulationDialog.value = true
-}
-
-// 缂栬緫
-const handleEdit = (row) => {
- operationType.value = 'edit'
- Object.assign(regulationForm, row)
- showRegulationDialog.value = true
-}
-// 搴熷純
-const repealEdit = (row) => {
- operationType.value = 'edit'
- Object.assign(regulationForm, row)
- regulationForm.status = 'repealed'
- ElMessageBox.confirm('纭搴熷純璇ュ埗搴︼紵', '鎻愮ず', {
- confirmButtonText: '纭畾',
- cancelButtonText: '鍙栨秷',
- type: 'warning'
- }).then(() => {
- updateRuleManagement(regulationForm).then(res => {
- if(res.code == 200){
- ElMessage.success('鍒跺害搴熷純鎴愬姛')
- // showRegulationDialog.value = false
- getRegulationList()
- resetRegulationForm()
- }
- })
- }).catch(() => {
- ElMessage({
- type: 'info',
- message: '宸插彇娑堝簾寮�'
- })
- })
-}
-// 鍙戝竷鍒跺害
-const submitRegulation = async () => {
- try {
- await regulationFormRef.value.validate()
- if(operationType.value == 'add'){
- addRuleManagement(regulationForm).then(res => {
- if(res.code == 200){
- ElMessage.success('鍒跺害鍙戝竷鎴愬姛')
- showRegulationDialog.value = false
- getRegulationList()
- resetRegulationForm()
- }
- })
- }else{
- updateRuleManagement(regulationForm).then(res => {
- if(res.code == 200){
- ElMessage.success('鍒跺害缂栬緫鎴愬姛')
- showRegulationDialog.value = false
- resetRegulationForm()
- getRegulationList()
- }})}
- }catch(err){
- ElMessage.error(err.msg)
- }
-}
-//閲嶇疆鍒跺害琛ㄥ崟
-const resetRegulationForm = () => {
- Object.assign(regulationForm, {
- id: '',
- regulationNum: '',
- title: '',
- category: '',
- content: '',
- version: '',
- status: 'active',
- readCount: 0,
- effectiveTime: '',
- scope: [],
- requireConfirm: false
-})
-}
-
// 鏌ョ湅鐢ㄥ嵃鐢宠璇︽儏
const viewSealDetail = (row) => {
@@ -627,7 +321,6 @@
}
// 瀹℃壒鐢ㄥ嵃鐢宠
const approveSeal = (row) => {
- console.log(row)
ElMessageBox.confirm('纭閫氳繃璇ョ敤鍗扮敵璇凤紵', '鎻愮ず', {
confirmButtonText: '纭畾',
cancelButtonText: '鍙栨秷',
@@ -637,6 +330,7 @@
updateSealApplication(row).then(res => {
if(res.code == 200){
ElMessage.success('瀹℃壒閫氳繃')
+ getSealApplicationList()
}
})
})
@@ -652,122 +346,10 @@
row.status = 'rejected'
updateSealApplication(row).then(res => {
if(res.code == 200){
- ElMessage.success('瀹℃壒鎷掔粷')
+ ElMessage.success('宸叉嫆缁濈敵璇�')
+ getSealApplicationList()
}
})
- ElMessage.success('宸叉嫆缁濈敵璇�')
- })
-}
-// 鑾峰彇鍦ㄨ亴鍛樺伐鍒楄〃
-const getList = () => {
- tableLoading.value = true;
- //鑾峰彇褰撳墠鐧诲綍鐢ㄦ埛淇℃伅
- getUserProfile().then(res => {
- if(res.code == 200){
- console.log(res.data.userName)
- currentUser.value = res.data.userName
- }
- })
- staffOnJobListPage({staffState: 1, ...page}).then(res => {
- tableLoading.value = false;
- // tableData.value = res.data.records
- // //绛涢�夊嚭鍜宑urrentUser鍚屽悕鐨勪汉鍛�
- tableData.value = res.data.records.filter(item => item.staffName === currentUser.value)
- page.total = res.data.total;
-
- if(tableData.value.length == 0){
- ElMessage.error('褰撳墠鐢ㄦ埛鏈姞鍏ヤ换浣曢儴闂�')
- }
- }).catch(err => {
- tableLoading.value = false;
- })
-
-
-};
-
-// 鏌ョ湅鍒跺害鐗堟湰鍘嗗彶
-const viewVersionHistory = (row) => {
- showVersionHistoryDialog.value = true
- const params = {
-
- category: row.category
- }
- listRuleManagement(page,params).then(res => {
- if(res.code == 200){
- versionHistory.value = res.data.records
- }
- })
-}
-// 鏌ョ湅鍒跺害璇︽儏
-const viewRegulation = (row) => {
- getList()
- currentRegulationDetail.value = row
- showRegulationDetailDialog.value = true
- getReadingStatusByRuleId(row.id).then(res => {
- if(res.code == 200){
- readStatusList.value = res.data
- if(readStatusList.value.length==0 && tableData.value.length>0){
- const params = {
- ruleId: row.id,
- employee: tableData.value[0].staffName,
- department: tableData.value[0].postJob,
- status: 'unconfirmed'
- }
- addReadingStatus(params).then(res => {
- if(res.code == 200){
- ElMessage.success('鍒跺害闃呰鎴愬姛')
- }
- })
- }
- }
- })
-
-}
-// 鏌ョ湅鍒跺害闃呰鐘舵��
-const viewReadStatus = (row) => {
- showReadStatusDialog.value = true
- //鏌ョ湅闃呰鐘舵�佸垪琛�
- getReadingStatusByRuleId(row.id).then(res => {
- if(res.code == 200){
- readStatusList.value = res.data
- }
- })
-}
-
-//纭鏌ョ湅
-const resetForm = (row) => {
- console.log("row",row)
- row.readCount = row.readCount + 1
-
- updateRuleManagement(row).then(res => {
- if(res.code == 200){
- ElMessage.success('鏌ョ湅鏁伴噺淇敼鎴愬姛')
- //淇敼闃呰鐘舵��
- //鏍规嵁鍒跺害id鍜屽綋鍓嶇櫥褰曠殑鍛樺伐寰楀埌闃呰鐘舵��
- // let item = readStatusList.value.filter(item => item.employee == tableData.value[0].staffName )
- // if(item.length>0){
- // item[0].status = 'confirmed',
- // item[0].confirmTime = new Date().toISOString().replace('T', ' ').split('.')[0];
- // }
- // 绛涢�夊綋鍓嶅憳宸ュ搴旇鍒跺害鐨勯槄璇荤姸鎬佽褰�
- let statusItem = readStatusList.value.find(item => item.employee === tableData.value[0].staffName && item.ruleId === row.id);
-
- if (statusItem) {
- // 濡傛灉鎵惧埌璁板綍锛屾洿鏂扮姸鎬佸拰纭鏃堕棿
- statusItem.status = 'confirmed';
- // 鏍煎紡鍖栨椂闂翠负"YYYY-MM-DD HH:mm:ss"鏍煎紡
- const now = new Date();
- statusItem.confirmTime = `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, '0')}-${String(now.getDate()).padStart(2, '0')} ${String(now.getHours()).padStart(2, '0')}:${String(now.getMinutes()).padStart(2, '0')}:${String(now.getSeconds()).padStart(2, '0')}`;
- // statusItem.confirmTime = new Date().toISOString().replace('T', ' ').split('.')[0];
-
- updateReadingStatus(statusItem).then(res => {
- if(res.code == 200){
- ElMessage.success('鍒跺害闃呰鐘舵�佷慨鏀规垚鍔�')
- }
- })
- }
-
- }
})
}
@@ -780,46 +362,15 @@
// 鑾峰彇鍗扮珷鐢宠鍒楄〃鏁版嵁
const getSealApplicationList = async () => {
tableLoading.value = true
- listSealApplication(page,sealSearchForm)
+ listSealApplication(page, sealSearchForm)
.then(res => {
- //鑾峰彇褰撳墠鐧诲綍鐨勯儴闂ㄤ俊鎭�
-// 鑾峰彇褰撳墠鐧诲綍鐨勯儴闂ㄤ俊鎭苟杩囨护鏁版嵁
- const currentFactoryName = userStore.currentFactoryName
- if (currentFactoryName) {
- // 鏍规嵁currentFactoryName杩囨护鍑篸epartment鐩稿悓鐨勬暟鎹�
- sealApplications.value = res.data.records.filter(item => item.department === currentFactoryName)
- // 鏇存柊杩囨护鍚庣殑鎬绘暟
- page.total = sealApplications.value.length
- } else {
- // 濡傛灉娌℃湁currentFactoryName锛屽垯鏄剧ず鎵�鏈夋暟鎹�
- sealApplications.value = res.data.records
- page.total = res.data.total
- }
- // sealApplications.value = res.data.records
- // page.value.total = res.data.total;
- tableLoading.value = false;
-
+ sealApplications.value = res.data.records
+ page.total = res.data.total
+ tableLoading.value = false
}).catch(err => {
- tableLoading.value = false;
+ tableLoading.value = false
})
}
-// 鑾峰彇瑙勭珷鍒跺害鍒楄〃鏁版嵁
-const getRegulationList = async () => {
- tableLoading.value = true
- listRuleManagement(page,regulationSearchForm)
- .then(res => {
-
- regulations.value = res.data.records
- // 杩囨护鎺夊凡搴熷純鐨勫埗搴�
- // regulations.value = res.data.records.filter(item => item.status !== 'repealed')
- page.total = res.data.total;
- tableLoading.value = false;
-
- }).catch(err => {
- tableLoading.value = false;
- })
-}
-
// 鍒嗛〉鍙樺寲澶勭悊
const paginationChange = (obj) => {
page.current = obj.page;
@@ -845,7 +396,6 @@
} else {
getSealApplicationList()
}
- getRegulationList()
})
</script>
@@ -868,26 +418,7 @@
margin-bottom: 20px;
}
-.mt-20 {
- margin-top: 20px;
-}
-
.ml-10 {
margin-left: 10px;
-}
-
-.regulation-content {
- background-color: #f5f5f5;
- padding: 15px;
- border-radius: 4px;
- line-height: 1.6;
- white-space: pre-wrap;
- height: 200px;
-}
-
-.dialog-footer {
- display: flex;
- justify-content: flex-end;
- gap: 10px;
}
</style>
diff --git a/src/views/inventoryManagement/dispatchLog/Record.vue b/src/views/inventoryManagement/dispatchLog/Record.vue
index 6fa29c8..1637226 100644
--- a/src/views/inventoryManagement/dispatchLog/Record.vue
+++ b/src/views/inventoryManagement/dispatchLog/Record.vue
@@ -112,9 +112,7 @@
delStockOut,
} from "@/api/inventoryManagement/stockOut.js";
import {
- findAllQualifiedStockRecordTypeOptions,
- findAllStockRecordTypeOptions,
- findAllUnqualifiedStockRecordTypeOptions
+ findAllQualifiedStockOutRecordTypeOptions, findAllUnQualifiedStockOutRecordTypeOptions,
} from "@/api/basicData/enum.js";
const userStore = useUserStore();
@@ -186,13 +184,13 @@
// 鑾峰彇鏉ユ簮绫诲瀷閫夐」
const fetchStockRecordTypeOptions = () => {
if (props.type === '0') {
- findAllQualifiedStockRecordTypeOptions()
+ findAllQualifiedStockOutRecordTypeOptions()
.then(res => {
stockRecordTypeOptions.value = res.data;
})
return
}
- findAllUnqualifiedStockRecordTypeOptions()
+ findAllUnQualifiedStockOutRecordTypeOptions()
.then(res => {
stockRecordTypeOptions.value = res.data;
})
diff --git a/src/views/inventoryManagement/receiptManagement/Record.vue b/src/views/inventoryManagement/receiptManagement/Record.vue
index b74ffc4..cd103ea 100644
--- a/src/views/inventoryManagement/receiptManagement/Record.vue
+++ b/src/views/inventoryManagement/receiptManagement/Record.vue
@@ -109,8 +109,7 @@
batchDeleteStockInRecords,
} from "@/api/inventoryManagement/stockInRecord.js";
import {
- findAllQualifiedStockRecordTypeOptions,
- findAllUnqualifiedStockRecordTypeOptions
+ findAllQualifiedStockInRecordTypeOptions, findAllUnQualifiedStockInRecordTypeOptions,
} from "@/api/basicData/enum.js";
const {proxy} = getCurrentInstance();
@@ -176,13 +175,13 @@
// 鑾峰彇鏉ユ簮绫诲瀷閫夐」
const fetchStockRecordTypeOptions = () => {
if (props.type === '0') {
- findAllQualifiedStockRecordTypeOptions()
+ findAllQualifiedStockInRecordTypeOptions()
.then(res => {
stockRecordTypeOptions.value = res.data;
})
return
}
- findAllUnqualifiedStockRecordTypeOptions()
+ findAllUnQualifiedStockInRecordTypeOptions()
.then(res => {
stockRecordTypeOptions.value = res.data;
})
diff --git a/src/views/inventoryManagement/stockReport/index.vue b/src/views/inventoryManagement/stockReport/index.vue
index a0a1f67..ff1d901 100644
--- a/src/views/inventoryManagement/stockReport/index.vue
+++ b/src/views/inventoryManagement/stockReport/index.vue
@@ -240,14 +240,12 @@
import { ElMessage } from 'element-plus'
import * as echarts from 'echarts'
import {
- getStockMonthlyReport,
- getStockInOutReport,
-} from '@/api/inventoryManagement/stockReport'
-import {
getStockInventoryInAndOutReportList,
getStockInventoryReportList
} from "@/api/inventoryManagement/stockInventory.js";
-import {findAllQualifiedStockRecordTypeOptions} from "@/api/basicData/enum.js";
+import {
+ findAllQualifiedStockInRecordTypeOptions,
+} from "@/api/basicData/enum.js";
const { proxy } = getCurrentInstance()
@@ -277,7 +275,7 @@
// 鑾峰彇鏉ユ簮绫诲瀷閫夐」
const fetchStockRecordTypeOptions = () => {
- findAllQualifiedStockRecordTypeOptions()
+ findAllQualifiedStockInRecordTypeOptions()
.then(res => {
stockRecordTypeOptions.value = res.data;
})
diff --git a/src/views/procurementManagement/procurementLedger/index.vue b/src/views/procurementManagement/procurementLedger/index.vue
index 858b633..5c83ab2 100644
--- a/src/views/procurementManagement/procurementLedger/index.vue
+++ b/src/views/procurementManagement/procurementLedger/index.vue
@@ -157,6 +157,10 @@
prop="entryDate"
width="100"
show-overflow-tooltip />
+ <el-table-column label="澶囨敞"
+ prop="remarks"
+ width="200"
+ show-overflow-tooltip />
<el-table-column fixed="right"
label="鎿嶄綔"
width="120"
@@ -450,8 +454,8 @@
<el-row :gutter="30">
<el-col :span="24">
<el-form-item label="澶囨敞路锛�"
- prop="remark">
- <el-input v-model="form.remark"
+ prop="remarks">
+ <el-input v-model="form.remarks"
placeholder="璇疯緭鍏�"
clearable
type="textarea"
@@ -462,7 +466,7 @@
<el-row :gutter="30">
<el-col :span="24">
<el-form-item label="闄勪欢鏉愭枡锛�"
- prop="remark">
+ prop="purchaseLedgerFiles">
<el-upload v-model:file-list="fileList"
:action="upload.url"
multiple
diff --git a/src/views/productionManagement/productionOrder/New.vue b/src/views/productionManagement/productionOrder/New.vue
new file mode 100644
index 0000000..c9c478b
--- /dev/null
+++ b/src/views/productionManagement/productionOrder/New.vue
@@ -0,0 +1,192 @@
+<template>
+ <div>
+ <el-dialog
+ v-model="isShow"
+ title="鏂板鐢熶骇璁㈠崟"
+ width="800"
+ @close="closeModal"
+ >
+ <el-form label-width="140px" :model="formState" label-position="top" ref="formRef">
+ <el-form-item
+ label="浜у搧鍚嶇О"
+ prop="productModelId"
+ :rules="[
+ {
+ required: true,
+ message: '璇烽�夋嫨浜у搧',
+ trigger: 'change',
+ }
+ ]"
+ >
+ <el-button type="primary" @click="showProductSelectDialog = true">
+ {{ formState.productName ? formState.productName : '閫夋嫨浜у搧' }}
+ </el-button>
+ </el-form-item>
+
+ <el-form-item
+ label="瑙勬牸"
+ prop="productModelName"
+ >
+ <el-input v-model="formState.productModelName" disabled />
+ </el-form-item>
+
+ <el-form-item
+ label="鍗曚綅"
+ prop="unit"
+ >
+ <el-input v-model="formState.unit" disabled />
+ </el-form-item>
+
+ <el-form-item label="宸ヨ壓璺嚎">
+ <el-select v-model="formState.routeId"
+ placeholder="璇烽�夋嫨宸ヨ壓璺嚎"
+ style="width: 100%;"
+ :loading="bindRouteLoading">
+ <el-option v-for="item in routeOptions"
+ :key="item.id"
+ :label="`${item.processRouteCode || ''}`"
+ :value="item.id" />
+ </el-select>
+ </el-form-item>
+
+ <el-form-item
+ label="闇�姹傛暟閲�"
+ prop="quantity"
+ >
+ <el-input-number v-model="formState.quantity" :step="1" :min="1" style="width: 100%" />
+ </el-form-item>
+ </el-form>
+
+ <!-- 浜у搧閫夋嫨寮圭獥 -->
+ <ProductSelectDialog
+ v-model="showProductSelectDialog"
+ @confirm="handleProductSelect"
+ single
+ />
+ <template #footer>
+ <div class="dialog-footer">
+ <el-button type="primary" @click="handleSubmit">纭</el-button>
+ <el-button @click="closeModal">鍙栨秷</el-button>
+ </div>
+ </template>
+ </el-dialog>
+ </div>
+</template>
+
+<script setup>
+import {ref, computed, getCurrentInstance} from "vue";
+import ProductSelectDialog from "@/views/basicData/product/ProductSelectDialog.vue";
+import {addProductOrder, listProcessRoute} from "@/api/productionManagement/productionOrder.js";
+
+const props = defineProps({
+ visible: {
+ type: Boolean,
+ required: true,
+ },
+
+ type: {
+ type: String,
+ required: true,
+ default: 'qualified',
+ },
+});
+
+const emit = defineEmits(['update:visible', 'completed']);
+
+// 鍝嶅簲寮忔暟鎹紙鏇夸唬閫夐」寮忕殑 data锛�
+const formState = ref({
+ productId: undefined,
+ productModelId: undefined,
+ routeId: undefined,
+ productName: "",
+ productModelName: "",
+ unit: "",
+ quantity: 0,
+});
+
+const isShow = computed({
+ get() {
+ return props.visible;
+ },
+ set(val) {
+ emit('update:visible', val);
+ },
+});
+
+const showProductSelectDialog = ref(false);
+
+let { proxy } = getCurrentInstance()
+
+const closeModal = () => {
+ // 閲嶇疆琛ㄥ崟鏁版嵁
+ formState.value = {
+ productId: undefined,
+ productModelId: undefined,
+ routeId: undefined,
+ productName: "",
+ productModelName: "",
+ quantity: '',
+ };
+ isShow.value = false;
+};
+
+// 浜у搧閫夋嫨澶勭悊
+const handleProductSelect = async (products) => {
+ if (products && products.length > 0) {
+ const product = products[0];
+ formState.value.productId = product.productId;
+ formState.value.productName = product.productName;
+ formState.value.productModelName = product.model;
+ formState.value.productModelId = product.id;
+ formState.value.unit = product.unit;
+ showProductSelectDialog.value = false;
+ fetchRouteOptions( product.id);
+ // 瑙﹀彂琛ㄥ崟楠岃瘉鏇存柊
+ proxy.$refs["formRef"]?.validateField('productModelId');
+ }
+};
+
+const routeOptions = ref([]);
+const bindRouteLoading = ref(false);
+const fetchRouteOptions = (productModelId) => {
+ formState.value.routeId = undefined;
+ routeOptions.value = []
+ bindRouteLoading.value = true;
+ listProcessRoute({ productModelId: productModelId }).then(res => {
+ routeOptions.value = res.data || [];
+ }).finally(() => {
+ bindRouteLoading.value = false;
+ })
+}
+
+const handleSubmit = () => {
+ proxy.$refs["formRef"].validate(valid => {
+ if (valid) {
+ // 楠岃瘉鏄惁閫夋嫨浜嗕骇鍝佸拰瑙勬牸
+ if (!formState.value.productModelId) {
+ proxy.$modal.msgError("璇烽�夋嫨浜у搧");
+ return;
+ }
+ if (!formState.value.productModelId) {
+ proxy.$modal.msgError("璇烽�夋嫨瑙勬牸");
+ return;
+ }
+
+ addProductOrder(formState.value).then(res => {
+ // 鍏抽棴妯℃�佹
+ isShow.value = false;
+ // 鍛婄煡鐖剁粍浠跺凡瀹屾垚
+ emit('completed');
+ proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
+ })
+ }
+ })
+};
+
+
+defineExpose({
+ closeModal,
+ handleSubmit,
+ isShow,
+});
+</script>
diff --git a/src/views/productionManagement/productionOrder/index.vue b/src/views/productionManagement/productionOrder/index.vue
index 9a4620f..761139e 100644
--- a/src/views/productionManagement/productionOrder/index.vue
+++ b/src/views/productionManagement/productionOrder/index.vue
@@ -41,6 +41,8 @@
</el-form-item>
</el-form>
<div>
+ <el-button type="primary" @click="isShowNewModal = true">鏂板</el-button>
+ <el-button type="danger" @click="handleDelete">鍒犻櫎</el-button>
<el-button @click="handleOut">瀵煎嚭</el-button>
</div>
</div>
@@ -51,6 +53,8 @@
:page="page"
:tableLoading="tableLoading"
:row-class-name="tableRowClassName"
+ :isSelection="true"
+ @selection-change="handleSelectionChange"
@pagination="pagination">
<template #completionStatus="{ row }">
<el-progress
@@ -86,6 +90,10 @@
</span>
</template>
</el-dialog>
+
+ <new-product-order v-if="isShowNewModal"
+ v-model:visible="isShowNewModal"
+ @completed="handleQuery" />
</div>
</template>
@@ -98,12 +106,17 @@
productOrderListPage,
listProcessRoute,
bindingRoute,
- listProcessBom,
+ listProcessBom, delProductOrder,
} from "@/api/productionManagement/productionOrder.js";
import { listMain as getOrderProcessRouteMain } from "@/api/productionManagement/productProcessRoute.js";
+ import {fileDel} from "@/api/financialManagement/revenueManagement.js";
+ import PIMTable from "@/components/PIMTable/PIMTable.vue";
+ const NewProductOrder = defineAsyncComponent(() => import("@/views/productionManagement/productionOrder/New.vue"));
+
const { proxy } = getCurrentInstance();
const router = useRouter();
+ const isShowNewModal = ref(false);
const tableColumn = ref([
{
@@ -208,6 +221,7 @@
size: 100,
total: 0,
});
+ const selectedRows = ref([]);
const data = reactive({
searchForm: {
@@ -239,6 +253,7 @@
// 娣诲姞琛ㄨ绫诲悕鏂规硶
const tableRowClassName = ({ row }) => {
+ if (!row.deliveryDate) return '';
if (row.isFh) return '';
const diff = row.deliveryDaysDiff;
@@ -386,6 +401,33 @@
});
};
+ // 琛ㄦ牸閫夋嫨鏁版嵁
+ const handleSelectionChange = (selection) => {
+ selectedRows.value = selection;
+ };
+
+ const handleDelete = () => {
+ let ids = [];
+ if (selectedRows.value.length > 0) {
+ ids = selectedRows.value.map((item) => item.id);
+ } else {
+ proxy.$modal.msgWarning("璇烽�夋嫨鏁版嵁");
+ return;
+ }
+ ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚垹闄わ紝鏄惁纭鍒犻櫎锛�", "瀵煎嚭", {
+ confirmButtonText: "纭",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ }).then(() => {
+ delProductOrder(ids).then((res) => {
+ proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+ getList();
+ });
+ }).catch(() => {
+ proxy.$modal.msg("宸插彇娑�");
+ });
+ };
+
// 瀵煎嚭
const handleOut = () => {
ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚鍑猴紝鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
diff --git a/src/views/qualityManagement/finalInspection/index.vue b/src/views/qualityManagement/finalInspection/index.vue
index 764e999..db44222 100644
--- a/src/views/qualityManagement/finalInspection/index.vue
+++ b/src/views/qualityManagement/finalInspection/index.vue
@@ -96,6 +96,11 @@
width: 120
},
{
+ label: "鐢熶骇宸ュ崟鍙�",
+ prop: "workOrderNo",
+ width: 120
+ },
+ {
label: "妫�楠屽憳",
prop: "checkName",
},
diff --git a/src/views/qualityManagement/processInspection/index.vue b/src/views/qualityManagement/processInspection/index.vue
index cad87aa..cbeab71 100644
--- a/src/views/qualityManagement/processInspection/index.vue
+++ b/src/views/qualityManagement/processInspection/index.vue
@@ -96,6 +96,11 @@
width: 120
},
{
+ label: "鐢熶骇宸ュ崟鍙�",
+ prop: "workOrderNo",
+ width: 120
+ },
+ {
label: "宸ュ簭",
prop: "process",
width: 230
diff --git a/src/views/qualityManagement/rawMaterialInspection/index.vue b/src/views/qualityManagement/rawMaterialInspection/index.vue
index f50ddb8..26504b0 100644
--- a/src/views/qualityManagement/rawMaterialInspection/index.vue
+++ b/src/views/qualityManagement/rawMaterialInspection/index.vue
@@ -98,6 +98,11 @@
width: 120
},
{
+ label: "閲囪喘璁㈠崟鍙�",
+ prop: "purchaseContractNo",
+ width: 120
+ },
+ {
label: "渚涘簲鍟�",
prop: "supplier",
width: 230
diff --git a/src/views/reportAnalysis/productionAnalysis/components/right-top.vue b/src/views/reportAnalysis/productionAnalysis/components/right-top.vue
index 9004362..e6717d1 100644
--- a/src/views/reportAnalysis/productionAnalysis/components/right-top.vue
+++ b/src/views/reportAnalysis/productionAnalysis/components/right-top.vue
@@ -2,25 +2,16 @@
<div>
<PanelHeader title="宸ュ崟鎵ц鏁堢巼鍒嗘瀽" />
<div class="main-panel panel-item-customers">
- <Echarts
- ref="chart"
- :chartStyle="chartStyle"
- :grid="grid"
- :legend="barLegend"
- :series="chartSeries"
- :tooltip="tooltip"
- :xAxis="xAxis1"
- :yAxis="yAxis1"
- :options="{ backgroundColor: 'transparent', textStyle: { color: '#B8C8E0' } }"
- style="height: 260px"
- />
+ <Echarts ref="chart" :chartStyle="chartStyle" :grid="grid" :legend="barLegend" :series="chartSeries"
+ :tooltip="tooltip" :xAxis="xAxis1" :yAxis="yAxis1"
+ :options="{ backgroundColor: 'transparent', textStyle: { color: '#B8C8E0' } }" style="height: 260px" />
</div>
</div>
</template>
<script setup>
import { ref, onMounted } from 'vue'
-import { qualityStatistics } from '@/api/viewIndex.js'
+import { workOrderEfficiencyAnalysis } from '@/api/viewIndex.js'
import PanelHeader from './PanelHeader.vue'
import Echarts from '@/components/Echarts/echarts.vue'
@@ -37,7 +28,6 @@
data: ['寮�宸�', '瀹屾垚', '鑹搧鐜�'],
}
-// 鏌辩姸鍥撅細寮�宸ャ�佸畬鎴愶紱鎶樼嚎鍥撅細鑹搧鐜囷紙棰滆壊 rgba(90, 216, 166, 1)锛�
const chartSeries = ref([
{
name: '寮�宸�',
@@ -111,6 +101,7 @@
const xAxis1 = ref([
{ type: 'category', axisTick: { show: false }, axisLabel: { color: '#B8C8E0' }, data: [] },
])
+
const yAxis1 = [
{ type: 'value', name: '浠�', axisLabel: { color: '#B8C8E0' }, nameTextStyle: { color: '#B8C8E0' } },
{
@@ -125,25 +116,23 @@
]
const fetchData = () => {
- qualityStatistics()
+ workOrderEfficiencyAnalysis()
.then((res) => {
- if (!res?.data?.item || !Array.isArray(res.data.item)) return
- const items = res.data.item
- xAxis1.value[0].data = items.map((d) => d.date)
- // 寮�宸ワ細杩囩▼妫�楠屾暟
- chartSeries.value[0].data = items.map((d) => Number(d.processNum) || 0)
- // 瀹屾垚锛氬嚭鍘傛暟
- chartSeries.value[1].data = items.map((d) => Number(d.factoryNum) || 0)
- // 鑹搧鐜囷細鍑哄巶鏁�/杩囩▼鏁�*100锛堟棤鍗曠嫭鎺ュ彛鏃剁敤姝ゅ崰浣嶏級
- chartSeries.value[2].data = items.map((d) => {
- const processNum = Number(d.processNum) || 0
- const factoryNum = Number(d.factoryNum) || 0
- if (processNum <= 0) return 0
- return Math.min(100, Math.round((factoryNum / processNum) * 100))
- })
+ // 鏍规嵁浣犵殑缁撴瀯锛屾暟鎹洿鎺ュ湪 res.data 涓�
+ if (!res?.data || !Array.isArray(res.data)) return
+
+ const list = res.data
+
+ xAxis1.value[0].data = list.map((item) => item.date)
+
+ chartSeries.value[0].data = list.map((item) => Number(item.startQuantity) || 0)
+
+ chartSeries.value[1].data = list.map((item) => Number(item.finishQuantity) || 0)
+
+ chartSeries.value[2].data = list.map((item) => Number(item.yieldRate) || 0)
})
.catch((err) => {
- console.error('鑾峰彇寮�宸ヤ笌鑹搧鐜囨暟鎹け璐�:', err)
+ console.error('鑾峰彇宸ュ崟鏁堢巼鏁版嵁澶辫触:', err)
})
}
diff --git a/src/views/safeProduction/dangerInvestigation/index.vue b/src/views/safeProduction/dangerInvestigation/index.vue
index 90093fa..49965e9 100644
--- a/src/views/safeProduction/dangerInvestigation/index.vue
+++ b/src/views/safeProduction/dangerInvestigation/index.vue
@@ -111,13 +111,13 @@
</el-table-column>
<el-table-column fixed="right"
label="鎿嶄綔"
- min-width="250"
+ min-width="150"
align="center">
<template #default="scope">
- <el-button link
+ <!-- <el-button link
type="primary"
size="small"
- @click="openForm('edit', scope.row)">缂栬緫</el-button>
+ @click="openForm('edit', scope.row)">缂栬緫</el-button> -->
<el-button link
type="primary"
size="small"
@@ -125,12 +125,12 @@
<el-button link
type="primary"
size="small"
- :disabled="scope.row.isRectify"
+ :disabled="scope.row.isRectify || scope.row.rectifyActualTime"
@click="openForm('edit2', scope.row)">鏁存敼</el-button>
<el-button link
type="primary"
size="small"
- :disabled="!scope.row.rectifyActualTime"
+ :disabled="!scope.row.rectifyActualTime || scope.row.verifyTime"
@click="openForm('edit3', scope.row)">楠屾敹</el-button>
</template>
</el-table-column>
diff --git a/src/views/salesManagement/receiptPayment/index.vue b/src/views/salesManagement/receiptPayment/index.vue
index 7b03d7d..6ded92b 100644
--- a/src/views/salesManagement/receiptPayment/index.vue
+++ b/src/views/salesManagement/receiptPayment/index.vue
@@ -335,7 +335,7 @@
const getStatusTagType = (statusName = '') => {
const normalized = statusName.trim();
if (!normalized) return 'info';
- return normalized === '鏈畬鎴愬洖娆�' ? 'danger' : 'success';
+ return normalized === '鏈畬鎴愪粯娆�' ? 'danger' : 'success';
};
// 鏌ヨ鍒楄〃
/** 鎼滅储鎸夐挳鎿嶄綔 */
diff --git a/src/views/salesManagement/salesLedger/index.vue b/src/views/salesManagement/salesLedger/index.vue
index 8b7b17c..dfbbaec 100644
--- a/src/views/salesManagement/salesLedger/index.vue
+++ b/src/views/salesManagement/salesLedger/index.vue
@@ -118,6 +118,7 @@
<el-table-column label="褰曞叆鏃ユ湡" prop="entryDate" width="120" show-overflow-tooltip />
<el-table-column label="绛捐鏃ユ湡" prop="executionDate" width="120" show-overflow-tooltip />
<el-table-column label="浜や粯鏃ユ湡" prop="deliveryDate" width="120" show-overflow-tooltip />
+ <el-table-column label="澶囨敞" prop="remarks" width="200" show-overflow-tooltip />
<el-table-column fixed="right" label="鎿嶄綔" min-width="100" align="center">
<template #default="scope">
<el-button link type="primary" size="small" @click="openForm('edit', scope.row)">缂栬緫</el-button>
@@ -242,14 +243,14 @@
</el-table>
<el-row :gutter="30">
<el-col :span="24">
- <el-form-item label="澶囨敞路锛�" prop="remark">
- <el-input v-model="form.remark" placeholder="璇疯緭鍏�" clearable type="textarea" :rows="2" :disabled="operationType === 'view'" />
+ <el-form-item label="澶囨敞锛�" prop="remarks">
+ <el-input v-model="form.remarks" placeholder="璇疯緭鍏�" clearable type="textarea" :rows="2" :disabled="operationType === 'view'" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="30">
<el-col :span="24">
- <el-form-item label="闄勪欢鏉愭枡锛�" prop="remark">
+ <el-form-item label="闄勪欢鏉愭枡锛�" prop="salesLedgerFiles">
<el-upload v-model:file-list="fileList" :action="upload.url" multiple ref="fileUpload" auto-upload
:headers="upload.headers" :before-upload="handleBeforeUpload" :on-error="handleUploadError"
:on-success="handleUploadSuccess" :on-remove="handleRemove">
@@ -1004,6 +1005,7 @@
// 娣诲姞琛ㄨ绫诲悕鏂规硶
const tableRowClassName = ({ row }) => {
+ if (!row.deliveryDate) return '';
if (row.isFh) return '';
const diff = row.deliveryDaysDiff;
diff --git a/src/views/salesManagement/salesQuotation/index.vue b/src/views/salesManagement/salesQuotation/index.vue
index d6f6c80..666360a 100644
--- a/src/views/salesManagement/salesQuotation/index.vue
+++ b/src/views/salesManagement/salesQuotation/index.vue
@@ -231,43 +231,52 @@
<el-table :data="form.products" border style="width: 100%" class="product-table" v-if="form.products.length > 0">
<el-table-column prop="product" label="浜у搧鍚嶇О" width="200">
<template #default="scope">
- <el-tree-select
- v-model="scope.row.productId"
- placeholder="璇烽�夋嫨"
- clearable
- check-strictly
- @change="getModels($event, scope.row)"
- :data="productOptions"
- :render-after-expand="false"
- style="width: 100%"
- />
+ <el-form-item :prop="`products.${scope.$index}.productId`" class="product-table-form-item">
+ <el-tree-select
+ v-model="scope.row.productId"
+ placeholder="璇烽�夋嫨"
+ clearable
+ check-strictly
+ @change="getModels($event, scope.row)"
+ :data="productOptions"
+ :render-after-expand="false"
+ style="width: 100%"
+ />
+ </el-form-item>
</template>
</el-table-column>
- <el-table-column prop="specification" label="瑙勬牸鍨嬪彿" width="150">
+ <el-table-column prop="specification" label="瑙勬牸鍨嬪彿" width="200">
<template #default="scope">
- <el-select
- v-model="scope.row.specificationId"
- placeholder="璇烽�夋嫨"
- clearable
- @change="getProductModel($event, scope.row)"
- >
- <el-option
- v-for="item in scope.row.modelOptions || []"
- :key="item.id"
- :label="item.model"
- :value="item.id"
- />
- </el-select>
+ <el-form-item :prop="`products.${scope.$index}.specificationId`" class="product-table-form-item">
+ <el-select
+ v-model="scope.row.specificationId"
+ placeholder="璇烽�夋嫨"
+ clearable
+ @change="getProductModel($event, scope.row)"
+ style="width: 100%"
+ >
+ <el-option
+ v-for="item in scope.row.modelOptions || []"
+ :key="item.id"
+ :label="item.model"
+ :value="item.id"
+ />
+ </el-select>
+ </el-form-item>
</template>
</el-table-column>
<el-table-column prop="unit" label="鍗曚綅">
<template #default="scope">
- <el-input v-model="scope.row.unit" placeholder="鍗曚綅" />
+ <el-form-item :prop="`products.${scope.$index}.unit`" class="product-table-form-item">
+ <el-input v-model="scope.row.unit" placeholder="鍗曚綅" clearable/>
+ </el-form-item>
</template>
</el-table-column>
<el-table-column prop="unitPrice" label="鍗曚环">
<template #default="scope">
- <el-input-number v-model="scope.row.unitPrice" :min="0" :precision="2" style="width: 100%" />
+ <el-form-item :prop="`products.${scope.$index}.unitPrice`" class="product-table-form-item">
+ <el-input-number v-model="scope.row.unitPrice" :min="0" :precision="2" style="width: 100%" />
+ </el-form-item>
</template>
</el-table-column>
<el-table-column label="鎿嶄綔" width="80" align="center">
@@ -393,13 +402,30 @@
totalAmount: 0
})
-const rules = {
+const baseRules = {
customer: [{ required: true, message: '璇烽�夋嫨瀹㈡埛', trigger: 'change' }],
salesperson: [{ required: true, message: '璇烽�夋嫨涓氬姟鍛�', trigger: 'change' }],
quotationDate: [{ required: true, message: '璇烽�夋嫨鎶ヤ环鏃ユ湡', trigger: 'change' }],
validDate: [{ required: true, message: '璇烽�夋嫨鏈夋晥鏈�', trigger: 'change' }],
paymentMethod: [{ required: true, message: '璇疯緭鍏ヤ粯娆炬柟寮�', trigger: 'blur' }]
}
+
+const productRowRules = {
+ productId: [{ required: true, message: '璇烽�夋嫨浜у搧鍚嶇О', trigger: 'change' }],
+ specificationId: [{ required: true, message: '璇烽�夋嫨瑙勬牸鍨嬪彿', trigger: 'change' }],
+ unit: [{ required: true, message: '璇峰~鍐欏崟浣�', trigger: 'blur' }],
+ unitPrice: [{ required: true, message: '璇峰~鍐欏崟浠�', trigger: 'change' }]
+}
+const rules = computed(() => {
+ const r = { ...baseRules }
+ ;(form.products || []).forEach((_, i) => {
+ r[`products.${i}.productId`] = productRowRules.productId
+ r[`products.${i}.specificationId`] = productRowRules.specificationId
+ r[`products.${i}.unit`] = productRowRules.unit
+ r[`products.${i}.unitPrice`] = productRowRules.unitPrice
+ })
+ return r
+})
const userList = ref([]);
const customerOption = ref([]);
@@ -774,7 +800,7 @@
ElMessage.warning('璇疯嚦灏戞坊鍔犱竴涓骇鍝�')
return
}
-
+
// 瀹℃壒浜哄繀濉牎楠�
const hasEmptyApprover = approverNodes.value.some(node => !node.userId)
if (hasEmptyApprover) {
@@ -956,6 +982,17 @@
padding: 8px 0;
}
+.product-table-form-item {
+ margin-bottom: 0;
+ :deep(.el-form-item__content) {
+ margin-left: 0 !important;
+ }
+ :deep(.el-form-item__label) {
+ width: auto;
+ min-width: auto;
+ }
+}
+
.approver-nodes-container {
display: flex;
flex-wrap: wrap;
--
Gitblit v1.9.3