From 6a415a072a98d64d2f95d16eef73b6d7270b8d56 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期六, 30 五月 2026 15:14:25 +0800
Subject: [PATCH] 新疆马铃薯 1.首页问题:挪新系统ui,需要确认一下页面数据完整。 2.协同办公:挪新系统 3.营销管理:客户往来取消回款金额字段,改为点击左侧客户时显示与该客户的所有订单信息,以及发货情况。销售可以选好对应的采购订单方便质量追溯。 4.采购管理:供应商往来同上逻辑,显示是否收货,也加上采购退货和采购报表功能。 5.采购加上设备备件选项,设备备件入库到备件库存。设备,仓储不足时做采购提醒。 6.仓储物流:得区分成品库和原料库(不存在半成品,成品只有一个产品,很好确认),原材料需要有批号,采集原料库需要做好仓库字段,让他们可以区分哪个仓库,然后把数采设备信息做一个实时的显示。总库存显示好当前存在的批次信息。 7.质量:只有不通过才需要填写对应的数据信息。在外侧做好选择通过不通过。过程,出厂检验无法对应到生产订单,那就对应到销售订单。 8.决策分析:基础数据分析和进销存分析,质量数据分析需要重新设计
---
src/views/salesManagement/salesLedger/index.vue | 98 ++++++++++++++++++++++++++++++------------------
1 files changed, 61 insertions(+), 37 deletions(-)
diff --git a/src/views/salesManagement/salesLedger/index.vue b/src/views/salesManagement/salesLedger/index.vue
index 604ba82..e7300a4 100644
--- a/src/views/salesManagement/salesLedger/index.vue
+++ b/src/views/salesManagement/salesLedger/index.vue
@@ -419,6 +419,41 @@
</el-row>
<el-row :gutter="30">
<el-col :span="12">
+ <el-form-item label="閲囪喘鍚堝悓鍙凤細" prop="purchaseContractNumber">
+ <el-select
+ v-model="form.purchaseContractNumber"
+ placeholder="璇烽�夋嫨閲囪喘鍚堝悓鍙�"
+ clearable
+ filterable
+ style="width: 100%"
+ :disabled="operationType === 'view'"
+ >
+ <el-option
+ v-for="item in purchaseContractOptions"
+ :key="item.purchaseContractNumber"
+ :label="item.purchaseContractNumber + ' - ' + item.supplierName"
+ :value="item.purchaseContractNumber"
+ />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="浜よ揣鏃ユ湡锛�" prop="entryDate">
+ <el-date-picker
+ style="width: 100%"
+ v-model="form.deliveryDate"
+ value-format="YYYY-MM-DD"
+ format="YYYY-MM-DD"
+ type="date"
+ placeholder="璇烽�夋嫨"
+ clearable
+ :disabled="operationType === 'view'"
+ />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row :gutter="30">
+ <el-col :span="12">
<el-form-item label="褰曞叆浜猴細" prop="entryPerson">
<el-select
v-model="form.entryPerson"
@@ -444,22 +479,6 @@
<el-date-picker
style="width: 100%"
v-model="form.entryDate"
- value-format="YYYY-MM-DD"
- format="YYYY-MM-DD"
- type="date"
- placeholder="璇烽�夋嫨"
- clearable
- :disabled="operationType === 'view'"
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="30">
- <el-col :span="12">
- <el-form-item label="浜よ揣鏃ユ湡锛�" prop="entryDate">
- <el-date-picker
- style="width: 100%"
- v-model="form.deliveryDate"
value-format="YYYY-MM-DD"
format="YYYY-MM-DD"
type="date"
@@ -527,13 +546,14 @@
prop="taxExclusiveTotalPrice"
:formatter="formattedNumber"
/>
- <el-table-column label="鏄惁鐢熶骇" prop="isProduction" width="150">
+ <!-- 鏄惁鐢熶骇鍒楀凡闅愯棌锛岄粯璁ゅ�间负 false -->
+ <!-- <el-table-column label="鏄惁鐢熶骇" prop="isProduction" width="150">
<template #default="scope">
<el-tag :type="scope.row.isProduction ? 'success' : 'info'">
{{ scope.row.isProduction ? "鏄�" : "鍚�" }}
</el-tag>
</template>
- </el-table-column>
+ </el-table-column> -->
<el-table-column
fixed="right"
label="鎿嶄綔"
@@ -823,14 +843,15 @@
</el-select>
</el-form-item>
</el-col>
- <el-col :span="12">
+ <!-- 鏄惁鐢熶骇瀛楁宸查殣钘忥紝榛樿鍊间负 false -->
+ <!-- <el-col :span="12">
<el-form-item label="鏄惁鐢熶骇锛�" prop="isProduction">
<el-radio-group v-model="productForm.isProduction">
<el-radio label="鏄�" :value="true" />
<el-radio label="鍚�" :value="false" />
</el-radio-group>
</el-form-item>
- </el-col>
+ </el-col> -->
</el-row>
</el-form>
</FormDialog>
@@ -1180,6 +1201,7 @@
} from "@/api/salesManagement/salesLedger.js";
import { getStockInventoryByModelId } from "@/api/inventoryManagement/stockInventory.js";
import { modelList, productTreeList } from "@/api/basicData/product.js";
+import { purchaseList } from "@/api/procurementManagement/procurementLedger.js";
import useFormData from "@/hooks/useFormData.js";
import dayjs from "dayjs";
import FileUpload from "@/components/AttachmentUpload/file/index.vue";
@@ -1204,6 +1226,7 @@
const customerOption = ref([]);
const productOptions = ref([]);
const modelOptions = ref([]);
+const purchaseContractOptions = ref([]);
const tableLoading = ref(false);
const page = reactive({
current: 1,
@@ -1237,6 +1260,7 @@
executionDate: "",
hasProductionRecord: false,
createTime: "",
+ purchaseContractNumber: "",
},
rules: {
salesman: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }],
@@ -1264,7 +1288,7 @@
taxInclusiveTotalPrice: "",
taxExclusiveTotalPrice: "",
invoiceType: "",
- isProduction: false,
+ isProduction: false, // 榛樿鍊间负 false锛堝惁锛�
},
productRules: {
productCategory: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }],
@@ -1375,22 +1399,9 @@
const getDeliveryBatchNoList = async (productModelId) => {
if (!productModelId) return [];
const res = await getStockInventoryByModelId(productModelId);
- const rawList = Array.isArray(res?.data)
- ? res.data
- : res?.data?.records || res?.data?.rows || [];
+ const rawList = res.data || [];
const seenIds = new Set();
return rawList
- .filter((item) => {
- if (!item?.id || !item?.batchNo || seenIds.has(item.id)) {
- return false;
- }
- seenIds.add(item.id);
- return true;
- })
- .map((item) => ({
- ...item,
- deliveryQuantity: 0,
- }));
};
const validateDeliveryShippingCarNumber = (_rule, value, callback) => {
if (deliveryForm.value.type === "璐ц溅" && !value) {
@@ -1742,6 +1753,8 @@
listCustomer({ current: -1, size: -1, type: 0 }).then((res) => {
customerOption.value = res.data.records;
});
+ // 鑾峰彇閲囪喘鍚堝悓鍒楄〃
+ await getPurchaseContractList();
form.value.entryPerson = userStore.id;
if (type === "add") {
// 鏂板鏃惰缃綍鍏ユ棩鏈熶负褰撳ぉ
@@ -1871,7 +1884,7 @@
taxInclusiveTotalPrice: taxInclusiveTotalPrice,
taxExclusiveTotalPrice: taxExclusiveTotalPrice,
invoiceType: "澧炴櫘绁�",
- isProduction: true,
+ isProduction: false, // 榛樿鍊间负 false锛堝惁锛�
productId: p.productId,
productModelId: p.productModelId,
};
@@ -1927,7 +1940,7 @@
productOperationType.value = type;
productForm.value = {};
if (type === "add") {
- productForm.value.isProduction = true;
+ productForm.value.isProduction = false; // 榛樿鍊间负 false锛堝惁锛�
}
proxy.resetForm("productFormRef");
if (type === "edit") {
@@ -1963,6 +1976,17 @@
}
productFormVisible.value = true;
};
+
+// 鑾峰彇閲囪喘鍚堝悓鍒楄〃
+const getPurchaseContractList = async () => {
+ try {
+ const res = await purchaseList({ current: -1, size: -1 });
+ purchaseContractOptions.value = res.rows;
+ } catch (error) {
+ console.error("鑾峰彇閲囪喘鍚堝悓鍒楄〃澶辫触", error);
+ purchaseContractOptions.value = [];
+ }
+};
// 鎻愪氦浜у搧琛ㄥ崟
const submitProduct = () => {
proxy.$refs["productFormRef"].validate((valid) => {
--
Gitblit v1.9.3