|
|
@@ -188,9 +188,9 @@ export function createInitialFormData() {
|
|
|
content: '',
|
|
|
categoryId: '',
|
|
|
categoryName: '',
|
|
|
- orgId: 0,
|
|
|
- orgCode: '',
|
|
|
- orgName: '',
|
|
|
+ orgId: 1002510140000999, // 硬编码组织ID
|
|
|
+ orgCode: '001', // 硬编码组织编码
|
|
|
+ orgName: '库比森轮胎有限公司', // 硬编码组织名称
|
|
|
visibleRoles: [],
|
|
|
brandScope: [],
|
|
|
customerBlacklist: [],
|
|
|
@@ -539,6 +539,7 @@ export default {
|
|
|
label: '组织名称',
|
|
|
type: 'input',
|
|
|
span: 8,
|
|
|
+ display: false, // 隐藏组织名称字段显示
|
|
|
disabled: true,
|
|
|
rules: this.formRules.orgName
|
|
|
},
|
|
|
@@ -631,28 +632,41 @@ export default {
|
|
|
|
|
|
/**
|
|
|
* 加载客户信息并填充组织字段
|
|
|
- * @description 新增模式下调用接口获取当前用户组织信息,自动填充组织ID、编码、名称
|
|
|
+ * @description 新增模式下使用硬编码组织信息,自动填充组织ID、编码、名称
|
|
|
* @returns {Promise<void>}
|
|
|
* @this {AnnouncementFormMixinComponent & Vue}
|
|
|
*/
|
|
|
async loadCustomerInfo() {
|
|
|
- try {
|
|
|
- this.formLoading = true;
|
|
|
- const response = await getCustomerInfo();
|
|
|
- if (response?.data?.success && response.data.data) {
|
|
|
- const customerData = response.data.data;
|
|
|
- this.$set(this.formData, 'orgId', customerData.ORG_ID || 0);
|
|
|
- this.$set(this.formData, 'orgCode', customerData.ORG_CODE || '');
|
|
|
- this.$set(this.formData, 'orgName', customerData.ORG_NAME || '');
|
|
|
- } else {
|
|
|
- const errorMsg = response?.data?.msg || '获取客户信息失败';
|
|
|
- console.warn('获取客户信息失败:', errorMsg);
|
|
|
- }
|
|
|
- } catch (error) {
|
|
|
- console.error('获取客户信息异常:', error);
|
|
|
- } finally {
|
|
|
- this.formLoading = false;
|
|
|
- }
|
|
|
+ // 业务需求:使用硬编码组织信息替代接口调用
|
|
|
+ // 硬编码值:
|
|
|
+ // orgId: 1002510140000999
|
|
|
+ // orgCode: "001"
|
|
|
+ // orgName: "库比森轮胎有限公司"
|
|
|
+ this.formLoading = false; // 直接设置false,无需异步操作
|
|
|
+
|
|
|
+ // 硬编码填充组织信息
|
|
|
+ this.$set(this.formData, 'orgId', 1002510140000999);
|
|
|
+ this.$set(this.formData, 'orgCode', '001');
|
|
|
+ this.$set(this.formData, 'orgName', '库比森轮胎有限公司');
|
|
|
+
|
|
|
+ // 注释掉的原始接口调用逻辑:
|
|
|
+ // try {
|
|
|
+ // this.formLoading = true;
|
|
|
+ // const response = await getCustomerInfo();
|
|
|
+ // if (response?.data?.success && response.data.data) {
|
|
|
+ // const customerData = response.data.data;
|
|
|
+ // this.$set(this.formData, 'orgId', customerData.ORG_ID || 0);
|
|
|
+ // this.$set(this.formData, 'orgCode', customerData.ORG_CODE || '');
|
|
|
+ // this.$set(this.formData, 'orgName', customerData.ORG_NAME || '');
|
|
|
+ // } else {
|
|
|
+ // const errorMsg = response?.data?.msg || '获取客户信息失败';
|
|
|
+ // console.warn('获取客户信息失败:', errorMsg);
|
|
|
+ // }
|
|
|
+ // } catch (error) {
|
|
|
+ // console.error('获取客户信息异常:', error);
|
|
|
+ // } finally {
|
|
|
+ // this.formLoading = false;
|
|
|
+ // }
|
|
|
},
|
|
|
|
|
|
/**
|