From d98ee0c4ebf42b1378146733f8cbaa7705087bfd Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期四, 29 一月 2026 15:04:03 +0800
Subject: [PATCH] Merge branch 'dev_New' of http://114.132.189.42:9002/r/product-inventory-management into dev_New
---
src/views/collaborativeApproval/notificationManagement/summary/index.vue | 2
src/views/salesManagement/deliveryLedger/index.vue | 10
src/views/collaborativeApproval/notificationManagement/meetExamine/index.vue | 2
src/views/reportAnalysis/PSIDataAnalysis/components/left-top.vue | 2
src/views/productionManagement/productionCosting/index.vue | 192 +++++++++++++++----
src/views/salesManagement/salesQuotation/index.vue | 57 ++++-
src/views/collaborativeApproval/notificationManagement/meetApplication/index.vue | 4
src/views/qualityManagement/rawMaterialInspection/components/filesDia.vue | 15 -
src/views/reportAnalysis/dataDashboard/components/basic/right-bottom.vue | 2
src/api/salesManagement/deliveryLedger.js | 8
src/views/collaborativeApproval/sealManagement/index.vue | 120 +++++++++--
src/views/qualityManagement/finalInspection/components/filesDia.vue | 17 -
src/views/reportAnalysis/PSIDataAnalysis/components/left-bottom.vue | 2
src/views/reportAnalysis/financialAnalysis/components/center-top.vue | 2
src/views/collaborativeApproval/notificationManagement/meetPublish/index.vue | 2
src/views/qualityManagement/processInspection/components/filesDia.vue | 17 -
src/views/collaborativeApproval/knowledgeBase/index.vue | 105 +++++++---
17 files changed, 402 insertions(+), 157 deletions(-)
diff --git a/src/api/salesManagement/deliveryLedger.js b/src/api/salesManagement/deliveryLedger.js
index bb8689f..4be5829 100644
--- a/src/api/salesManagement/deliveryLedger.js
+++ b/src/api/salesManagement/deliveryLedger.js
@@ -18,6 +18,14 @@
data: query,
});
}
+// 淇敼鍙戣揣鍙拌处
+export function deductStock(query) {
+ return request({
+ url: "/shippingInfo/deductStock",
+ method: "post",
+ data: query,
+ });
+}
// 鍒犻櫎鍙戣揣鍙拌处
export function delDeliveryLedger(query) {
diff --git a/src/views/collaborativeApproval/knowledgeBase/index.vue b/src/views/collaborativeApproval/knowledgeBase/index.vue
index aeb1ba4..f7a1ef3 100644
--- a/src/views/collaborativeApproval/knowledgeBase/index.vue
+++ b/src/views/collaborativeApproval/knowledgeBase/index.vue
@@ -46,11 +46,13 @@
</div>
<!-- 鏂板/缂栬緫鐭ヨ瘑寮圭獥 -->
- <el-dialog
+ <FormDialog
v-model="dialogVisible"
:title="dialogTitle"
- width="800px"
- :close-on-click-modal="false"
+ :width="'800px'"
+ @close="closeKnowledgeDialog"
+ @confirm="submitForm"
+ @cancel="closeKnowledgeDialog"
>
<el-form ref="formRef" :model="form" :rules="rules" label-width="120px">
<el-row :gutter="20">
@@ -115,7 +117,14 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="鍒涘缓浜�" prop="creator">
- <el-input v-model="form.creator" placeholder="璇疯緭鍏ュ垱寤轰汉" />
+ <el-select v-model="form.creator" placeholder="璇烽�夋嫨鍒涘缓浜�" style="width: 100%" filterable>
+ <el-option
+ v-for="user in userList"
+ :key="user.userId"
+ :label="user.nickName"
+ :value="user.nickName"
+ />
+ </el-select>
</el-form-item>
</el-col>
<el-col :span="12">
@@ -125,20 +134,16 @@
</el-col>
</el-row>
</el-form>
- <template #footer>
- <span class="dialog-footer">
- <el-button @click="dialogVisible = false">鍙栨秷</el-button>
- <el-button type="primary" @click="submitForm">纭畾</el-button>
- </span>
- </template>
- </el-dialog>
+ </FormDialog>
<!-- 鏌ョ湅鐭ヨ瘑璇︽儏寮圭獥 -->
- <el-dialog
+ <FormDialog
v-model="viewDialogVisible"
title="鐭ヨ瘑璇︽儏"
- width="900px"
- :close-on-click-modal="false"
+ :width="'900px'"
+ @close="closeViewDialog"
+ @confirm="handleViewDialogConfirm"
+ @cancel="closeViewDialog"
>
<div class="knowledge-detail">
<el-descriptions :column="2" border>
@@ -183,7 +188,7 @@
<h4>鍏抽敭瑕佺偣</h4>
<div class="key-points">
<el-tag
- v-for="(point, index) in currentKnowledge.keyPoints.split(',')"
+ v-for="(point, index) in currentKnowledge.keyPoints?.split(',') || []"
:key="index"
type="success"
style="margin-right: 8px; margin-bottom: 8px;"
@@ -219,24 +224,19 @@
</div>
</div>
</div>
-
- <template #footer>
- <span class="dialog-footer">
- <el-button @click="viewDialogVisible = false">鍏抽棴</el-button>
- <el-button type="primary" @click="copyKnowledge">澶嶅埗鐭ヨ瘑</el-button>
- <!-- <el-button type="success" @click="markAsFavorite">鏀惰棌@</el-button> -->
- </span>
- </template>
- </el-dialog>
+ </FormDialog>
</div>
</template>
<script setup>
import { Search } from "@element-plus/icons-vue";
-import { onMounted, ref, reactive, toRefs, getCurrentInstance, computed } from "vue";
+import { onMounted, ref, reactive, toRefs, getCurrentInstance, computed, watch } from "vue";
import { ElMessage, ElMessageBox } from "element-plus";
import PIMTable from "@/components/PIMTable/PIMTable.vue";
+import FormDialog from '@/components/Dialog/FormDialog.vue';
import { listKnowledgeBase, delKnowledgeBase,addKnowledgeBase,updateKnowledgeBase } from "@/api/collaborativeApproval/knowledgeBase.js";
+import useUserStore from '@/store/modules/user';
+import { userListNoPageByTenantId } from '@/api/system/user.js';
// 琛ㄥ崟楠岃瘉瑙勫垯
const rules = {
@@ -302,6 +302,9 @@
// 琛ㄥ崟寮曠敤
const formRef = ref();
+// 鐢ㄦ埛鐩稿叧
+const userStore = useUserStore();
+const userList = ref([]);
// 琛ㄦ牸鍒楅厤缃�
const tableColumn = ref([
@@ -389,6 +392,15 @@
}
]);
+// 鐩戝惉瀵硅瘽妗嗘墦寮�锛岃幏鍙栫敤鎴峰垪琛�
+watch(dialogVisible, (newVal) => {
+ if (newVal) {
+ userListNoPageByTenantId().then((res) => {
+ userList.value = res.data || [];
+ });
+ }
+});
+
// 鐢熷懡鍛ㄦ湡
onMounted(() => {
getList();
@@ -414,7 +426,7 @@
.then(res => {
tableLoading.value = false;
tableData.value = res.data.records
- page.total = res.data.total;
+ page.value.total = res.data.total;
}).catch(err => {
tableLoading.value = false;
})
@@ -437,7 +449,7 @@
dialogType.value = type;
if (type === "add") {
dialogTitle.value = "鏂板鐭ヨ瘑";
- // 閲嶇疆琛ㄥ崟
+ // 閲嶇疆琛ㄥ崟锛岄粯璁ゅ垱寤轰汉涓哄綋鍓嶇敤鎴�
Object.assign(form.value, {
title: "",
type: "",
@@ -446,7 +458,7 @@
problem: "",
solution: "",
keyPoints: "",
- creator: "",
+ creator: userStore.nickName || "",
usageCount: 0
});
} else if (type === "edit" && row) {
@@ -550,6 +562,39 @@
});
};
+// 鍏抽棴鐭ヨ瘑琛ㄥ崟瀵硅瘽妗�
+const closeKnowledgeDialog = () => {
+ // 娓呯┖琛ㄥ崟鏁版嵁锛岄粯璁ゅ垱寤轰汉涓哄綋鍓嶇敤鎴�
+ Object.assign(form.value, {
+ id: undefined,
+ title: "",
+ type: "",
+ scenario: "",
+ efficiency: "",
+ problem: "",
+ solution: "",
+ keyPoints: "",
+ creator: userStore.nickName || "",
+ usageCount: 0
+ });
+ // 娓呴櫎琛ㄥ崟楠岃瘉鐘舵��
+ if (formRef.value) {
+ formRef.value.clearValidate();
+ }
+ dialogVisible.value = false;
+};
+
+// 鍏抽棴鏌ョ湅璇︽儏瀵硅瘽妗�
+const closeViewDialog = () => {
+ viewDialogVisible.value = false;
+};
+
+// 澶勭悊鏌ョ湅璇︽儏瀵硅瘽妗嗙‘璁わ紙鎵ц澶嶅埗鎿嶄綔锛�
+const handleViewDialogConfirm = () => {
+ copyKnowledge();
+ closeViewDialog();
+};
+
// 鎻愪氦鐭ヨ瘑琛ㄥ崟
const submitForm = async () => {
try {
@@ -559,7 +604,7 @@
addKnowledgeBase({...form.value}).then(res => {
if(res.code == 200){
ElMessage.success("娣诲姞鎴愬姛");
- dialogVisible.value = false;
+ closeKnowledgeDialog();
getList();
}
}).catch(err => {
@@ -569,7 +614,7 @@
updateKnowledgeBase({...form.value}).then(res => {
if(res.code == 200){
ElMessage.success("鏇存柊鎴愬姛");
- dialogVisible.value = false;
+ closeKnowledgeDialog();
getList();
}
}).catch(err => {
diff --git a/src/views/collaborativeApproval/notificationManagement/meetApplication/index.vue b/src/views/collaborativeApproval/notificationManagement/meetApplication/index.vue
index ed2dafa..4fc7088 100644
--- a/src/views/collaborativeApproval/notificationManagement/meetApplication/index.vue
+++ b/src/views/collaborativeApproval/notificationManagement/meetApplication/index.vue
@@ -127,7 +127,7 @@
<el-option
v-for="person in employees"
:key="person.id"
- :label="`${person.staffName} (${person.postName})`"
+ :label="`${person.staffName}${person.postName ? ` (${person.postName})` : ''}`"
:value="person.id"
/>
</el-select>
@@ -307,7 +307,7 @@
size: -1,
staffState: 1
}).then(res => {
- employees.value = res.data.records.sort((a, b) => a.postName.localeCompare(b.postName))
+ employees.value = res.data.records.sort((a, b) => (a.postName || '').localeCompare(b.postName || ''))
})
})
</script>
diff --git a/src/views/collaborativeApproval/notificationManagement/meetExamine/index.vue b/src/views/collaborativeApproval/notificationManagement/meetExamine/index.vue
index 157b6b5..26e2c24 100644
--- a/src/views/collaborativeApproval/notificationManagement/meetExamine/index.vue
+++ b/src/views/collaborativeApproval/notificationManagement/meetExamine/index.vue
@@ -240,7 +240,7 @@
it.participants = staffList.value.filter(staff => staffs.some(id=>id === staff.id)).map(staff => {
return {
id: staff.id,
- name: `${staff.staffName}(${staff.postName})`
+ name: `${staff.staffName}${staff.postName ? ` (${staff.postName})` : ''}`
}
})
diff --git a/src/views/collaborativeApproval/notificationManagement/meetPublish/index.vue b/src/views/collaborativeApproval/notificationManagement/meetPublish/index.vue
index a85de7f..dace531 100644
--- a/src/views/collaborativeApproval/notificationManagement/meetPublish/index.vue
+++ b/src/views/collaborativeApproval/notificationManagement/meetPublish/index.vue
@@ -239,7 +239,7 @@
it.participants = staffList.value.filter(staff => staffs.some(id=>id === staff.id)).map(staff => {
return {
id: staff.id,
- name: `${staff.staffName}(${staff.postName})`
+ name: `${staff.staffName}${staff.postName ? ` (${staff.postName})` : ''}`
}
})
diff --git a/src/views/collaborativeApproval/notificationManagement/summary/index.vue b/src/views/collaborativeApproval/notificationManagement/summary/index.vue
index f94e548..2b26723 100644
--- a/src/views/collaborativeApproval/notificationManagement/summary/index.vue
+++ b/src/views/collaborativeApproval/notificationManagement/summary/index.vue
@@ -214,7 +214,7 @@
it.participants = staffList.value.filter(staff => staffs.some(id => id === staff.id)).map(staff => {
return {
id: staff.id,
- name: `${staff.staffName}(${staff.postName})`
+ name: `${staff.staffName}${staff.postName ? ` (${staff.postName})` : ''}`
}
})
diff --git a/src/views/collaborativeApproval/sealManagement/index.vue b/src/views/collaborativeApproval/sealManagement/index.vue
index 04ecfc4..5193aa9 100644
--- a/src/views/collaborativeApproval/sealManagement/index.vue
+++ b/src/views/collaborativeApproval/sealManagement/index.vue
@@ -82,7 +82,14 @@
</el-card>
<!-- 鐢ㄥ嵃鐢宠瀵硅瘽妗� -->
- <el-dialog v-model="showSealApplyDialog" title="鐢宠鐢ㄥ嵃" width="600px">
+ <FormDialog
+ v-model="showSealApplyDialog"
+ title="鐢宠鐢ㄥ嵃"
+ :width="'600px'"
+ @close="closeSealApplyDialog"
+ @confirm="submitSealApplication"
+ @cancel="closeSealApplyDialog"
+ >
<el-form :model="sealForm" :rules="sealRules" ref="sealFormRef" label-width="100px">
<el-form-item label="鐢宠缂栧彿" prop="applicationNum">
<el-input v-model="sealForm.applicationNum" placeholder="璇疯緭鍏ョ敵璇风紪鍙�" />
@@ -119,13 +126,7 @@
</el-radio-group>
</el-form-item>
</el-form>
- <template #footer>
- <span class="dialog-footer">
- <el-button @click="showSealApplyDialog = false">鍙栨秷</el-button>
- <el-button type="primary" @click="submitSealApplication">鎻愪氦鐢宠</el-button>
- </span>
- </template>
- </el-dialog>
+ </FormDialog>
<!-- 瑙勭珷鍒跺害鍙戝竷瀵硅瘽妗� -->
<!-- <el-dialog v-model="showRegulationDialog" :title="operationType === 'add' ? '鍙戝竷鍒跺害' : '缂栬緫鍒跺害'" width="800px">
@@ -177,10 +178,17 @@
</el-dialog> -->
<!-- 鐢ㄥ嵃璇︽儏瀵硅瘽妗� -->
- <el-dialog v-model="showSealDetailDialog" title="鐢ㄥ嵃鐢宠璇︽儏" width="700px">
+ <FormDialog
+ v-model="showSealDetailDialog"
+ title="鐢ㄥ嵃鐢宠璇︽儏"
+ :width="'700px'"
+ @close="closeSealDetailDialog"
+ @confirm="closeSealDetailDialog"
+ @cancel="closeSealDetailDialog"
+ >
<div v-if="currentSealDetail" class="mb10">
<el-descriptions :column="2" border>
- <el-descriptions-item label="鐢宠缂栧彿">{{ currentSealDetail.id }}</el-descriptions-item>
+ <el-descriptions-item label="鐢宠缂栧彿">{{ currentSealDetail.applicationNum }}</el-descriptions-item>
<el-descriptions-item label="鐢宠鏍囬">{{ currentSealDetail.title }}</el-descriptions-item>
<el-descriptions-item label="鐢宠浜�">{{ currentSealDetail.createUserName }}</el-descriptions-item>
<el-descriptions-item label="鎵�灞為儴闂�">{{ currentSealDetail.department }}</el-descriptions-item>
@@ -194,10 +202,17 @@
<el-descriptions-item label="鐢宠鍘熷洜" :span="2">{{ currentSealDetail.reason }}</el-descriptions-item>
</el-descriptions>
</div>
- </el-dialog>
+ </FormDialog>
<!-- 瑙勭珷鍒跺害璇︽儏瀵硅瘽妗� -->
- <el-dialog v-model="showRegulationDetailDialog" title="瑙勭珷鍒跺害璇︽儏" width="800px">
+ <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>
@@ -216,10 +231,17 @@
<el-button type="success" @click="resetForm(currentRegulationDetail)">纭鏌ョ湅</el-button>
</div>
</div>
- </el-dialog>
+ </FormDialog>
<!-- 鐗堟湰鍘嗗彶瀵硅瘽妗� -->
- <el-dialog v-model="showVersionHistoryDialog" title="鐗堟湰鍘嗗彶" width="800px">
+ <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" />
@@ -232,10 +254,17 @@
</template>
</el-table-column>
</el-table>
- </el-dialog>
+ </FormDialog>
<!-- 闃呰鐘舵�佸璇濇 -->
- <el-dialog v-model="showReadStatusDialog" title="闃呰鐘舵��" width="800px">
+ <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" />
@@ -249,7 +278,7 @@
</template>
</el-table-column>
</el-table>
- </el-dialog>
+ </FormDialog>
</div>
</template>
@@ -263,7 +292,8 @@
import { getUserProfile, 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 {staffOnJobListPage} from "@/api/personnelManagement/staffOnJob.js"
+import FormDialog from '@/components/Dialog/FormDialog.vue'
// 鍝嶅簲寮忔暟鎹�
const currentUser = ref(null)
@@ -434,7 +464,7 @@
addSealApplication(sealForm).then(res => {
if(res.code == 200){
ElMessage.success('鐢宠鎻愪氦鎴愬姛')
- showSealApplyDialog.value = false
+ closeSealApplyDialog()
getSealApplicationList()
Object.assign(sealForm, {
applicationNum: '',
@@ -447,12 +477,53 @@
})
}
}).catch(err => {
- ElMessage.error(err.msg)
+ console.log(err.msg)
})
} catch (error) {
- ElMessage.error('璇峰畬鍠勭敵璇蜂俊鎭�')
}
+}
+// 鍏抽棴鐢ㄥ嵃鐢宠瀵硅瘽妗�
+const closeSealApplyDialog = () => {
+ // 娓呯┖琛ㄥ崟鏁版嵁
+ Object.assign(sealForm, {
+ applicationNum: '',
+ title: '',
+ sealType: '',
+ reason: '',
+ approveUserId: '',
+ urgency: 'normal',
+ status: 'pending'
+ })
+ // 娓呴櫎琛ㄥ崟楠岃瘉鐘舵��
+ if (sealFormRef.value) {
+ sealFormRef.value.clearValidate()
+ }
+ showSealApplyDialog.value = false
+}
+// 鍏抽棴鐢ㄥ嵃璇︽儏瀵硅瘽妗�
+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 = () => {
@@ -735,6 +806,13 @@
})
}
+// 鍒嗛〉鍙樺寲澶勭悊
+const paginationChange = (obj) => {
+ page.current = obj.page;
+ page.size = obj.limit;
+ getSealApplicationList();
+};
+
// 鐩戝惉瀵硅瘽妗嗘墦寮�锛岃幏鍙栫敤鎴峰垪琛�
watch(showSealApplyDialog, (newVal) => {
if (newVal) {
diff --git a/src/views/productionManagement/productionCosting/index.vue b/src/views/productionManagement/productionCosting/index.vue
index 229bf04..fd3a11b 100644
--- a/src/views/productionManagement/productionCosting/index.vue
+++ b/src/views/productionManagement/productionCosting/index.vue
@@ -1,45 +1,40 @@
<template>
<div class="app-container">
- <div class="search_form">
- <div>
- <span class="search_title">鐢熶骇鏃ユ湡锛�</span>
- <el-date-picker v-model="searchForm.entryDate" value-format="YYYY-MM-DD" format="YYYY-MM-DD" type="daterange"
- placeholder="璇烽�夋嫨" clearable @change="changeDaterange" />
- <span class="search_title ml10">鐢熶骇浜猴細</span>
- <el-input
- v-model="searchForm.schedulingUserName"
- style="width: 240px"
- placeholder="璇疯緭鍏�"
- @change="handleQuery"
- clearable
- prefix-icon="Search"
- />
- <span class="search_title ml10">鍚堝悓鍙凤細</span>
- <el-input
- v-model="searchForm.salesContractNo"
- style="width: 240px"
- placeholder="璇疯緭鍏�"
- @change="handleQuery"
- clearable
- prefix-icon="Search"
- />
- <el-button type="primary" @click="handleQuery" style="margin-left: 10px"
- >鎼滅储</el-button
- >
+ <div class="content-layout">
+ <!-- 宸︿晶鍙拌处 + 椤堕儴绛涢�� -->
+ <div class="left-panel">
+ <div class="left-header">
+ <!-- <div class="left-title">鐢熶骇鍙拌处</div> -->
+ <el-radio-group v-model="dateType" size="small" @change="handleDateTypeChange">
+ <el-radio-button label="day">鏃�</el-radio-button>
+ <el-radio-button label="month">鏈�</el-radio-button>
+ </el-radio-group>
+
+ </div>
+ <PIMTable
+ rowKey="id"
+ :column="leftTableColumn"
+ :tableData="leftTableData"
+ :tableLoading="tableLoading"
+ @rowClick="handleLeftRowClick"
+ ></PIMTable>
</div>
- <div>
- <el-button @click="handleOut">瀵煎嚭</el-button>
+
+ <!-- 鍙充晶鏄庣粏锛堝師鏈夊唴瀹癸級 -->
+ <div class="right-panel">
+ <div class="header-filters">
+ <el-button @click="handleOut" class="ml10">瀵煎嚭</el-button>
+ </div>
+ <PIMTable
+ rowKey="id"
+ :column="tableColumn"
+ :tableData="tableData"
+ :page="page"
+ :tableLoading="tableLoading"
+ style="margin-right: 20px;"
+ @pagination="pagination"
+ ></PIMTable>
</div>
- </div>
- <div class="table_list">
- <PIMTable
- rowKey="id"
- :column="tableColumn"
- :tableData="tableData"
- :page="page"
- :tableLoading="tableLoading"
- @pagination="pagination"
- ></PIMTable>
</div>
</div>
</template>
@@ -119,8 +114,36 @@
width: 100,
},
]);
+
+// 宸︿晶姹囨�诲彴璐﹀垪锛堢敓浜т汉銆佷骇閲忋�佸伐璧勩�佸悎鏍肩巼锛�
+const leftTableColumn = ref([
+ {
+ label: "鐢熶骇浜�",
+ prop: "schedulingUserName",
+ width: 120,
+ },
+ {
+ label: "浜ч噺",
+ prop: "finishedNum",
+ width: 100,
+ },
+ {
+ label: "宸ヨ祫",
+ prop: "wages",
+ width: 100,
+ },
+ {
+ label: "鍚堟牸鐜�",
+ prop: "qualifiedRate",
+ width: 100,
+ },
+]);
+
const tableData = ref([]);
const tableLoading = ref(false);
+const leftTableData = ref([]);
+// 鏃� / 鏈� 鍒囨崲锛堥粯璁ゆ寜鏃ワ級
+const dateType = ref("day");
const page = reactive({
current: 1,
size: 100,
@@ -165,12 +188,50 @@
const getList = () => {
tableLoading.value = true;
const params = { ...searchForm.value, ...page };
+ params.dateType = dateType.value;
params.entryDate = undefined
productionAccountingListPage(params).then((res) => {
tableLoading.value = false;
- tableData.value = res.data.records;
- page.total = res.data.total;
+ const records = res.data.records || [];
+ tableData.value = records;
+ page.total = res.data.total || 0;
+ buildLeftTableData(records);
});
+};
+
+// 鏋勫缓宸︿晶姹囨�诲彴璐︼紙鎸夌敓浜т汉姹囨�讳骇閲忋�佸伐璧勭瓑锛�
+const buildLeftTableData = (records) => {
+ const map = {};
+ records.forEach((item) => {
+ const key = item.schedulingUserName || "鏈煡";
+ if (!map[key]) {
+ map[key] = {
+ id: key,
+ schedulingUserName: key,
+ finishedNum: 0,
+ wages: 0,
+ qualifiedRate: item.qualifiedRate ?? null,
+ };
+ }
+ map[key].finishedNum += Number(item.finishedNum || 0);
+ map[key].wages += Number(item.wages || 0);
+ if (item.qualifiedRate != null) {
+ map[key].qualifiedRate = item.qualifiedRate;
+ }
+ });
+ leftTableData.value = Object.values(map);
+};
+
+// 宸︿晶鏃�/鏈堝垏鎹�
+const handleDateTypeChange = () => {
+ // 杩欓噷鍙綔涓虹瓫閫夋潯浠剁殑涓�閮ㄥ垎锛岀洿鎺ラ噸鏂版煡璇㈠垪琛�
+ handleQuery();
+};
+
+// 鐐瑰嚮宸︿晶琛岋紝鍒峰彸渚ф槑缁嗭紙鎸夌敓浜т汉杩囨护锛�
+const handleLeftRowClick = (row) => {
+ searchForm.value.schedulingUserName = row.schedulingUserName || "";
+ handleQuery();
};
// 瀵煎嚭
@@ -193,4 +254,53 @@
});
</script>
-<style scoped lang="scss"></style>
+<style scoped lang="scss">
+.content-layout {
+ display: flex;
+ gap: 16px;
+}
+
+.left-panel {
+ flex: 0 0 50%;
+ max-width: 50%;
+ display: flex;
+ flex-direction: column;
+ gap: 10px;
+}
+
+.right-panel {
+ flex: 0 0 50%;
+ max-width: 49%;
+ display: flex;
+ flex-direction: column;
+ gap: 10px;
+}
+
+.left-header {
+ display: flex;
+ align-items: center;
+ gap: 12px;
+ margin-bottom: 8px;
+}
+
+.left-title {
+ font-size: 16px;
+ color: #ffffff;
+}
+
+.header-filters {
+ display: flex;
+ align-items: center;
+ flex: 1;
+ justify-content: flex-end;
+ gap: 8px;
+}
+
+.search_title {
+ color: #ffffff;
+}
+
+.ml10 {
+ margin-left: 10px;
+}
+</style>
diff --git a/src/views/qualityManagement/finalInspection/components/filesDia.vue b/src/views/qualityManagement/finalInspection/components/filesDia.vue
index 51dd78f..8cda761 100644
--- a/src/views/qualityManagement/finalInspection/components/filesDia.vue
+++ b/src/views/qualityManagement/finalInspection/components/filesDia.vue
@@ -26,20 +26,14 @@
rowKey="id"
:column="tableColumn"
:tableData="tableData"
+ :page="page"
:tableLoading="tableLoading"
:isSelection="true"
@selection-change="handleSelectionChange"
+ @pagination="paginationSearch"
height="500"
>
</PIMTable>
- <pagination
- style="margin: 10px 0"
- v-show="total > 0"
- @pagination="paginationSearch"
- :total="total"
- :page="page.current"
- :limit="page.size"
- />
<template #footer>
<div class="dialog-footer">
<el-button @click="closeDia">鍙栨秷</el-button>
@@ -64,7 +58,6 @@
qualityInspectFileDel,
qualityInspectFileListPage
} from "@/api/qualityManagement/qualityInspectFile.js";
-import Pagination from "@/components/PIMTable/Pagination.vue";
const { proxy } = getCurrentInstance()
const emit = defineEmits(['close'])
@@ -94,8 +87,8 @@
const page = reactive({
current: 1,
size: 100,
+ total: 0,
});
-const total = ref(0);
const tableData = ref([]);
const fileList = ref([]);
const tableLoading = ref(false);
@@ -116,9 +109,9 @@
getList();
};
const getList = () => {
- qualityInspectFileListPage({inspectId: currentId.value}).then(res => {
+ qualityInspectFileListPage({inspectId: currentId.value, ...page}).then(res => {
tableData.value = res.data.records;
- total.value = res.data.total;
+ page.total = res.data.total;
})
}
// 琛ㄦ牸閫夋嫨鏁版嵁
diff --git a/src/views/qualityManagement/processInspection/components/filesDia.vue b/src/views/qualityManagement/processInspection/components/filesDia.vue
index fb47850..b0cb258 100644
--- a/src/views/qualityManagement/processInspection/components/filesDia.vue
+++ b/src/views/qualityManagement/processInspection/components/filesDia.vue
@@ -26,20 +26,14 @@
rowKey="id"
:column="tableColumn"
:tableData="tableData"
+ :page="page"
:tableLoading="tableLoading"
:isSelection="true"
@selection-change="handleSelectionChange"
+ @pagination="paginationSearch"
height="500"
>
</PIMTable>
- <pagination
- style="margin: 10px 0"
- v-show="total > 0"
- @pagination="paginationSearch"
- :total="total"
- :page="page.current"
- :limit="page.size"
- />
<template #footer>
<div class="dialog-footer">
<el-button @click="closeDia">鍙栨秷</el-button>
@@ -60,7 +54,6 @@
qualityInspectFileDel,
qualityInspectFileListPage
} from "@/api/qualityManagement/qualityInspectFile.js";
-import Pagination from "@/components/PIMTable/Pagination.vue";
const { proxy } = getCurrentInstance()
const emit = defineEmits(['close'])
@@ -98,8 +91,8 @@
const page = reactive({
current: 1,
size: 100,
+ total: 0,
});
-const total = ref(0);
const tableData = ref([]);
const fileList = ref([]);
const tableLoading = ref(false);
@@ -120,9 +113,9 @@
getList();
};
const getList = () => {
- qualityInspectFileListPage({inspectId: currentId.value}).then(res => {
+ qualityInspectFileListPage({inspectId: currentId.value, ...page}).then(res => {
tableData.value = res.data.records;
- total.value = res.data.total;
+ page.total = res.data.total;
})
}
// 琛ㄦ牸閫夋嫨鏁版嵁
diff --git a/src/views/qualityManagement/rawMaterialInspection/components/filesDia.vue b/src/views/qualityManagement/rawMaterialInspection/components/filesDia.vue
index 9907fbe..9b89a3b 100644
--- a/src/views/qualityManagement/rawMaterialInspection/components/filesDia.vue
+++ b/src/views/qualityManagement/rawMaterialInspection/components/filesDia.vue
@@ -26,20 +26,14 @@
rowKey="id"
:column="tableColumn"
:tableData="tableData"
+ :page="page"
:tableLoading="tableLoading"
:isSelection="true"
@selection-change="handleSelectionChange"
+ @pagination="paginationSearch"
height="500"
>
</PIMTable>
- <pagination
- style="margin: 10px 0"
- v-show="total > 0"
- @pagination="paginationSearch"
- :total="total"
- :page="page.current"
- :limit="page.size"
- />
<template #footer>
<div class="dialog-footer">
<el-button @click="closeDia">鍙栨秷</el-button>
@@ -60,7 +54,6 @@
qualityInspectFileDel,
qualityInspectFileListPage
} from "@/api/qualityManagement/qualityInspectFile.js";
-import Pagination from "@/components/PIMTable/Pagination.vue";
const { proxy } = getCurrentInstance()
const emit = defineEmits(['close'])
@@ -97,8 +90,8 @@
const page = reactive({
current: 1,
size: 100,
+ total: 0,
});
-const total = ref(0);
const tableData = ref([]);
const fileList = ref([]);
const tableLoading = ref(false);
@@ -122,7 +115,7 @@
const getList = () => {
qualityInspectFileListPage({inspectId: currentId.value, ...page}).then(res => {
tableData.value = res.data.records;
- total.value = res.data.total;
+ page.total = res.data.total;
})
}
// 琛ㄦ牸閫夋嫨鏁版嵁
diff --git a/src/views/reportAnalysis/PSIDataAnalysis/components/left-bottom.vue b/src/views/reportAnalysis/PSIDataAnalysis/components/left-bottom.vue
index 3970b71..7daf096 100644
--- a/src/views/reportAnalysis/PSIDataAnalysis/components/left-bottom.vue
+++ b/src/views/reportAnalysis/PSIDataAnalysis/components/left-bottom.vue
@@ -1,6 +1,6 @@
<template>
<div>
- <PanelHeader title="浜у搧閲囪喘閲戦鍒嗘瀽" />
+ <PanelHeader title="閲囪喘鍝佸垎甯�" />
<div class="main-panel panel-item-customers">
<CarouselCards :items="cardItems" :visible-count="3" />
<div class="pie-chart-wrapper">
diff --git a/src/views/reportAnalysis/PSIDataAnalysis/components/left-top.vue b/src/views/reportAnalysis/PSIDataAnalysis/components/left-top.vue
index d4c1b76..581020d 100644
--- a/src/views/reportAnalysis/PSIDataAnalysis/components/left-top.vue
+++ b/src/views/reportAnalysis/PSIDataAnalysis/components/left-top.vue
@@ -1,6 +1,6 @@
<template>
<div>
- <PanelHeader title="浜у搧閿�鍞噾棰濆垎鏋�" />
+ <PanelHeader title="閿�鍞搧鍒嗗竷" />
<div class="main-panel panel-item-customers">
<CarouselCards :items="cardItems" :visible-count="3" />
<div class="pie-chart-wrapper">
diff --git a/src/views/reportAnalysis/dataDashboard/components/basic/right-bottom.vue b/src/views/reportAnalysis/dataDashboard/components/basic/right-bottom.vue
index 4b99833..bbcd5f0 100644
--- a/src/views/reportAnalysis/dataDashboard/components/basic/right-bottom.vue
+++ b/src/views/reportAnalysis/dataDashboard/components/basic/right-bottom.vue
@@ -1,6 +1,6 @@
<template>
<div>
- <PanelHeader title="瀹㈡埛閲戦璐$尞鎺掑悕" />
+ <PanelHeader title="瀹㈡埛璐$尞鎺掑悕" />
<div class="panel-item-customers">
<div class="switch-container">
<DateTypeSwitch v-model="dateType" @change="handleDateTypeChange" />
diff --git a/src/views/reportAnalysis/financialAnalysis/components/center-top.vue b/src/views/reportAnalysis/financialAnalysis/components/center-top.vue
index fc61311..d46a0ac 100644
--- a/src/views/reportAnalysis/financialAnalysis/components/center-top.vue
+++ b/src/views/reportAnalysis/financialAnalysis/components/center-top.vue
@@ -47,7 +47,7 @@
</div>
<div class="card-right">
<div class="metric-row">
- <span class="metric-label">鍑�鍒╂鼎</span>
+ <span class="metric-label">浠樻鐜�</span>
<span class="metric-value metric-down">{{ expense.netProfit }}</span>
</div>
<div class="metric-row">
diff --git a/src/views/salesManagement/deliveryLedger/index.vue b/src/views/salesManagement/deliveryLedger/index.vue
index 983a3e5..52e14cb 100644
--- a/src/views/salesManagement/deliveryLedger/index.vue
+++ b/src/views/salesManagement/deliveryLedger/index.vue
@@ -52,7 +52,7 @@
type="primary"
size="small"
:disabled="isApproving(scope.row.status)"
- @click="openForm('edit', scope.row)">缂栬緫</el-button>
+ @click="openForm('edit', scope.row)">琛ュ厖鍙戣揣淇℃伅</el-button>
<el-button
link
type="danger"
@@ -177,9 +177,9 @@
import { getToken } from "@/utils/auth";
import { getCurrentDate } from "@/utils/index.js";
import {
- deliveryLedgerListPage,
- addOrUpdateDeliveryLedger,
- delDeliveryLedger,
+ deliveryLedgerListPage,
+ addOrUpdateDeliveryLedger,
+ delDeliveryLedger, deductStock,
} from "@/api/salesManagement/deliveryLedger.js";
import { delLedgerFile } from "@/api/salesManagement/salesLedger.js";
@@ -392,7 +392,7 @@
expressNumber: form.value.type === "蹇��" ? form.value.expressNumber : "",
tempFileIds: tempFileIds,
};
- addOrUpdateDeliveryLedger(payload).then((res) => {
+ deductStock(payload).then((res) => {
proxy.$modal.msgSuccess("鎿嶄綔鎴愬姛");
closeDia();
getList();
diff --git a/src/views/salesManagement/salesQuotation/index.vue b/src/views/salesManagement/salesQuotation/index.vue
index cbbc4f8..d6f6c80 100644
--- a/src/views/salesManagement/salesQuotation/index.vue
+++ b/src/views/salesManagement/salesQuotation/index.vue
@@ -51,7 +51,7 @@
height="calc(100vh - 22em)"
>
<el-table-column align="center" label="搴忓彿" type="index" width="60" />
- <el-table-column prop="quotationNo" label="鎶ヤ环鍗曞彿" width="150" />
+ <el-table-column prop="quotationNo" label="鎶ヤ环鍗曞彿" />
<el-table-column prop="customer" label="瀹㈡埛鍚嶇О" />
<el-table-column prop="salesperson" label="涓氬姟鍛�" width="100" />
<el-table-column prop="quotationDate" label="鎶ヤ环鏃ユ湡" width="120" />
@@ -252,7 +252,7 @@
@change="getProductModel($event, scope.row)"
>
<el-option
- v-for="item in modelOptions"
+ v-for="item in scope.row.modelOptions || []"
:key="item.id"
:label="item.model"
:value="item.id"
@@ -322,7 +322,7 @@
</el-descriptions-item>
</el-descriptions>
- <div style="margin-top: 20px;">
+ <div style="margin: 20px 0;">
<h4>浜у搧鏄庣粏</h4>
<el-table :data="currentQuotation.products" border style="width: 100%">
<el-table-column prop="product" label="浜у搧鍚嶇О" />
@@ -521,7 +521,7 @@
if (!value) {
row.productId = '';
row.product = '';
- modelOptions.value = [];
+ row.modelOptions = [];
row.specificationId = '';
row.specification = '';
row.unit = '';
@@ -534,9 +534,9 @@
if (label) {
row.product = label;
}
- // 鑾峰彇瑙勬牸鍨嬪彿鍒楄〃
+ // 鑾峰彇瑙勬牸鍨嬪彿鍒楄〃锛岃缃埌褰撳墠琛岀殑 modelOptions
modelList({ id: value }).then((res) => {
- modelOptions.value = res || [];
+ row.modelOptions = res || [];
});
};
const getProductModel = (value, row) => {
@@ -550,10 +550,11 @@
}
// 鏇存柊 specificationId锛坴-model 宸茬粡鑷姩鏇存柊锛岃繖閲岀‘淇濅竴鑷存�э級
row.specificationId = value;
- const index = modelOptions.value.findIndex((item) => item.id === value);
+ const modelOptions = row.modelOptions || [];
+ const index = modelOptions.findIndex((item) => item.id === value);
if (index !== -1) {
- row.specification = modelOptions.value[index].model;
- row.unit = modelOptions.value[index].unit;
+ row.specification = modelOptions[index].model;
+ row.unit = modelOptions[index].unit;
} else {
row.specification = '';
row.unit = '';
@@ -616,23 +617,46 @@
form.paymentMethod = row.paymentMethod || ''
form.status = row.status || '鑽夌'
form.remark = row.remark || ''
- form.products = row.products ? row.products.map(product => {
+ form.products = row.products ? await Promise.all(row.products.map(async (product) => {
const productName = product.product || product.productName || ''
// 浼樺厛鐢� productId锛涘鏋滃彧鏈夊悕绉帮紝灏濊瘯鍙嶆煡 id 浠ヤ究鏍戦�夋嫨鍣ㄥ弽鏄�
- const resolvedId = product.productId
+ const resolvedProductId = product.productId
? Number(product.productId)
: findNodeIdByLabel(productOptions.value, productName) || ''
+
+ // 濡傛灉鏈変骇鍝両D锛屽姞杞藉搴旂殑瑙勬牸鍨嬪彿鍒楄〃
+ let modelOptions = [];
+ let resolvedSpecificationId = product.specificationId || '';
+
+ if (resolvedProductId) {
+ try {
+ const res = await modelList({ id: resolvedProductId });
+ modelOptions = res || [];
+
+ // 濡傛灉杩斿洖鐨勬暟鎹病鏈� specificationId锛屼絾鏈� specification 鍚嶇О锛屾牴鎹悕绉版煡鎵� ID
+ if (!resolvedSpecificationId && product.specification) {
+ const foundModel = modelOptions.find(item => item.model === product.specification);
+ if (foundModel) {
+ resolvedSpecificationId = foundModel.id;
+ }
+ }
+ } catch (error) {
+ console.error('鍔犺浇瑙勬牸鍨嬪彿澶辫触:', error);
+ }
+ }
+
return {
- productId: resolvedId,
+ productId: resolvedProductId,
product: productName,
- specificationId: product.specificationId || '',
+ specificationId: resolvedSpecificationId,
specification: product.specification || '',
quantity: product.quantity || 0,
unit: product.unit || '',
unitPrice: product.unitPrice || 0,
- amount: product.amount || 0
+ amount: product.amount || 0,
+ modelOptions: modelOptions // 涓烘瘡琛屾坊鍔犵嫭绔嬬殑瑙勬牸鍨嬪彿鍒楄〃
}
- }) : []
+ })) : []
form.subtotal = row.subtotal || 0
form.freight = row.freight || 0
form.otherFee = row.otherFee || 0
@@ -714,7 +738,8 @@
quantity: 1,
unit: '',
unitPrice: 0,
- amount: 0
+ amount: 0,
+ modelOptions: [] // 涓烘瘡琛屾坊鍔犵嫭绔嬬殑瑙勬牸鍨嬪彿鍒楄〃
})
}
--
Gitblit v1.9.3