|
|
@@ -44,6 +44,7 @@
|
|
|
<DkTableColumn field="orgCode" ></DkTableColumn>
|
|
|
<DkTableColumn field="orgMac"></DkTableColumn>
|
|
|
<DkTableColumn field="whName"></DkTableColumn>
|
|
|
+ <DkTableColumn field="flgBusiness" type="switch" ></DkTableColumn>
|
|
|
<DkTableColumn field="flgValid" type="switch" ></DkTableColumn>
|
|
|
<DkTableColumn field="remarks" width="auto"></DkTableColumn>
|
|
|
</DkTable>
|
|
|
@@ -93,6 +94,15 @@
|
|
|
@ok="moneyAccountOk($event)"
|
|
|
:type="this.$config.MagnifierType.moneyAccount"/>
|
|
|
</DkFormItem>
|
|
|
+ <!--业务部门标识-->
|
|
|
+ <DkFormItem prop="flgBusiness">
|
|
|
+ <template>
|
|
|
+ <i-switch v-model="formData.flgBusiness">
|
|
|
+ <span slot="open"></span>
|
|
|
+ <span slot="close"></span>
|
|
|
+ </i-switch>
|
|
|
+ </template>
|
|
|
+ </DkFormItem>
|
|
|
<!--备注-->
|
|
|
<DkFormItem prop="remarks">
|
|
|
<InputPop v-model="formData.remarks" textareaFlag/>
|
|
|
@@ -114,6 +124,7 @@ export default {
|
|
|
formData: {
|
|
|
orgCode: null,
|
|
|
orgName: null,
|
|
|
+ levelNo: 1,
|
|
|
parentId: null,
|
|
|
levelLeaf: null,
|
|
|
displayNo: null,
|
|
|
@@ -126,6 +137,8 @@ export default {
|
|
|
macId:null,
|
|
|
macCode:null,
|
|
|
macName:null,
|
|
|
+ flgBusiness:false,
|
|
|
+ levelCode:null,
|
|
|
},
|
|
|
// 获取topId值
|
|
|
topId: null,
|
|
|
@@ -135,6 +148,8 @@ export default {
|
|
|
editTopFlgValid:null,
|
|
|
// 父级信息
|
|
|
parentOrgList:[],
|
|
|
+ // =存原始父级数据
|
|
|
+ parentOrgSocial:[],
|
|
|
// 查询条件
|
|
|
searchContent: [
|
|
|
{
|
|
|
@@ -153,24 +168,39 @@ export default {
|
|
|
detail(id) {
|
|
|
return this.excuteNoParam(this.$service.orgService, this.$service.orgService.selectById, [id],false)
|
|
|
},
|
|
|
-
|
|
|
+ /**
|
|
|
+ * @desc : 加载基础数据
|
|
|
+ * @author : 姜宁
|
|
|
+ * @date : 2024/7/30 14:21
|
|
|
+ */
|
|
|
+ initData(type){
|
|
|
+ if(!type){
|
|
|
+ this.getUpperOrg();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * @desc : 获取上级组织机构
|
|
|
+ * @author : 姜宁
|
|
|
+ * @date : 2024/7/30 14:21
|
|
|
+ */
|
|
|
+ getUpperOrg(){
|
|
|
+ this.excute(this.$service.commonService, this.$service.commonService.getOrg, {}).then(res => {
|
|
|
+ if (res.code === this.$config.SUCCESS_CODE) {
|
|
|
+ this.parentOrgList = res.data;
|
|
|
+ this.parentOrgSocial = res.data?.copy();
|
|
|
+ // 赋值TopId
|
|
|
+ this.topId=res.data[0].topId;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
/**
|
|
|
* @desc : 查询数据
|
|
|
* @author : 宋扬
|
|
|
* @date : 2024/3/8 15:43
|
|
|
*/
|
|
|
getData(params) {
|
|
|
- let excute = this.excute(this.$service.orgService, this.$service.orgService.selectByCond, params)
|
|
|
- excute.then(res=>{
|
|
|
- if (res.code === this.$config.SUCCESS_CODE) {
|
|
|
- this.parentOrgList=res.data.list;
|
|
|
- // 赋值TopId
|
|
|
- this.topId=res.data.list[0].topId;
|
|
|
- }
|
|
|
- })
|
|
|
- return excute
|
|
|
+ return this.excute(this.$service.orgService, this.$service.orgService.selectByCond, params);
|
|
|
},
|
|
|
-
|
|
|
/**
|
|
|
* @desc : 保存数据
|
|
|
* @author : 付斌
|
|
|
@@ -183,7 +213,6 @@ export default {
|
|
|
return this.excute(this.$service.orgService, this.$service.orgService.update, this.params)
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
/**
|
|
|
* @desc : 仓库赋值
|
|
|
* @author : 宋扬
|
|
|
@@ -209,7 +238,17 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
+ /**
|
|
|
+ * @desc : 编辑时获取业务部门下拉数据源
|
|
|
+ * @author : 姜宁
|
|
|
+ * @date : 2024/7/30 13:50
|
|
|
+ */
|
|
|
+ setValuesByEdit(){
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ this.parentOrgList = this.parentOrgSocial.filter(item=>item.levelCode.indexOf(this.formData.levelCode) === -1)
|
|
|
+ console.log("parentOrgList",this.parentOrgList)
|
|
|
+ })
|
|
|
+ },
|
|
|
/**
|
|
|
* @desc : 资金账户
|
|
|
* @author : 宋扬
|
|
|
@@ -243,7 +282,9 @@ export default {
|
|
|
*/
|
|
|
currentChangeEvent({row}) {
|
|
|
if (row != null) {
|
|
|
- this.formData.parentId = row.orgId;
|
|
|
+ if (this.modalParams.button === this.$config.formMode.add){
|
|
|
+ this.formData.parentId = row.orgId;
|
|
|
+ }
|
|
|
// 判断是否是底层数据
|
|
|
this.flgValid = row.levelLeaf;
|
|
|
if(row.parentId==null){
|
|
|
@@ -260,6 +301,7 @@ export default {
|
|
|
this.primaryKey = 'orgId' // 设置主键Id
|
|
|
this.routeObjName = 'org' // 设置路由名称
|
|
|
this.comHandleEnableFlag = true;
|
|
|
+ this.pageFlag = false
|
|
|
}
|
|
|
}
|
|
|
</script>
|