From 41c7dd199f1919a01dfc5e04f62359ca8bc3cb2c Mon Sep 17 00:00:00 2001
From: 吴羡 <16976746+Xian-TT3@user.noreply.gitee.com>
Date: 星期六, 12 九月 2026 12:43:32 +0800
Subject: [PATCH] feat: 库存管理三表单与详情页签分组、采购台账分栏、油品联动与电话校验、冻结解冻修复
---
src/views/basicData/customerFileOpenSea/index.vue | 41 +++++++++++++++++++++++++++++++----------
1 files changed, 31 insertions(+), 10 deletions(-)
diff --git a/src/views/basicData/customerFileOpenSea/index.vue b/src/views/basicData/customerFileOpenSea/index.vue
index 2598f48..23e83dd 100644
--- a/src/views/basicData/customerFileOpenSea/index.vue
+++ b/src/views/basicData/customerFileOpenSea/index.vue
@@ -15,10 +15,10 @@
style="width: 240px"
clearable
@change="handleQuery">
- <el-option label="闆跺敭瀹㈡埛"
- value="闆跺敭瀹㈡埛" />
- <el-option label="杩涢攢鍟嗗鎴�"
- value="杩涢攢鍟嗗鎴�" />
+ <el-option v-for="dict in customer_type"
+ :key="dict.value"
+ :label="dict.label"
+ :value="dict.value" />
</el-select>
<el-button type="primary"
@click="handleQuery"
@@ -125,10 +125,10 @@
<el-select v-model="form.customerType"
placeholder="璇烽�夋嫨"
clearable>
- <el-option label="闆跺敭瀹㈡埛"
- value="闆跺敭瀹㈡埛" />
- <el-option label="杩涢攢鍟嗗鎴�"
- value="杩涢攢鍟嗗鎴�" />
+ <el-option v-for="dict in customer_type"
+ :key="dict.value"
+ :label="dict.label"
+ :value="dict.value" />
</el-select>
</el-form-item>
</el-col>
@@ -705,6 +705,7 @@
import { getToken } from "@/utils/auth.js";
const { proxy } = getCurrentInstance();
const userStore = useUserStore();
+ const { customer_type } = proxy.useDict("customer_type");
const assignDialogVisible = ref(false);
const assignFormRef = ref();
const assignForm = reactive({
@@ -809,6 +810,7 @@
label: "瀹㈡埛鍒嗙被",
prop: "customerType",
width: 120,
+ formatData: value => proxy.selectDictLabel(customer_type.value, value),
},
{
label: "瀹㈡埛鍚嶇О",
@@ -917,8 +919,13 @@
{
name: "鍥炴敹",
type: "text",
+ disabled: row => isCustomerRecoveryLocked(row),
showHide: row => row.usageStatus == 1,
clickFun: row => {
+ if (isCustomerRecoveryLocked(row)) {
+ proxy.$modal.msgWarning("宸查鐢ㄥ苟涓旇閿�鍞ā鍧楀紩鐢ㄧ殑鍏捣瀹㈡埛涓嶈兘鍥炴敹");
+ return;
+ }
recycle(row);
},
},
@@ -933,7 +940,12 @@
{
name: "缂栬緫",
type: "text",
- clickFun: row => {
+ disabled: row => isCustomerEditLocked(row),
+ clickFun: row => {
+ if (isCustomerEditLocked(row)) {
+ proxy.$modal.msgWarning("宸查鐢ㄥ苟涓旇閿�鍞ā鍧楀紩鐢ㄧ殑鍏捣瀹㈡埛涓嶈兘缂栬緫");
+ return;
+ }
openForm("edit", row);
},
},
@@ -1121,6 +1133,10 @@
}
// 鎵撳紑寮规
const openForm = (type, row) => {
+ if (type === "edit" && isCustomerEditLocked(row)) {
+ proxy.$modal.msgWarning("宸查鐢ㄥ苟涓旇閿�鍞ā鍧楀紩鐢ㄧ殑鍏捣瀹㈡埛涓嶈兘缂栬緫");
+ return;
+ }
operationType.value = type;
form.value = {};
form.value.maintainer = userStore.nickName;
@@ -1150,6 +1166,11 @@
}
dialogFormVisible.value = true;
};
+ const isCustomerSalesReferenced = row => Number(row?.salesReferenceFlag || 0) === 1;
+ const isCustomerRecoveryLocked = row => Number(row?.usageStatus || 0) === 1 && isCustomerSalesReferenced(row);
+ const isCustomerEditLocked = row => isCustomerSalesReferenced(row) && (
+ Number(row?.type) === 0 || (Number(row?.type) === 1 && Number(row?.usageStatus || 0) === 1)
+ );
// 鎻愪氦琛ㄥ崟
const submitForm = () => {
proxy.$refs["formRef"].validate(valid => {
@@ -1651,7 +1672,7 @@
const downloadAttachment = row => {
if (row.url) {
// proxy.download(row.url, {}, row.name);
- proxy.$download.name(row.url);
+ proxy.$download.byUrl(row.url, row.originalFilename);
} else {
proxy.$modal.msgError("涓嬭浇閾炬帴涓嶅瓨鍦�");
}
--
Gitblit v1.9.3