From a305a0d7aa39adb735eee56bb0a695f817bd7f4b Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 24 九月 2026 14:53:15 +0800
Subject: [PATCH] 天津-智科电子 1.协同办公-协同审批:待审批节点,第三人账号不可进行修改 2.营销管理-销售台账:勾选单个导出会出现整个导出的情况,但只能显示父项、不能显示子项 3.营销管理-销售台账:点击下拉没有价格,点击详情有价格
---
src/views/officeProcessAutomation/ApproveManage/approve-list/useApproveList.js | 18 +++++++-
src/views/officeProcessAutomation/ApproveManage/approve-list/index.vue | 5 +-
src/views/officeProcessAutomation/ApproveManage/approve-list/approveListConstants.js | 5 +-
src/views/salesManagement/salesLedger/index.vue | 61 ++++++++++--------------------
4 files changed, 42 insertions(+), 47 deletions(-)
diff --git a/src/views/officeProcessAutomation/ApproveManage/approve-list/approveListConstants.js b/src/views/officeProcessAutomation/ApproveManage/approve-list/approveListConstants.js
index e2f1e45..6d6aecf 100644
--- a/src/views/officeProcessAutomation/ApproveManage/approve-list/approveListConstants.js
+++ b/src/views/officeProcessAutomation/ApproveManage/approve-list/approveListConstants.js
@@ -357,8 +357,9 @@
if (isUpdate) {
dto.id = existingRow?.id ?? submitForm?.instanceId;
dto.instanceNo = existingRow?.instanceNo ?? submitForm?.instanceNo ?? "";
- dto.status = submitForm?.saveStatusApi || existingRow?.statusRaw || mapInstanceStatusToApi(existingRow?.approvalStatus) || "PENDING";
- dto.currentLevel = existingRow?.currentLevel ?? submitForm?.currentLevel ?? 1;
+ // 淇敼淇濆瓨鍗抽噸鏂版彁浜わ紝娴佺▼浠庣涓�绾ч噸鏂板紑濮�
+ dto.status = "PENDING";
+ dto.currentLevel = 1;
dto.applicantId = existingRow?.applicantId ?? existingRow?.applicantNo;
dto.applicantName = existingRow?.applicantName || "";
} else {
diff --git a/src/views/officeProcessAutomation/ApproveManage/approve-list/index.vue b/src/views/officeProcessAutomation/ApproveManage/approve-list/index.vue
index 4a9cf29..1ecf8ac 100644
--- a/src/views/officeProcessAutomation/ApproveManage/approve-list/index.vue
+++ b/src/views/officeProcessAutomation/ApproveManage/approve-list/index.vue
@@ -207,7 +207,7 @@
</div>
<template #footer>
<el-button
- v-if="detailRow.approvalStatus === 'pending'"
+ v-if="canEditInstanceRow(detailRow)"
@click="openEditFromDetail"
>
淇� 鏀�
@@ -261,7 +261,7 @@
</template>
<template v-else>
<el-button
- v-if="reimburseDialog.instanceRow?.approvalStatus === 'pending'"
+ v-if="canEditInstanceRow(reimburseDialog.instanceRow)"
@click="openEditFromReimburseDetail"
>
淇� 鏀�
@@ -396,6 +396,7 @@
submitApprove,
openDetail,
openApprove,
+ canEditInstanceRow,
} = al;
const { flowUserOptions, loadFlowUsers } = useFlowUserOptions();
diff --git a/src/views/officeProcessAutomation/ApproveManage/approve-list/useApproveList.js b/src/views/officeProcessAutomation/ApproveManage/approve-list/useApproveList.js
index 25b6ae5..982a19b 100644
--- a/src/views/officeProcessAutomation/ApproveManage/approve-list/useApproveList.js
+++ b/src/views/officeProcessAutomation/ApproveManage/approve-list/useApproveList.js
@@ -48,6 +48,7 @@
mapInstanceFromApi,
mapSubmitTemplateCard,
matchBusinessTypeValue,
+ normalizeApprovalStatusKey,
unwrapInstancePage,
} from "./approveListConstants.js";
@@ -138,6 +139,16 @@
...buildFormPayloadRules(submitFormFields.value),
}));
+ /** 浠呫�屽彂璧蜂汉鏈汉銆嶅湪銆屽凡椹冲洖銆嶇姸鎬佷笅鍙慨鏀� */
+ function canEditInstanceRow(row) {
+ if (!row) return false;
+ const key = normalizeApprovalStatusKey(row.approvalStatus ?? row.statusRaw ?? row.status);
+ if (key !== "rejected") return false;
+ const applicantId = row.applicantId ?? row.applicantNo;
+ if (applicantId == null || applicantId === "") return false;
+ return String(applicantId) === String(userStore.id);
+ }
+
const tableColumn = ref([
// { label: "鐢宠浜虹紪鍙�", prop: "applicantNo", width: 110 },
{ label: "鍙戣捣浜�", prop: "applicantName", minWidth: 100 },
@@ -183,7 +194,7 @@
{
name: "淇敼",
type: "text",
- disabled: (row) => row.approvalStatus !== "pending",
+ disabled: (row) => !canEditInstanceRow(row),
clickFun: (row) => openEditDialog(row),
},
{
@@ -395,8 +406,8 @@
}
async function openEditDialog(row) {
- if (row?.approvalStatus !== "pending") {
- ElMessage.warning("浠呭鏍镐腑鐨勫鎵瑰彲淇敼");
+ if (!canEditInstanceRow(row)) {
+ ElMessage.warning("浠呮湰浜哄彂璧枫�佷笖宸茶椹冲洖鐨勫鎵瑰彲淇敼");
return;
}
const moduleKey = inferReimburseModuleKeyFromInstance(row);
@@ -688,6 +699,7 @@
resetSubmitDialogState,
openSubmitDialog,
openEditDialog,
+ canEditInstanceRow,
onBusinessTypePick,
onTemplatePick,
backToBusinessTypePick,
diff --git a/src/views/salesManagement/salesLedger/index.vue b/src/views/salesManagement/salesLedger/index.vue
index 2b59a94..86deb71 100644
--- a/src/views/salesManagement/salesLedger/index.vue
+++ b/src/views/salesManagement/salesLedger/index.vue
@@ -86,9 +86,7 @@
:data="props.row.children"
border
show-summary
- :summary-method="
- (param) => summarizeChildrenTable(param, props.row)
- "
+ :summary-method="summarizeChildrenTable"
>
<el-table-column align="center" label="搴忓彿" type="index" />
<el-table-column label="浜у搧澶х被" prop="productCategory" />
@@ -158,17 +156,17 @@
<el-table-column
label="鍚◣鍗曚环(鍏�)"
prop="taxInclusiveUnitPrice"
- :formatter="sensitiveAmountFormatter"
+ :formatter="formattedNumber"
/>
<el-table-column
label="鍚◣鎬讳环(鍏�)"
prop="taxInclusiveTotalPrice"
- :formatter="sensitiveAmountFormatter"
+ :formatter="formattedNumber"
/>
<el-table-column
label="涓嶅惈绋庢�讳环(鍏�)"
prop="taxExclusiveTotalPrice"
- :formatter="sensitiveAmountFormatter"
+ :formatter="formattedNumber"
/>
<!--鎿嶄綔-->
<el-table-column Width="60px" label="鎿嶄綔" align="center">
@@ -1585,12 +1583,6 @@
};
const canEditLedger = (row) => isCurrentUserMaintainer(row);
const canDeleteLedger = (row) => isCurrentUserMaintainer(row);
-const sensitiveAmountFormatter = (row, column, cellValue) => {
- if (!isCurrentUserMaintainer(row)) {
- return "*****";
- }
- return formattedNumber(row, column, cellValue);
-};
// 鑾峰彇tree瀛愭暟鎹�
const getModels = (value) => {
productForm.value.productCategory = findNodeById(productOptions.value, value);
@@ -1654,9 +1646,7 @@
// 琛ㄦ牸閫夋嫨鏁版嵁
const handleSelectionChange = (selection) => {
- // 杩囨护鎺夊瓙鏁版嵁
- selectedRows.value = selection.filter((item) => item.children !== undefined);
- console.log("selection", selectedRows.value);
+ selectedRows.value = selection;
};
const productSelected = (selectedRows) => {
productSelectedRows.value = selectedRows;
@@ -1711,25 +1701,7 @@
);
};
// 瀛愯〃鍚堣鏂规硶
-const summarizeChildrenTable = (param, parentRow) => {
- if (!isCurrentUserMaintainer(parentRow)) {
- const { columns } = param;
- return columns.map((column, index) => {
- if (index === 0) {
- return "鍚堣";
- }
- if (
- [
- "taxInclusiveUnitPrice",
- "taxInclusiveTotalPrice",
- "taxExclusiveTotalPrice",
- ].includes(column.property)
- ) {
- return "*****";
- }
- return "";
- });
- }
+const summarizeChildrenTable = (param) => {
return proxy.summarizeTable(
param,
[
@@ -2089,13 +2061,22 @@
// 瀵煎嚭
const handleOut = () => {
- ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚鍑猴紝鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
- confirmButtonText: "纭",
- cancelButtonText: "鍙栨秷",
- type: "warning",
- })
+ ElMessageBox.confirm(
+ "鍕鹃�夌殑鍙拌处灏嗚瀵煎嚭锛涙湭鍕鹃�夊垯瀵煎嚭褰撳墠鎼滅储鏉′欢涓嬬殑鍏ㄩ儴鍙拌处銆傛槸鍚︾‘璁ゅ鍑猴紵",
+ "瀵煎嚭",
+ {
+ confirmButtonText: "纭",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ }
+ )
.then(() => {
- proxy.download("/sales/ledger/export", {}, "閿�鍞彴璐�.xlsx");
+ const { entryDate, ...rest } = searchForm;
+ const params = { ...rest };
+ if (selectedRows.value.length) {
+ params.ids = selectedRows.value.map((item) => item.id);
+ }
+ proxy.download("/sales/ledger/export", params, "閿�鍞彴璐�.xlsx");
})
.catch(() => {
proxy.$modal.msg("宸插彇娑�");
--
Gitblit v1.9.3