From fde27654b1b21a8d2c149d3d12f86c3c7314c091 Mon Sep 17 00:00:00 2001
From: lishenao <3065849776@qq.com>
Date: 星期四, 03 七月 2025 15:00:11 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev
---
src/views/inventoryManagement/dispatchLog/index.vue | 97 +++++++++++++++++++++++++++++++++++++-----------
1 files changed, 75 insertions(+), 22 deletions(-)
diff --git a/src/views/inventoryManagement/dispatchLog/index.vue b/src/views/inventoryManagement/dispatchLog/index.vue
index 8d4a600..1e56a3d 100644
--- a/src/views/inventoryManagement/dispatchLog/index.vue
+++ b/src/views/inventoryManagement/dispatchLog/index.vue
@@ -4,7 +4,7 @@
<div>
<span class="search_title">渚涘簲鍟嗗悕绉帮細</span>
<el-input
- v-model="searchForm.customerName"
+ v-model="searchForm.supplierName"
style="width: 240px"
placeholder="璇疯緭鍏�"
@change="handleQuery"
@@ -38,59 +38,68 @@
<el-table-column align="center" label="搴忓彿" type="index" width="60" />
<el-table-column
label="鍑哄簱鏃ユ湡"
- prop="salesContractNo"
+ prop="inboundTime"
width="100"
show-overflow-tooltip
/>
<el-table-column
label="渚涘簲鍟嗗悕绉�"
- prop="customerName"
+ prop="supplierName"
width="160"
show-overflow-tooltip
/>
<el-table-column
label="浜у搧澶х被"
- prop="salesman"
+ prop="productCategory"
width="100"
show-overflow-tooltip
/>
<el-table-column
label="瑙勬牸鍨嬪彿"
- prop="projectName"
+ prop="specificationModel"
width="100"
show-overflow-tooltip
/>
<el-table-column
label="鍗曚綅"
- prop="contractAmount"
+ prop="unit"
width="80"
show-overflow-tooltip
/>
<el-table-column
label="鍑哄簱鏁伴噺"
- prop="entryPersonName"
+ prop="inboundQuantity"
width="100"
show-overflow-tooltip
/>
<el-table-column
+ label="鍚◣鍗曚环"
+ prop="taxInclusiveUnitPrice"
label="鍚◣鍗曚环(鍏�)"
prop="entryDate"
width="100"
show-overflow-tooltip
/>
<el-table-column
+ label="鍚◣鎬讳环"
+ prop="taxInclusiveTotalPrice"
label="鍚◣鎬讳环(鍏�)"
prop="executionDate"
width="100"
show-overflow-tooltip
/>
<el-table-column
+ label="绋庣巼"
+ prop="taxRate"
label="绋庣巼(%)"
prop="executionDate"
width="100"
show-overflow-tooltip
/>
<el-table-column
+ label="涓嶅惈绋庢�讳环"
+ prop="taxExclusiveTotalPrice"
+ width="100"
label="涓嶅惈绋庢�讳环(鍏�)"
prop="executionDate"
width="180"
@@ -98,7 +107,7 @@
/>
<el-table-column
label="鍑哄簱浜�"
- prop="executionDate"
+ prop="nickname"
width="80"
show-overflow-tooltip
/>
@@ -138,20 +147,25 @@
import useUserStore from "@/store/modules/user";
import { userListNoPage } from "@/api/system/user.js";
import {
- ledgerListPage,
- customerList,
- addOrUpdateSalesLedger,
- getSalesLedgerWithProducts,
- delLedger,
-} from "@/api/salesManagement/salesLedger.js";
+ getStockOutPage,
+ addStockOut,
+ updateStockOut,
+ delStockOut,
+ exportStockOut,
+ getStockManageById
+} from "@/api/inventoryManagement/stockOut.js";
+
const userStore = useUserStore();
const { proxy } = getCurrentInstance();
const tableData = ref([]);
-const productData = ref([]);
+// const productData = ref([]);
const selectedRows = ref([]);
const userList = ref([]);
-const customerOption = ref([]);
+// const customerOption = ref([]);
const tableLoading = ref(false);
+const supplierList = ref([])
+const productList = ref([])
+const productModelList = ref([])
const page = reactive({
current: 1,
size: 100,
@@ -164,7 +178,32 @@
const dialogFormVisible = ref(false);
const data = reactive({
searchForm: {
- customerName: "",
+ supplierName: "",
+ },
+ form: {
+ supplierId: null,
+ supplierName: '',
+ productId: null,
+ productName: '',
+ userId: userStore.userId,
+ nickname: '',
+ model: '',
+ productModelId: null,
+ unit: '',
+ productrecordId: null,
+ taxInclusiveUnitPrice: '',
+ taxInclusiveTotalPrice: '',
+ taxRate: '',
+ taxExclusiveTotalPrice: '',
+ inboundTime: '',
+ inboundBatch: '',
+ inboundQuantity: ''
+ },
+ rules: {
+ supplierId: [{ required: true, message: '璇烽�夋嫨渚涘簲鍟�', trigger: 'change' }],
+ productRecordid: [{ required: true, message: '璇烽�夋嫨浜у搧', trigger: 'change' }],
+ inboundTime: [{ required: true, message: '璇烽�夋嫨鍏ュ簱鏃堕棿', trigger: 'change' }],
+ inboundQuantity: [{ required: true, message: '璇疯緭鍏ュ叆搴撴暟閲�', trigger: 'blur' }]
},
});
const { searchForm } = toRefs(data);
@@ -182,10 +221,10 @@
};
const getList = () => {
tableLoading.value = true;
- ledgerListPage({ ...searchForm.value, ...page })
+ getStockOutPage({ ...searchForm.value, ...page })
.then((res) => {
tableLoading.value = false;
- tableData.value = res.records;
+ tableData.value = res.data.records;
tableData.value.map((item) => {
item.children = [];
});
@@ -195,10 +234,24 @@
tableLoading.value = false;
});
};
+// const findNodeById = (nodes, productId) => {
+// for (let i = 0; i < nodes.length; i++) {
+// if (nodes[i].value === productId) {
+// return nodes[i].label; // 鎵惧埌鑺傜偣锛岃繑鍥炶鑺傜偣
+// }
+// if (nodes[i].children && nodes[i].children.length > 0) {
+// const foundNode = findNodeById(nodes[i].children, productId);
+// if (foundNode) {
+// return foundNode.label; // 鍦ㄥ瓙鑺傜偣涓壘鍒帮紝杩斿洖璇ヨ妭鐐�
+// }
+// }
+// }
+// return null; // 娌℃湁鎵惧埌鑺傜偣锛岃繑鍥瀗ull
+// };
// 琛ㄦ牸閫夋嫨鏁版嵁
const handleSelectionChange = (selection) => {
// 杩囨护鎺夊瓙鏁版嵁
- selectedRows.value = selection.filter((item) => item.children !== undefined);
+ selectedRows.value = selection.filter((item) => item.id);
console.log("selection", selectedRows.value);
};
const expandedRowKeys = ref([]);
@@ -220,7 +273,7 @@
type: "warning",
})
.then(() => {
- proxy.download("/sales/ledger/export", {}, "鍑哄簱鍙拌处.xlsx");
+ proxy.download("/stockmanagement/export", {}, "鍑哄簱鍙拌处.xlsx");
})
.catch(() => {
proxy.$modal.msg("宸插彇娑�");
@@ -241,7 +294,7 @@
type: "warning",
})
.then(() => {
- delLedger(ids).then((res) => {
+ delStockOut(ids).then((res) => {
proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
getList();
});
--
Gitblit v1.9.3