From 11d7990309ddace2fa600cbeae58e3ab5ac368f9 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期日, 20 九月 2026 19:25:45 +0800
Subject: [PATCH] 新疆-融邦 1. 委外管理:新增合作商档案、委外订单、往来台账三个页面及接口;合作商附件弹框支持直接上传/删除并即时保存。 2. 信托基金与代储台账:客户档案加「信托基金 / 代储金额」并对超限标红提示;销售台账拆「卖油 / 代储」页签,代储走油库+储罐+合同金额,卖油保留产品明细;台账列表加审批状态与超限红字;审批中心显示销售合同号并能下钻台账明细。 3. 储罐号带入库存:储罐信息表单加「是否启用 / 用途 / 租客信息」联动与校验;库存管理、批号明细、入库/出库表单与列表补齐储罐号、油品、物流、过磅等字段展示。 4. 出库即发货与往来备件:出库台账区分「发货单 / 油品出库」两类来源并分别处理详情;新增备件出入库流水页面。 5. 车辆管理与残油联动:新增车辆管理页面;油品出入库表单物流信息顺序调整,车牌/车挂牌号联动只读。 6. 油品出库联动发货台账:发货台账加「发货单号 / 销售合同号」筛选,修复油品出库行批号列取错字段。 7. 采购申请模块:新增采购申请页面及接口。 8. 付款流水组件:抽出公共「付款流水」弹框组件,采购付款分栏、收付款台账与委外往来台账复用。 9. 列调整:收付款台账删除「付款金额 / 退货金额」;委外往来台账删除「回款金额」,并去掉金额列右对齐。
---
src/views/basicData/customerFileOpenSea/index.vue | 98 ++++++++++++++++++++++++++++++++-----------------
1 files changed, 64 insertions(+), 34 deletions(-)
diff --git a/src/views/basicData/customerFileOpenSea/index.vue b/src/views/basicData/customerFileOpenSea/index.vue
index 71cc051..23e83dd 100644
--- a/src/views/basicData/customerFileOpenSea/index.vue
+++ b/src/views/basicData/customerFileOpenSea/index.vue
@@ -1,6 +1,6 @@
<template>
<div class="app-container">
- <div class="search_form">
+ <div class="search_form" style="margin-bottom: 20px;">
<div>
<span class="search_title">瀹㈡埛鍚嶇О锛�</span>
<el-input v-model="searchForm.customerName"
@@ -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>
@@ -280,7 +280,8 @@
:limit="1"
accept=".xlsx, .xls"
:headers="upload.headers"
- :action="upload.url + '?updateSupport=' + upload.updateSupport"
+ :action="upload.url"
+ :data="upload.data"
:disabled="upload.isUploading"
:before-upload="upload.beforeUpload"
:on-progress="upload.onProgress"
@@ -681,26 +682,30 @@
import { onMounted, ref, reactive, getCurrentInstance, toRefs } from "vue";
import { Search, Paperclip, Upload } from "@element-plus/icons-vue";
import {
- addCustomer,
- addCustomerPrivatePool,
- delCustomerPrivatePool,
- delCustomer,
- getCustomer,
- shareCustomer,
- listCustomer,
- updateCustomer,
addCustomerFollow,
updateCustomerFollow,
delCustomerFollow,
addReturnVisit,
getReturnVisit,
} from "@/api/basicData/customerFile.js";
+ import {
+ listCustomer,
+ addCustomer,
+ delCustomer,
+ updateCustomer,
+ getCustomer,
+ assignCustomer,
+ recycleCustomer,
+ shareCustomer,
+ } from "@/api/basicData/customer.js";
+
import { ElMessageBox } from "element-plus";
import { userListNoPage } from "@/api/system/user.js";
import useUserStore from "@/store/modules/user";
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({
@@ -805,6 +810,7 @@
label: "瀹㈡埛鍒嗙被",
prop: "customerType",
width: 120,
+ formatData: value => proxy.selectDictLabel(customer_type.value, value),
},
{
label: "瀹㈡埛鍚嶇О",
@@ -913,9 +919,14 @@
{
name: "鍥炴敹",
type: "text",
+ disabled: row => isCustomerRecoveryLocked(row),
showHide: row => row.usageStatus == 1,
clickFun: row => {
- recycleCustomer(row);
+ if (isCustomerRecoveryLocked(row)) {
+ proxy.$modal.msgWarning("宸查鐢ㄥ苟涓旇閿�鍞ā鍧楀紩鐢ㄧ殑鍏捣瀹㈡埛涓嶈兘鍥炴敹");
+ return;
+ }
+ recycle(row);
},
},
{
@@ -929,7 +940,12 @@
{
name: "缂栬緫",
type: "text",
- clickFun: row => {
+ disabled: row => isCustomerEditLocked(row),
+ clickFun: row => {
+ if (isCustomerEditLocked(row)) {
+ proxy.$modal.msgWarning("宸查鐢ㄥ苟涓旇閿�鍞ā鍧楀紩鐢ㄧ殑鍏捣瀹㈡埛涓嶈兘缂栬緫");
+ return;
+ }
openForm("edit", row);
},
},
@@ -970,6 +986,7 @@
searchForm: {
customerName: "",
customerType: "",
+ type: 1
},
form: {
customerName: "",
@@ -984,6 +1001,7 @@
bankAccount: "",
bankCode: "",
customerType: "",
+ type: 1
},
rules: {
customerName: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
@@ -1015,6 +1033,9 @@
headers: { Authorization: "Bearer " + getToken() },
// 涓婁紶鐨勫湴鍧�
url: import.meta.env.VITE_APP_BASE_API + "/basic/customer/importData",
+ data: {
+ type: 1
+ },
// 鏂囦欢涓婁紶鍓嶇殑鍥炶皟
beforeUpload: file => {
console.log("鏂囦欢鍗冲皢涓婁紶", file);
@@ -1112,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;
@@ -1122,6 +1147,7 @@
},
];
form.value.maintenanceTime = getCurrentDate();
+ form.value.type = 1;
userListNoPage().then(res => {
userList.value = res.data;
});
@@ -1140,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 => {
@@ -1214,7 +1245,7 @@
const openShareDialog = row => {
shareForm.id = row.id;
shareForm.customerName = row.customerName;
- shareForm.boundIds = [];
+ shareForm.boundIds = row.userIds || [];
ensureUserList().then(() => {
shareDialogVisible.value = true;
});
@@ -1231,9 +1262,9 @@
if (!valid) {
return;
}
- addCustomerPrivatePool({
- customerId: assignForm.id,
- boundId: assignForm.boundId,
+ assignCustomer({
+ id: assignForm.id,
+ usageUser: assignForm.boundId,
}).then(() => {
proxy.$modal.msgSuccess("鍒嗛厤鎴愬姛");
closeAssignDialog();
@@ -1247,8 +1278,8 @@
return;
}
shareCustomer({
- customerId: shareForm.id,
- boundIds: shareForm.boundIds,
+ id: shareForm.id,
+ userIds: shareForm.boundIds,
}).then(() => {
proxy.$modal.msgSuccess("鍏变韩鎴愬姛");
closeShareDialog();
@@ -1256,18 +1287,17 @@
});
});
};
- const recycleCustomer = row => {
+ const recycle = row => {
ElMessageBox.confirm("纭鍥炴敹瀹㈡埛鈥�" + row.customerName + "鈥濆悧锛�", "鍥炴敹鎻愮ず", {
confirmButtonText: "纭",
cancelButtonText: "鍙栨秷",
type: "warning",
})
.then(() => {
- return delCustomerPrivatePool(row.id);
- })
- .then(() => {
- proxy.$modal.msgSuccess("鍥炴敹鎴愬姛");
- getList();
+ return recycleCustomer({id: row.id}).then(() => {
+ proxy.$modal.msgSuccess("鍥炴敹鎴愬姛");
+ getList();
+ })
})
.catch(error => {
if (error === "cancel" || error === "close") {
@@ -1283,7 +1313,7 @@
type: "warning",
})
.then(() => {
- proxy.download("/basic/customer/export", {}, "瀹㈡埛妗f.xlsx");
+ proxy.download("/basic/customer/export", {type: 1}, "瀹㈡埛妗f.xlsx");
})
.catch(() => {
proxy.$modal.msg("宸插彇娑�");
@@ -1642,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