diff --git a/src/views/oa/crm/crmMailingApply/edit.vue b/src/views/oa/crm/crmMailingApply/edit.vue
index 917bbcb..f01ae94 100644
--- a/src/views/oa/crm/crmMailingApply/edit.vue
+++ b/src/views/oa/crm/crmMailingApply/edit.vue
@@ -22,7 +22,7 @@
-
+
基本信息
@@ -42,46 +42,70 @@
type="date"
value-format="YYYY-MM-DD"
placeholder="请选择日期"
+ :disabled="!isFormEditable"
style="width: 100%"
/>
-
+
-
+
-
+
kg
-
+
-
+
元
-
+
@@ -90,7 +114,7 @@
-
+
@@ -99,11 +123,13 @@
-
@@ -136,7 +162,7 @@
-
+
@@ -149,6 +175,7 @@
type="datetime"
value-format="YYYY-MM-DD HH:mm:ss"
placeholder="请选择邮寄时间"
+ :disabled="!isFormEditable"
style="width: 100%"
/>
@@ -161,13 +188,14 @@
type="datetime"
value-format="YYYY-MM-DD HH:mm:ss"
placeholder="请选择签收时间"
+ :disabled="!isFormEditable"
style="width: 100%"
/>
-
+
@@ -405,6 +433,7 @@ const loadFormData = async () => {
if (id && id !== '0' && (routeParams.value.type === 'update' || routeParams.value.type === 'view' || routeParams.value.type === 'approval')) {
const res = await getCrmMailingApply(id);
Object.assign(form.value, res.data);
+ console.log('ossId:', form.value.ossId); //
if (form.value.mailingApplyCode) {
isCodeGenerated.value = true;
}
diff --git a/src/views/oa/crm/crmQuoteInfo/edit.vue b/src/views/oa/crm/crmQuoteInfo/edit.vue
index ffa4c48..3f1fbaf 100644
--- a/src/views/oa/crm/crmQuoteInfo/edit.vue
+++ b/src/views/oa/crm/crmQuoteInfo/edit.vue
@@ -14,7 +14,7 @@
-
+
基本信息
@@ -28,7 +28,7 @@
-
+
@@ -58,53 +58,74 @@
-->
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -269,7 +290,13 @@
-
+
-
+
-
+
@@ -295,7 +322,7 @@
-
+
计划内
计划外
@@ -303,24 +330,24 @@
-
+
-
+
-
+
-
+
@@ -328,15 +355,22 @@
附件与备注
-
- 上传附件
+
+
-
+
@@ -398,21 +432,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
@@ -478,7 +497,8 @@ const form = reactive({
supplierContactName: undefined,
supplierContactPhone: undefined,
supplierContactEmail: undefined,
- remark: undefined
+ remark: undefined,
+ ossId: undefined
});
const rules = {
@@ -759,22 +779,16 @@ const generateQuoteCode = async () => {
}
};
-// 附件上传对话框(UI占位,复用通用上传组件)
-const type = ref(0);
-const dialog = reactive({ visible: false, title: '' });
-const ossFileModel = ref(undefined);
-const handleFile = () => {
- type.value = 0;
- dialog.visible = true;
- dialog.title = '上传报价附件';
-};
-const submitOss = () => {
- dialog.visible = false;
- proxy?.$modal.msgSuccess('附件已更新');
-};
-const cancel = () => {
- dialog.visible = false;
-};
+// 附件ID字符串转换(用于FileUpload组件)
+const ossIdString = computed({
+ get() {
+ const v = (form as any).ossId;
+ return v === undefined || v === null ? '' : String(v);
+ },
+ set(val: string) {
+ (form as any).ossId = val || undefined;
+ }
+});
const submitForm = (status: string, mode: boolean) => {
quoteFormRef.value?.validate(async (valid: boolean) => {
if (!valid) return;
@@ -873,6 +887,7 @@ onMounted(async () => {
form.quoteId = id as any;
const res = await getCrmQuoteInfo(id as any);
Object.assign(form, res.data);
+ console.log('crmQuoteInfo/edit.vue数据加载成功,ossId:', form.ossId); // 添加调试日志
// 编辑模式:已存在编号则禁用生成
isCodeGenerated.value = !!form.quoteCode;
// 根据已有联系人ID回填姓名、电话、邮箱(若后端已返回则保持)
diff --git a/src/views/oa/erp/erpProjectPlan/edit.vue b/src/views/oa/erp/erpProjectPlan/edit.vue
index 596c7f0..3f32e63 100644
--- a/src/views/oa/erp/erpProjectPlan/edit.vue
+++ b/src/views/oa/erp/erpProjectPlan/edit.vue
@@ -80,12 +80,14 @@
-
- 预览附件
-
-
- 上传附件
-
+
@@ -280,22 +282,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -371,14 +357,6 @@ const projectSelectRef = ref>();
const projectChangeList = ref([]); // 变更记录列表
const activeChangeTab = ref('0'); // 当前活跃的变更标签
-// 附件上传对话框状态
-const type = ref(0);
-const dialog = reactive<{ visible: boolean; title: string }>({
- visible: false,
- title: ''
-});
-const ossFileModel = ref(undefined);
-
const createEmptyForm = (): ErpProjectPlanForm => ({
projectPlanId: undefined,
projectId: undefined,
@@ -549,38 +527,16 @@ const recalcReceivableDate = (row: any) => {
row.receivableDate = proxy?.parseTime ? proxy.parseTime(target, '{y}-{m}-{d}') : target.toISOString().slice(0, 10);
};
-// 打开附件上传对话框(编辑模式)
-const handleFile = () => {
- type.value = 0;
- dialog.visible = true;
- dialog.title = '上传项目计划附件';
- // 回显已有附件
- ossFileModel.value = form.value.ossId as any;
-};
-
-// 查看模式下预览附件
-const handlePreview = () => {
- if (!form.value.ossId) {
- proxy?.$modal.msgWarning('暂无附件可预览');
- return;
+// 附件ID字符串转换(用于FileUpload组件)
+const ossIdString = computed({
+ get() {
+ const v = form.value.ossId as any;
+ return v === undefined || v === null ? '' : String(v);
+ },
+ set(val: string) {
+ form.value.ossId = val || (undefined as any);
}
- type.value = 0;
- dialog.visible = true;
- dialog.title = '预览项目计划附件';
- ossFileModel.value = form.value.ossId as any;
-};
-
-// 提交附件
-const submitOss = () => {
- form.value.ossId = ossFileModel.value as any;
- dialog.visible = false;
- proxy?.$modal.msgSuccess('附件已更新');
-};
-
-// 关闭附件对话框
-const cancel = () => {
- dialog.visible = false;
-};
+});
/** 提交按钮(与项目信息保持一致的处理方式) */
const submitForm = (status: string, mode: boolean) => {
@@ -615,7 +571,8 @@ const submitForm = (status: string, mode: boolean) => {
form.value.variables = {
projectId: form.value.projectId,
projectName: project?.projectName,
- managerId: form.value.managerId
+ managerId: form.value.managerId,
+ chargeId: form.value.chargeId
};
// 流程实例业务扩展字段
form.value.bizExt = {
@@ -755,6 +712,7 @@ const loadFormData = async () => {
if (!form.value.planStageList) {
form.value.planStageList = [];
}
+ console.log('ossId:', form.value.ossId); // 添加ossId调试日志
if (form.value.projectId) {
// 编辑模式下,同步项目名称和编号
const project = projectInfoList.value.find((item) => String(item.projectId) === String(form.value.projectId));
diff --git a/src/views/oa/erp/projectAcceptance/edit.vue b/src/views/oa/erp/projectAcceptance/edit.vue
index ec0cf1d..b24801d 100644
--- a/src/views/oa/erp/projectAcceptance/edit.vue
+++ b/src/views/oa/erp/projectAcceptance/edit.vue
@@ -14,7 +14,7 @@
-
+
@@ -50,13 +50,21 @@
type="datetime"
value-format="YYYY-MM-DD HH:mm:ss"
placeholder="请选择验收日期"
+ :disabled="formDisabled"
clearable
/>
-
+
@@ -71,7 +79,13 @@
-
+
@@ -198,9 +212,12 @@ const onProjectChange = async (val: any) => {
const applyLeaderFromManager = () => {};
const loadDetail = async () => {
+ console.log('loadDetail start');
if (!routeParams.value.id) return;
const res = await getProjectAcceptance(routeParams.value.id);
+ console.log('loadDetail res:', res);
Object.assign(form.value, res.data);
+ console.log('loadDetail end');
};
const submitForm = (status: string, mode: boolean) => {
diff --git a/src/views/oa/erp/projectReceiving/edit.vue b/src/views/oa/erp/projectReceiving/edit.vue
index 44b8abb..3140e14 100644
--- a/src/views/oa/erp/projectReceiving/edit.vue
+++ b/src/views/oa/erp/projectReceiving/edit.vue
@@ -14,7 +14,7 @@
-
+
@@ -45,12 +45,19 @@
-
+
-
+
{{ dict.label }}
@@ -59,7 +66,14 @@
-
+
@@ -74,7 +88,13 @@
-
+
@@ -214,7 +234,11 @@ const applyLeaderFromManager = () => {};
const loadDetail = async () => {
if (!routeParams.value.id) return;
const res = await getProjectReceiving(routeParams.value.id);
+ console.log('[projectReceiving] 后端返回数据:', res.data);
+ console.log('[projectReceiving] 后端返回ossId:', res.data?.ossId);
Object.assign(form.value, res.data);
+ console.log('[projectReceiving] 赋值后form.ossId:', form.value.ossId);
+ console.log('[projectReceiving] ossIdString计算属性值:', ossIdString.value);
};
const submitForm = (status: string, mode: boolean) => {