From 4ec5774fa25119744bf534266d6a09df33cb8fc6 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期五, 30 一月 2026 11:43:42 +0800
Subject: [PATCH] Merge branch 'dev_New' of http://114.132.189.42:9002/r/product-inventory-management into dev_New
---
src/views/financialManagement/expenseManagement/index.vue | 7 +
src/views/productionManagement/productionCosting/index.vue | 123 ++++++++++++++++++------------
src/components/PIMTable/PIMTable.vue | 6 +
src/views/financialManagement/loanManagement/index.vue | 7 +
src/views/financialManagement/revenueManagement/index.vue | 7 +
src/views/salesManagement/salesLedger/index.vue | 44 +++++++++-
src/api/productionManagement/productionCosting.js | 22 +++++
7 files changed, 158 insertions(+), 58 deletions(-)
diff --git a/src/api/productionManagement/productionCosting.js b/src/api/productionManagement/productionCosting.js
index 8cc0251..ebf7daa 100644
--- a/src/api/productionManagement/productionCosting.js
+++ b/src/api/productionManagement/productionCosting.js
@@ -8,4 +8,24 @@
method: "get",
params: query,
});
-}
\ No newline at end of file
+}
+
+// 宸﹁竟琛ㄦ牸鐨勬帴鍙�
+// salesLedger/productionAccounting/page
+export function salesLedgerProductionAccountingList(query) {
+ return request({
+ url: "/salesLedger/productionAccounting/page",
+ method: "get",
+ params: query,
+ });
+}
+
+// 鍙宠竟琛ㄦ牸鐨勬帴鍙�
+//
+export function salesLedgerProductionAccountingListProductionDetails(query) {
+ return request({
+ url: "/salesLedger/productionAccounting/listProductionDetails",
+ method: "get",
+ params: query,
+ });
+}
diff --git a/src/components/PIMTable/PIMTable.vue b/src/components/PIMTable/PIMTable.vue
index dfbc231..a418280 100644
--- a/src/components/PIMTable/PIMTable.vue
+++ b/src/components/PIMTable/PIMTable.vue
@@ -233,7 +233,7 @@
const uploadHeader = proxy.uploadHeader;
const javaApi = proxy.javaApi;
-const emit = defineEmits(["pagination", "expand-change", "selection-change"]);
+const emit = defineEmits(["pagination", "expand-change", "selection-change", "row-click"]);
// Filters
const typeFn = (val, row) => {
@@ -427,6 +427,10 @@
emit("pagination", { page: page, limit: limit });
};
+const rowClick = (row) => {
+ emit("row-click", row);
+};
+
const expandChange = (row, expandedRows) => {
emit("expand-change", row, expandedRows);
};
diff --git a/src/views/financialManagement/expenseManagement/index.vue b/src/views/financialManagement/expenseManagement/index.vue
index 801fa1f..ac55d01 100644
--- a/src/views/financialManagement/expenseManagement/index.vue
+++ b/src/views/financialManagement/expenseManagement/index.vue
@@ -51,6 +51,8 @@
size: pagination.pageSize,
total: pagination.total,
}"
+ :isShowSummary="true"
+ :summaryMethod="summarizeMainTable"
@selection-change="handleSelectionChange"
@pagination="changePage"
>
@@ -202,6 +204,11 @@
]
);
+// 琛ㄦ牸鍚堣锛氭敮鍑洪噾棰�
+const summarizeMainTable = (param) => {
+ return proxy.summarizeTable(param, ["expenseMoney"]);
+};
+
// 澶氶�夊悗鍋氫粈涔�
const handleSelectionChange = (selectionList) => {
multipleList.value = selectionList;
diff --git a/src/views/financialManagement/loanManagement/index.vue b/src/views/financialManagement/loanManagement/index.vue
index 7580d3b..cb52ff1 100644
--- a/src/views/financialManagement/loanManagement/index.vue
+++ b/src/views/financialManagement/loanManagement/index.vue
@@ -64,6 +64,8 @@
size: pagination.pageSize,
total: pagination.total,
}"
+ :isShowSummary="true"
+ :summaryMethod="summarizeMainTable"
@selection-change="handleSelectionChange"
@pagination="changePage"
>
@@ -191,6 +193,11 @@
}
);
+// 琛ㄦ牸鍚堣锛氬�熸閲戦
+const summarizeMainTable = (param) => {
+ return proxy.summarizeTable(param, ["borrowAmount"]);
+};
+
// 澶氶�夊悗鍋氫粈涔�
const handleSelectionChange = (selectionList) => {
multipleList.value = selectionList;
diff --git a/src/views/financialManagement/revenueManagement/index.vue b/src/views/financialManagement/revenueManagement/index.vue
index a8a59c8..12abfe3 100644
--- a/src/views/financialManagement/revenueManagement/index.vue
+++ b/src/views/financialManagement/revenueManagement/index.vue
@@ -51,6 +51,8 @@
size: pagination.pageSize,
total: pagination.total,
}"
+ :isShowSummary="true"
+ :summaryMethod="summarizeMainTable"
@selection-change="handleSelectionChange"
@pagination="changePage"
>
@@ -202,6 +204,11 @@
]
);
+// 琛ㄦ牸鍚堣锛氭敹鍏ラ噾棰�
+const summarizeMainTable = (param) => {
+ return proxy.summarizeTable(param, ["incomeMoney"]);
+};
+
// 澶氶�夊悗鍋氫粈涔�
const handleSelectionChange = (selectionList) => {
multipleList.value = selectionList;
diff --git a/src/views/productionManagement/productionCosting/index.vue b/src/views/productionManagement/productionCosting/index.vue
index fd3a11b..3547087 100644
--- a/src/views/productionManagement/productionCosting/index.vue
+++ b/src/views/productionManagement/productionCosting/index.vue
@@ -16,8 +16,11 @@
:column="leftTableColumn"
:tableData="leftTableData"
:tableLoading="tableLoading"
- @rowClick="handleLeftRowClick"
- ></PIMTable>
+ :page="page"
+ :height="200"
+ @row-click="handleLeftRowClick"
+ @pagination="pagination"
+ ></PIMTable>
</div>
<!-- 鍙充晶鏄庣粏锛堝師鏈夊唴瀹癸級 -->
@@ -29,10 +32,10 @@
rowKey="id"
:column="tableColumn"
:tableData="tableData"
- :page="page"
+ :page="page1"
:tableLoading="tableLoading"
style="margin-right: 20px;"
- @pagination="pagination"
+ @pagination="pagination1"
></PIMTable>
</div>
</div>
@@ -41,77 +44,66 @@
<script setup>
import {onMounted, ref} from "vue";
-import {
- listCustomer,
-} from "@/api/basicData/customerFile.js";
import { ElMessageBox } from "element-plus";
import dayjs from "dayjs";
-import {productionAccountingListPage} from "@/api/productionManagement/productionCosting.js";
+import {salesLedgerProductionAccountingListProductionDetails, salesLedgerProductionAccountingList} from "@/api/productionManagement/productionCosting.js";
const { proxy } = getCurrentInstance();
const tableColumn = ref([
{
label: "鐢熶骇鏃ユ湡",
- prop: "schedulingDate",
- width: 120,
+ prop: "scheduleDate",
+ minWidth: 100,
},
{
label: "鐢熶骇浜�",
prop: "schedulingUserName",
- width: 90,
+ minWidth: 100,
},
{
label: "鍚堝悓鍙�",
prop: "salesContractNo",
- width: 220,
+ minWidth: 100,
},
- // {
- // label: "瀹㈡埛鍚堝悓鍙�",
- // prop: "customerContractNo",
- // width: 250,
- // },
{
label: "瀹㈡埛鍚嶇О",
prop: "customerName",
- width: 250,
+ minWidth: 100,
},
- // {
- // label: "椤圭洰鍚嶇О",
- // prop: "projectName",
- // width:300
- // },
{
label: "浜у搧澶х被",
- prop: "productCategory",
- width: 160,
+ prop: "productName",
+ minWidth: 100,
},
{
label: "瑙勬牸鍨嬪彿",
- prop: "specificationModel",
- width: 160,
+ prop: "productModelName",
+ minWidth: 100,
},
{
label: "鍗曚綅",
prop: "unit",
+ minWidth: 100,
},
{
label: "宸ュ簭",
prop: "process",
+ minWidth: 100,
},
{
label: "鐢熶骇鏁伴噺",
- prop: "finishedNum",
- width: 100,
+ prop: "quantity",
+ minWidth: 100,
},
{
label: "宸ユ椂瀹氶",
prop: "workHours",
- width: 100,
+ minWidth: 100,
},
{
label: "宸ヨ祫",
prop: "wages",
- width: 100,
+ minWidth: 100,
},
]);
@@ -120,27 +112,31 @@
{
label: "鐢熶骇浜�",
prop: "schedulingUserName",
- width: 120,
+ minWidth: 100,
},
{
label: "浜ч噺",
- prop: "finishedNum",
- width: 100,
- },
+ prop: "outputNum",
+ minWidth: 100,
+
+ },
{
label: "宸ヨ祫",
prop: "wages",
- width: 100,
+ minWidth: 100,
+
},
{
label: "鍚堟牸鐜�",
- prop: "qualifiedRate",
- width: 100,
+ prop: "outputRate",
+ minWidth: 100,
+
},
]);
const tableData = ref([]);
const tableLoading = ref(false);
+const tableLoading1 = ref(false);
const leftTableData = ref([]);
// 鏃� / 鏈� 鍒囨崲锛堥粯璁ゆ寜鏃ワ級
const dateType = ref("day");
@@ -148,6 +144,12 @@
current: 1,
size: 100,
total: 0,
+});
+
+const page1 = reactive({
+ current: 1,
+ size: 100,
+ total: 0,
});
const data = reactive({
@@ -164,17 +166,18 @@
});
const { searchForm } = toRefs(data);
-// 鏌ヨ鍒楄〃
-/** 鎼滅储鎸夐挳鎿嶄綔 */
-const handleQuery = () => {
- page.current = 1;
- getList();
-};
const pagination = (obj) => {
page.current = obj.page;
page.size = obj.limit;
getList();
};
+
+const pagination1 = (obj) => {
+ page1.current = obj.page;
+ page1.size = obj.limit;
+ getList1();
+};
+
const changeDaterange = (value) => {
if (value) {
searchForm.value.entryDateStart = dayjs(value[0]).format("YYYY-MM-DD");
@@ -190,13 +193,24 @@
const params = { ...searchForm.value, ...page };
params.dateType = dateType.value;
params.entryDate = undefined
- productionAccountingListPage(params).then((res) => {
+
+ salesLedgerProductionAccountingList(params).then((res) => {
tableLoading.value = false;
const records = res.data.records || [];
- tableData.value = records;
+ leftTableData.value = records;
page.total = res.data.total || 0;
- buildLeftTableData(records);
});
+
+};
+
+const getList1 = () => {
+ tableLoading1.value = true;
+ const params = { ...page1, ...searchForm.value };
+ salesLedgerProductionAccountingListProductionDetails(params).then((res) => {
+ tableLoading1.value = false;
+ tableData.value = res.data.records || [];;
+ page1.total = res.data.total || 0;
+ });
};
// 鏋勫缓宸︿晶姹囨�诲彴璐︼紙鎸夌敓浜т汉姹囨�讳骇閲忋�佸伐璧勭瓑锛�
@@ -225,7 +239,9 @@
// 宸︿晶鏃�/鏈堝垏鎹�
const handleDateTypeChange = () => {
// 杩欓噷鍙綔涓虹瓫閫夋潯浠剁殑涓�閮ㄥ垎锛岀洿鎺ラ噸鏂版煡璇㈠垪琛�
- handleQuery();
+ page.current = 1;
+ getList();
+ handleQuery()
};
// 鐐瑰嚮宸︿晶琛岋紝鍒峰彸渚ф槑缁嗭紙鎸夌敓浜т汉杩囨护锛�
@@ -233,6 +249,14 @@
searchForm.value.schedulingUserName = row.schedulingUserName || "";
handleQuery();
};
+
+// 鏌ヨ鍒楄〃
+/** 鎼滅储鎸夐挳鎿嶄綔 */
+const handleQuery = () => {
+ page1.current = 1;
+ getList1();
+};
+
// 瀵煎嚭
const handleOut = () => {
@@ -257,12 +281,12 @@
<style scoped lang="scss">
.content-layout {
display: flex;
+ flex-direction: column;
gap: 16px;
}
.left-panel {
flex: 0 0 50%;
- max-width: 50%;
display: flex;
flex-direction: column;
gap: 10px;
@@ -270,7 +294,6 @@
.right-panel {
flex: 0 0 50%;
- max-width: 49%;
display: flex;
flex-direction: column;
gap: 10px;
diff --git a/src/views/salesManagement/salesLedger/index.vue b/src/views/salesManagement/salesLedger/index.vue
index 170f8ed..c126b6a 100644
--- a/src/views/salesManagement/salesLedger/index.vue
+++ b/src/views/salesManagement/salesLedger/index.vue
@@ -1362,15 +1362,47 @@
proxy.$modal.msg("宸插彇娑�");
});
};
+/** 鍒ゆ柇閿�鍞鍗曚笅鏄惁瀛樺湪宸插彂璐�/鍙戣揣瀹屾垚鐨勪骇鍝侊紙涓嶅彲鍒犻櫎锛� */
+const hasShippedProducts = (products) => {
+ if (!products || !products.length) return false;
+ return products.some((p) => {
+ const status = String(p.shippingStatus || "").trim();
+ // 鏈夊彂璐ф棩鏈熸垨杞︾墝鍙疯涓哄凡鍙戣揣
+ if (p.shippingDate || p.shippingCarNumber) return true;
+ // 宸茶繘琛屽彂璐с�佸彂璐у畬鎴愩�佸凡鍙戣揣 鍧囦笉鍙垹闄�
+ return status === "宸茶繘琛屽彂璐�" || status === "鍙戣揣瀹屾垚" || status === "宸插彂璐�";
+ });
+};
+
// 鍒犻櫎
-const handleDelete = () => {
- let ids = [];
- if (selectedRows.value.length > 0) {
- ids = selectedRows.value.map((item) => item.id);
- } else {
+const handleDelete = async () => {
+ if (selectedRows.value.length === 0) {
proxy.$modal.msgWarning("璇烽�夋嫨鏁版嵁");
return;
}
+ const ids = selectedRows.value.map((item) => item.id);
+
+ // 妫�鏌ユ槸鍚︽湁宸茶繘琛屽彂璐ф垨鍙戣揣瀹屾垚鐨勯攢鍞鍗曪紝鑻ユ湁鍒欎笉鍏佽鍒犻櫎
+ const cannotDeleteNames = [];
+ for (const row of selectedRows.value) {
+ let products = row.children && row.children.length > 0 ? row.children : null;
+ if (!products) {
+ try {
+ const res = await productList({ salesLedgerId: row.id, type: 1 });
+ products = res.data || [];
+ } catch {
+ products = [];
+ }
+ }
+ if (hasShippedProducts(products)) {
+ cannotDeleteNames.push(row.salesContractNo || `ID:${row.id}`);
+ }
+ }
+ if (cannotDeleteNames.length > 0) {
+ proxy.$modal.msgWarning("宸茶繘琛屽彂璐ф垨鍙戣揣瀹屾垚鐨勯攢鍞鍗曚笉鑳藉垹闄わ細" + cannotDeleteNames.join("銆�"));
+ return;
+ }
+
ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚垹闄わ紝鏄惁纭鍒犻櫎锛�", "瀵煎嚭", {
confirmButtonText: "纭",
cancelButtonText: "鍙栨秷",
@@ -2119,7 +2151,7 @@
}
::v-deep .red {
- background-color: #f80202;
+ background-color: #FAE1DE;
}
::v-deep .purple{
--
Gitblit v1.9.3