mch 3 years ago
parent
commit
e96478d826
  1. 27
      src/components/customerOrg/customerOrgEdit.vue
  2. 2
      src/store/index.js

27
src/components/customerOrg/customerOrgEdit.vue

@ -156,18 +156,18 @@ export default {
displayName: "string", displayName: "string",
shortName: "string", shortName: "string",
invoiceName: "string", invoiceName: "string",
parentId: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
parentId: null,
telephone: "string", telephone: "string",
fax: "string", fax: "string",
postalCode: "string", postalCode: "string",
address: "string", address: "string",
bank: "string", bank: "string",
accounts: "string", accounts: "string",
orgTypeId: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
orgTypeId: null,
remark: "string", remark: "string",
isLock: "N", isLock: "N",
isActive: "Y", isActive: "Y",
organizationUnitId: "3fa85f64-5717-4562-b3fc-2c963f66afa6"
organizationUnitId: null
}, // }, //
rules: { rules: {
@ -266,16 +266,27 @@ export default {
isActive: vpojo.isActive, isActive: vpojo.isActive,
organizationUnitId: vpojo.organizationUnitId organizationUnitId: vpojo.organizationUnitId
} }
//
if(this.pojo.parentId && this.pojo.parentId.length > 0){
this.pojo.parentId = this.pojo.parentId[this.pojo.parentId.length - 1]
}else{
this.pojo.parentId = null
}
console.log('pojo',this.pojo) console.log('pojo',this.pojo)
console.log(this.customerOrg.customerOrgRd)
if(this.customerOrg.customerOrgRd.id.length < 1){ if(this.customerOrg.customerOrgRd.id.length < 1){
//id //id
postapi(`/api/app/customer-org`, this.pojo).then( postapi(`/api/app/customer-org`, this.pojo).then(
(res) => { (res) => {
this.$message.success("创健 操作成功");
this.setData({ key: 'customerOrg.customerOrgRd', value: res})
this.customerOrg.customerOrgId = res.id
this.getCustomerOrgTree()
if(res.code == 1){
this.$message.success("创健 操作成功");
this.setData({ key: 'customerOrg.customerOrgRd', value: res})
this.customerOrg.customerOrgId = res.id
this.customerOrg.customerOrgRd = res
this.getCustomerOrgTree()
}
} }
); );

2
src/store/index.js

@ -14,7 +14,7 @@ export default new Vuex.Store({
children: "treeChildren", children: "treeChildren",
}, //树形组件的数据结构 }, //树形组件的数据结构
customerOrgId:'',//当前单位ID(可根据此值是否为空,判断是新增还是编辑) customerOrgId:'',//当前单位ID(可根据此值是否为空,判断是新增还是编辑)
customerOrgRd:{displayName:'单位名称',englishShortName:'简称'}, //单个体检单位记录值
customerOrgRd:{displayName:'单位名称'}, //单个体检单位记录值
customerOrgRegisterList: [], //单位体检次数登记列表 customerOrgRegisterList: [], //单位体检次数登记列表
contactPersonList:[], //联系人列表 contactPersonList:[], //联系人列表
contactMethodList:[], //联系方式列表 contactMethodList:[], //联系方式列表

Loading…
Cancel
Save