From 93b8ceac34e2fbd5c57fe5ab4f5bac32c85408aa Mon Sep 17 00:00:00 2001
From: liyong <18434998025@163.com>
Date: 星期五, 22 五月 2026 15:37:09 +0800
Subject: [PATCH] fix(hr): 修正岗位字段映射
---
src/views/salesManagement/salesLedger/index.vue | 31 ++++++++++++++++++++++++-------
1 files changed, 24 insertions(+), 7 deletions(-)
diff --git a/src/views/salesManagement/salesLedger/index.vue b/src/views/salesManagement/salesLedger/index.vue
index 4e2d84e..904979c 100644
--- a/src/views/salesManagement/salesLedger/index.vue
+++ b/src/views/salesManagement/salesLedger/index.vue
@@ -284,10 +284,15 @@
<el-col :span="12">
<el-form-item label="閿�鍞悎鍚屽彿锛�"
prop="salesContractNo">
- <el-input v-model="form.salesContractNo"
- placeholder="鑷姩鐢熸垚"
- clearable
- disabled />
+ <div style="display: flex; align-items: center; gap: 12px;width: 100%;">
+ <el-checkbox v-model="form.autoGenerateContractNo" v-if="operationType === 'add'">鑷姩鐢熸垚
+ </el-checkbox>
+ <el-input v-model="form.salesContractNo"
+ :placeholder="form.autoGenerateContractNo ? '鑷姩鐢熸垚' : '璇疯緭鍏�'"
+ clearable
+ :disabled="form.autoGenerateContractNo" />
+
+ </div>
</el-form-item>
</el-col>
<el-col :span="12">
@@ -1069,6 +1074,7 @@
},
form: {
salesContractNo: "",
+ autoGenerateContractNo: true,
salesman: "",
customerId: "",
entryPerson: "",
@@ -1578,7 +1584,7 @@
selectedQuotation.value = null;
let userLists = await userListNoPage();
userList.value = userLists.data;
- listCustomer({ current: -1, size: -1 }).then(res => {
+ listCustomer({ current: -1, size: -1, type: 0 }).then(res => {
customerOption.value = res.data.records;
});
form.value.entryPerson = userStore.id;
@@ -1587,6 +1593,8 @@
form.value.entryDate = getCurrentDate();
// 绛捐鏃ユ湡榛樿涓哄綋澶�
form.value.executionDate = getCurrentDate();
+ // 榛樿鑷姩鐢熸垚閿�鍞悎鍚屽彿
+ form.value.autoGenerateContractNo = true;
} else {
currentId.value = row.id;
getSalesLedgerWithProducts({ id: row.id, type: 1 }).then(res => {
@@ -1594,6 +1602,8 @@
form.value.entryPerson = Number(res.entryPerson);
productData.value = form.value.productData;
fileList.value = form.value.storageBlobVOs;
+ // 缂栬緫鏃惰缃嚜鍔ㄧ敓鎴愪负false锛屽厑璁告墜鍔ㄤ慨鏀�
+ form.value.autoGenerateContractNo = false;
});
}
// let userAll = await userStore.getInfo()
@@ -1705,6 +1715,8 @@
taxExclusiveTotalPrice: taxExclusiveTotalPrice,
invoiceType: "澧炴櫘绁�",
isProduction: true,
+ productId: p.productId,
+ productModelId: p.productModelId
};
});
@@ -1728,6 +1740,9 @@
}
form.value.storageBlobDTOs = fileList;
form.value.type = 1;
+ if (form.value.autoGenerateContractNo) {
+ form.value.salesContractNo = '';
+ }
addOrUpdateSalesLedger(form.value).then(res => {
proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
closeDia();
@@ -2594,6 +2609,7 @@
瀹℃牳鎷掔粷: "瀹℃牳鎷掔粷",
瀹℃牳閫氳繃: "瀹℃牳閫氳繃",
宸插彂璐�: "宸插彂璐�",
+ 閮ㄥ垎鍙戣揣: "閮ㄥ垎鍙戣揣",
};
return statusTextMap[statusStr] || "寰呭彂璐�";
};
@@ -2625,6 +2641,7 @@
瀹℃牳鎷掔粷: "danger",
瀹℃牳閫氳繃: "success",
宸插彂璐�: "success",
+ 閮ㄥ垎鍙戣揣: "warning",
};
return typeTextMap[statusStr] || "info";
};
@@ -2650,7 +2667,7 @@
// 鍙戣揣鐘舵�佸繀椤绘槸"寰呭彂璐�"鎴�"瀹℃牳鎷掔粷"
const statusStr = shippingStatus ? String(shippingStatus).trim() : "";
- return statusStr === "寰呭彂璐�" || statusStr === "瀹℃牳鎷掔粷";
+ return statusStr === "寰呭彂璐�" || statusStr === "瀹℃牳鎷掔粷" || statusStr === "閮ㄥ垎鍙戣揣";
};
// 鎵撳紑闄勪欢寮圭獥
@@ -3003,4 +3020,4 @@
page-break-after: avoid;
}
}
-</style>
+</style>
\ No newline at end of file
--
Gitblit v1.9.3