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

29
src/components/customerOrg/customerOrgEdit.vue

@ -156,18 +156,18 @@ export default {
displayName: "string",
shortName: "string",
invoiceName: "string",
parentId: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
parentId: null,
telephone: "string",
fax: "string",
postalCode: "string",
address: "string",
bank: "string",
accounts: "string",
orgTypeId: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
orgTypeId: null,
remark: "string",
isLock: "N",
isActive: "Y",
organizationUnitId: "3fa85f64-5717-4562-b3fc-2c963f66afa6"
organizationUnitId: null
}, //
rules: {
@ -266,16 +266,27 @@ export default {
isActive: vpojo.isActive,
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(this.customerOrg.customerOrgRd)
if(this.customerOrg.customerOrgRd.id.length < 1){
//id
postapi(`/api/app/customer-org`, this.pojo).then(
(res) => {
this.$message.success("创健 操作成功");
this.setData({ key: 'customerOrg.customerOrgRd', value: res})
this.customerOrg.customerOrgId = res.id
this.getCustomerOrgTree()
(res) => {
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",
}, //树形组件的数据结构
customerOrgId:'',//当前单位ID(可根据此值是否为空,判断是新增还是编辑)
customerOrgRd:{displayName:'单位名称',englishShortName:'简称'}, //单个体检单位记录值
customerOrgRd:{displayName:'单位名称'}, //单个体检单位记录值
customerOrgRegisterList: [], //单位体检次数登记列表
contactPersonList:[], //联系人列表
contactMethodList:[], //联系方式列表

Loading…
Cancel
Save