浏览代码

企业信息编辑问题修复
厂商机构代码输入问题修复

hcf 1 年之前
父节点
当前提交
df7af2721e
共有 2 个文件被更改,包括 13 次插入2 次删除
  1. 5 1
      src/views/audit/Information/index.vue
  2. 8 1
      src/views/audit/manufacturer/index.vue

+ 5 - 1
src/views/audit/Information/index.vue

@@ -4,7 +4,8 @@
 			<div v-show="isShow==='home'" key="item">
 			<div v-show="isShow==='home'" key="item">
 				<el-descriptions title="企业信息" :column="3" border>
 				<el-descriptions title="企业信息" :column="3" border>
 					<template slot="extra">
 					<template slot="extra">
-						<el-button type="primary" size="small" @click="openEdit">编辑</el-button>
+						<el-button type="primary" size="small" v-if="baseInfo&&baseInfo.name" @click="openEdit">编辑</el-button>
+						<el-button type="primary" size="small" v-else @click="toAdd">添加</el-button>
 					</template>
 					</template>
 					<el-descriptions-item label="机构名称">{{baseInfo.name?baseInfo.name:'-'}}</el-descriptions-item>
 					<el-descriptions-item label="机构名称">{{baseInfo.name?baseInfo.name:'-'}}</el-descriptions-item>
 					<el-descriptions-item label="机构代码">{{baseInfo.organizationCode?baseInfo.organizationCode:'-'}}</el-descriptions-item>
 					<el-descriptions-item label="机构代码">{{baseInfo.organizationCode?baseInfo.organizationCode:'-'}}</el-descriptions-item>
@@ -301,6 +302,9 @@
 				}
 				}
 			}).catch(() => {});
 			}).catch(() => {});
 		}
 		}
+		toAdd(){
+			this.$router.push('/organ/manufacturer');
+		}
 		openEdit(e : any) {
 		openEdit(e : any) {
 			// console.log('打开编辑 ==> ', e);
 			// console.log('打开编辑 ==> ', e);
 			this.isShow = 'add'; // 展示类型
 			this.isShow = 'add'; // 展示类型

+ 8 - 1
src/views/audit/manufacturer/index.vue

@@ -18,7 +18,7 @@
 			<div class="box-shadow">
 			<div class="box-shadow">
 				<by-form :propConfig="addConfig" ref="addFormId">
 				<by-form :propConfig="addConfig" ref="addFormId">
 					<template v-slot:organizationCode="{value}" class="clearfix">
 					<template v-slot:organizationCode="{value}" class="clearfix">
-						<vxe-input v-model="value.organizationCode" :disabled="value.organizationCode&&popTitle=='编辑'" style="width: 100%;"></vxe-input>
+						<vxe-input v-model="value.organizationCode" :disabled="isOrganizationCode" style="width: 100%;"></vxe-input>
 					</template>
 					</template>
 					<template v-slot:k3ServerUrl="{value}" class="clearfix">
 					<template v-slot:k3ServerUrl="{value}" class="clearfix">
 						<!-- <i class="el-icon-question" title="私有云必须配置金蝶云星空产品地址,K3Cloud/结尾,若为公有云则必须置空"></i> -->
 						<!-- <i class="el-icon-question" title="私有云必须配置金蝶云星空产品地址,K3Cloud/结尾,若为公有云则必须置空"></i> -->
@@ -51,6 +51,7 @@
 		radio : any = 0
 		radio : any = 0
 		dialogFormVisible : boolean = false
 		dialogFormVisible : boolean = false
 		categoryIds : any = '';
 		categoryIds : any = '';
+		isOrganizationCode : boolean = true
 		toolConfig = {
 		toolConfig = {
 			tools: {
 			tools: {
 				return: true,
 				return: true,
@@ -531,6 +532,7 @@
 			this.popTitle = '新增'
 			this.popTitle = '新增'
 			this.dialogFormVisible = true;
 			this.dialogFormVisible = true;
 			this.radio = 0
 			this.radio = 0
+			this.isOrganizationCode = false
 			this.$nextTick(() => (this as any).$refs.addFormId.setValue());
 			this.$nextTick(() => (this as any).$refs.addFormId.setValue());
 		}
 		}
 		// 打开编辑
 		// 打开编辑
@@ -544,6 +546,11 @@
 					let data = res.data;
 					let data = res.data;
 					this.radio = data.status;
 					this.radio = data.status;
 					this.dialogFormVisible = true;
 					this.dialogFormVisible = true;
+					if(res.data.organizationCode){
+						this.isOrganizationCode = true
+					}else{
+						this.isOrganizationCode = false
+					}
 					this.$nextTick(() => (this as any).$refs.addFormId.setValue(data));
 					this.$nextTick(() => (this as any).$refs.addFormId.setValue(data));
 					loading.close();
 					loading.close();
 				} else loading.close();
 				} else loading.close();