|
|
|
@ -1,71 +1,76 @@ |
|
|
|
<template> |
|
|
|
<div style="display:flex"> |
|
|
|
<div> |
|
|
|
<el-form ref="form" :model="$store.state.customerOrg.customerOrgRd" label-width="110px" :rules="rules" size="medium"> |
|
|
|
<el-form ref="form" :model="customerOrg.customerOrgRd" label-width="110px" :rules="rules" size="medium"> |
|
|
|
<el-row> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="单位名称" prop="display_name"> |
|
|
|
<el-input v-model="$store.state.customerOrg.customerOrgRd.displayName"></el-input> |
|
|
|
<el-form-item label="单位名称" prop="displayName"> |
|
|
|
<el-input v-model="customerOrg.customerOrgRd.displayName"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="简称" prop="short_name"> |
|
|
|
<el-input v-model="$store.state.customerOrg.customerOrgRd.englishShortName"></el-input> |
|
|
|
<el-form-item label="简称" prop="shortName"> |
|
|
|
<el-input v-model="customerOrg.customerOrgRd.shortName"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="上级单位" prop="parent_id"> |
|
|
|
<el-cascader v-model="$store.state.customerOrg.customerOrgRd.itemTypeId" :options="$store.state.customerOrg.customerOrgTree" :props="$store.state.customerOrg.treeprops" |
|
|
|
:show-all-levels="false"> |
|
|
|
<el-form-item label="发票抬头" prop="invoiceName"> |
|
|
|
<el-input v-model="customerOrg.customerOrgRd.invoiceName"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="上级单位" prop="parentId"> |
|
|
|
<el-cascader v-model="customerOrg.customerOrgRd.parentId" :options="customerOrg.customerOrgTree" :props="{ checkStrictly: true ,expandTrigger: 'hover',...customerOrg.treeprops}" |
|
|
|
:show-all-levels="false" clearable filterable> |
|
|
|
</el-cascader> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="联系电话" prop="telephone"> |
|
|
|
<el-input v-model="$store.state.customerOrg.customerOrgRd.price"></el-input> |
|
|
|
<el-input v-model="customerOrg.customerOrgRd.telephone"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="传真" prop="fax"> |
|
|
|
<el-input v-model="$store.state.customerOrg.customerOrgRd.price"></el-input> |
|
|
|
<el-input v-model="customerOrg.customerOrgRd.fax"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="邮政编码" prop="postal_code"> |
|
|
|
<el-input v-model="$store.state.customerOrg.customerOrgRd.price"></el-input> |
|
|
|
<el-form-item label="邮政编码" prop="postalCode"> |
|
|
|
<el-input v-model="customerOrg.customerOrgRd.postalCode"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="地址" prop="address"> |
|
|
|
<el-input v-model="$store.state.customerOrg.customerOrgRd.address"></el-input> |
|
|
|
<el-input v-model="customerOrg.customerOrgRd.address"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="开户银行" prop="bank"> |
|
|
|
<el-input v-model="$store.state.customerOrg.customerOrgRd.bank"></el-input> |
|
|
|
<el-input v-model="customerOrg.customerOrgRd.bank"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="银行账号" prop="accounts"> |
|
|
|
<el-input v-model="$store.state.customerOrg.customerOrgRd.accounts"></el-input> |
|
|
|
<el-input v-model="customerOrg.customerOrgRd.accounts"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="单位性质" prop="org_type_id"> |
|
|
|
<el-select v-model="$store.state.customerOrg.customerOrgRd.priceItemId" placeholder="请选择"> |
|
|
|
<el-form-item label="单位性质" prop="orgTypeId"> |
|
|
|
<el-select v-model="customerOrg.customerOrgRd.orgTypeId" placeholder="请选择" filterable> |
|
|
|
<el-option v-for="item in data.customerOrgType" :key="item.id" :label="item.displayName" :value="item.id"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="单位简码" prop="simple_code"> |
|
|
|
<el-input v-model="$store.state.customerOrg.customerOrgRd.accounts"></el-input> |
|
|
|
<el-form-item label="单位简码" prop="simpleCode"> |
|
|
|
<el-input v-model="customerOrg.customerOrgRd.simpleCode" placeholder="由系统自动生成" disabled></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="受理体检中心" prop="organization_unit_id"> |
|
|
|
<el-select v-model="$store.state.customerOrg.customerOrgRd.organizationUnitId" placeholder="请选择" style="margin-left: 15px" filterable> |
|
|
|
<el-form-item label="体检中心" prop="organizationUnitId"> |
|
|
|
<el-select v-model="customerOrg.customerOrgRd.organizationUnitId" placeholder="请选择" filterable> |
|
|
|
<el-option v-for="item in data.organizationdata" :key="item.id" :label="item.displayName" :value="item.id"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
@ -73,44 +78,48 @@ |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="备注" prop="remark"> |
|
|
|
<el-input v-model="$store.state.customerOrg.customerOrgRd.accounts"></el-input> |
|
|
|
<el-input v-model="customerOrg.customerOrgRd.remark"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="加锁" prop="is_lock"> |
|
|
|
<el-radio v-model="$store.state.customerOrg.customerOrgRd.is_lock" label="Y">是</el-radio> |
|
|
|
<el-radio v-model="$store.state.customerOrg.customerOrgRd.is_lock" label="N">否</el-radio> |
|
|
|
<el-form-item label="加锁" prop="isLock"> |
|
|
|
<el-radio v-model="customerOrg.customerOrgRd.isLock" label="Y">是</el-radio> |
|
|
|
<el-radio v-model="customerOrg.customerOrgRd.isLock" label="N">否</el-radio> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="状态" prop="status_flag"> |
|
|
|
<el-radio v-model="$store.state.customerOrg.customerOrgRd.status_flag" label="1">启用</el-radio> |
|
|
|
<el-radio v-model="$store.state.customerOrg.customerOrgRd.status_flag" label="0">停用</el-radio> |
|
|
|
<el-form-item label="状态" prop="isActive"> |
|
|
|
<el-radio v-model="customerOrg.customerOrgRd.isActive" label="Y">启用</el-radio> |
|
|
|
<el-radio v-model="customerOrg.customerOrgRd.isActive" label="N">停用</el-radio> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item label="显示顺序" prop="displayOrder"> |
|
|
|
<el-input v-model="customerOrg.customerOrgRd.displayOrder"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
|
|
|
|
</el-row> |
|
|
|
<!-- --> |
|
|
|
<el-divider></el-divider> |
|
|
|
<el-row> |
|
|
|
<el-col :span="5"> |
|
|
|
<el-form-item label="创建者"> |
|
|
|
<el-input v-model="$store.state.customerOrg.customerOrgRd.creatorName" disabled></el-input> |
|
|
|
<el-input v-model="customerOrg.customerOrgRd.creatorName" disabled></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="7"> |
|
|
|
<el-form-item label="创建时间" style="margin-left: -5%"> |
|
|
|
<el-input :value="$store.state.customerOrg.customerOrgRd.creationTime | dateFormat" disabled style="width: 90%"></el-input> |
|
|
|
<el-input :value="customerOrg.customerOrgRd.creationTime | dateFormat" disabled style="width: 90%"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="5"> |
|
|
|
<el-form-item label="修改者" style="margin-left: -25%"> |
|
|
|
<el-input v-model="$store.state.customerOrg.customerOrgRd.creatorName" disabled></el-input> |
|
|
|
<el-input v-model="customerOrg.customerOrgRd.creatorName" disabled></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="7"> |
|
|
|
<el-form-item label="修改时间" style="margin-left: -5%"> |
|
|
|
<el-input :value="$store.state.customerOrg.customerOrgRd.lastModificationTime | dateFormat" disabled style="width: 90%"></el-input> |
|
|
|
<el-input :value="customerOrg.customerOrgRd.lastModificationTime | dateFormat" disabled style="width: 90%"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
@ -119,7 +128,7 @@ |
|
|
|
<!-- 按钮区域 --> |
|
|
|
<div style="margin-left: 10px; margin-top: 5%" width="150px"> |
|
|
|
<el-button type="primary" @click="add">新增</el-button> |
|
|
|
<el-button type="primary" @click="Onsubmit" style="margin-left: 0; margin-top: 10px">保存</el-button> |
|
|
|
<el-button type="primary" @click="Onsubmit('form')" style="margin-left: 0; margin-top: 10px">保存</el-button> |
|
|
|
<div style="margin-top: 10px"> |
|
|
|
<el-button type="danger" @click="del">删除</el-button> |
|
|
|
</div> |
|
|
|
@ -128,20 +137,9 @@ |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
|
|
|
|
import { |
|
|
|
getporjectlists, |
|
|
|
projectlist, |
|
|
|
addproject, |
|
|
|
priceitemlist, |
|
|
|
posjrctid, |
|
|
|
projectedit, |
|
|
|
projectdeleft, |
|
|
|
projttitem, |
|
|
|
projectdreog, |
|
|
|
} from "@/request/commonapi"; |
|
|
|
import { unitlist } from "@/request/systemapi"; |
|
|
|
import Sortable from "sortablejs"; |
|
|
|
import { mapState,mapMutations } from 'vuex' |
|
|
|
import { getapi, postapi, putapi, deletapi } from "@/api/api"; |
|
|
|
import { tcdate } from '../../utlis/proFunc' |
|
|
|
|
|
|
|
export default { |
|
|
|
components: { |
|
|
|
@ -149,86 +147,45 @@ export default { |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
data: { |
|
|
|
data: { |
|
|
|
|
|
|
|
organizationdata: [], //体检中心数据 |
|
|
|
customerOrgType:[], //单位类别 |
|
|
|
}, |
|
|
|
form: { |
|
|
|
displayName: "", |
|
|
|
englishShortName: "", |
|
|
|
itemTypeId: "", |
|
|
|
price: "", |
|
|
|
priceItemId: "", |
|
|
|
unitId: "", |
|
|
|
defaultResult: "", |
|
|
|
referenceRangeTypeFlag: "", |
|
|
|
isProduceSummary: "", |
|
|
|
isNameIntoSummary: "", |
|
|
|
isDiagnosisFunction: "", |
|
|
|
diagnosisFunction: "", |
|
|
|
isCalculationItem: "", |
|
|
|
calculationFunction: "", |
|
|
|
isContinueProcess: "", |
|
|
|
resultTemplateTypeFlag: "", |
|
|
|
inputCheck: "", |
|
|
|
isActive: "", |
|
|
|
}, |
|
|
|
|
|
|
|
pojo:{ |
|
|
|
displayName: "string", |
|
|
|
shortName: "string", |
|
|
|
invoiceName: "string", |
|
|
|
parentId: "3fa85f64-5717-4562-b3fc-2c963f66afa6", |
|
|
|
telephone: "string", |
|
|
|
fax: "string", |
|
|
|
postalCode: "string", |
|
|
|
address: "string", |
|
|
|
bank: "string", |
|
|
|
accounts: "string", |
|
|
|
orgTypeId: "3fa85f64-5717-4562-b3fc-2c963f66afa6", |
|
|
|
remark: "string", |
|
|
|
isLock: "N", |
|
|
|
isActive: "Y", |
|
|
|
organizationUnitId: "3fa85f64-5717-4562-b3fc-2c963f66afa6" |
|
|
|
}, //单位 记录 目前新增与更新是一致 |
|
|
|
|
|
|
|
rules: { |
|
|
|
displayName: [ |
|
|
|
{ required: true, message: "请输入名称", trigger: "blur" }, |
|
|
|
], |
|
|
|
englishShortName: [ |
|
|
|
{ required: true, message: "请输入英文缩写", trigger: "blur" }, |
|
|
|
], |
|
|
|
itemTypeId: [ |
|
|
|
{ required: true, message: "请输入项目类别", trigger: "blur" }, |
|
|
|
], |
|
|
|
price: [{ required: true, message: "请输入价格", trigger: "blur" }], |
|
|
|
priceItemId: [ |
|
|
|
{ required: true, message: "请输入价表项目编码", trigger: "blur" }, |
|
|
|
], |
|
|
|
unitId: [{ required: true, message: "请输入单位", trigger: "blur" }], |
|
|
|
defaultResult: [ |
|
|
|
{ required: true, message: "请输入默认结果", trigger: "blur" }, |
|
|
|
], |
|
|
|
referenceRangeTypeFlag: [ |
|
|
|
{ required: true, message: "请输入参考范围类别", trigger: "blur" }, |
|
|
|
], |
|
|
|
isProduceSummary: [ |
|
|
|
{ required: true, message: "请选择是生成小结", trigger: "blur" }, |
|
|
|
], |
|
|
|
isNameIntoSummary: [ |
|
|
|
{ required: true, message: "请输择称进入小结", trigger: "blur" }, |
|
|
|
], |
|
|
|
isDiagnosisFunction: [ |
|
|
|
{ required: true, message: "请选择启用诊断函数", trigger: "blur" }, |
|
|
|
shortName: [ |
|
|
|
{ required: true, message: "请输入简写", trigger: "blur" }, |
|
|
|
], |
|
|
|
diagnosisFunction: [ |
|
|
|
{ required: true, message: "请输入诊断函数", trigger: "blur" }, |
|
|
|
orgTypeId:[ |
|
|
|
{ required: true, message: "请输入单位性质"}, |
|
|
|
], |
|
|
|
isCalculationItem: [ |
|
|
|
{ required: true, message: "请选择计算项目", trigger: "blur" }, |
|
|
|
organizationUnitId: [ |
|
|
|
{ required: true, message: "请输入体检中心", trigger: "blur" }, |
|
|
|
], |
|
|
|
calculationFunction: [ |
|
|
|
{ required: true, message: "请输入计算函数", trigger: "blur" }, |
|
|
|
displayOrder: [ |
|
|
|
{ required: true, message: "请输入显示顺序", trigger: "blur" }, |
|
|
|
], |
|
|
|
isContinueProcess: [ |
|
|
|
{ required: true, message: "请选择继续处理", trigger: "blur" }, |
|
|
|
], |
|
|
|
resultTemplateTypeFlag: [ |
|
|
|
{ |
|
|
|
required: true, |
|
|
|
message: "请输入结果模板类别标志", |
|
|
|
trigger: "blur", |
|
|
|
}, |
|
|
|
], |
|
|
|
inputCheck: [ |
|
|
|
{ required: true, message: "请选择结果校验公式", trigger: "blur" }, |
|
|
|
], |
|
|
|
isActive: [{ required: true, message: "请选择启用", trigger: "blur" }], |
|
|
|
}, |
|
|
|
|
|
|
|
isshow: false, |
|
|
|
@ -251,9 +208,12 @@ export default { |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
computed:{ |
|
|
|
...mapState(['customerOrg']), |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
|
|
|
|
|
|
|
|
...mapMutations(['setData']), |
|
|
|
//获取组织体检中心数据 |
|
|
|
getoraniztion() { |
|
|
|
getapi("/api/app/organization-units/organization-unit-by-is-peis").then( |
|
|
|
@ -270,40 +230,83 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
//更新获取单位树节点数据 |
|
|
|
getCustomerOrgTree(){ |
|
|
|
getapi("/api/app/customer-org/by-code-all").then( |
|
|
|
(res) => { |
|
|
|
//customerOrgTree = res.data; |
|
|
|
console.log('res.data',res.data) |
|
|
|
this.setData({ key: 'customerOrg.customerOrgTree', value: res.data}) |
|
|
|
tcdate(this.customerOrg.customerOrgTree) |
|
|
|
} |
|
|
|
); |
|
|
|
}, |
|
|
|
|
|
|
|
//确定新增或者编辑 |
|
|
|
Onsubmit() { |
|
|
|
this.$refs.$store.state.customerOrg.customerOrgRd.validate((v) => { |
|
|
|
if (v) { |
|
|
|
if (this.title == 1) { |
|
|
|
addproject(this.form).then((res) => { |
|
|
|
this.$message.success("新增成功"); |
|
|
|
this.getlist(); |
|
|
|
this.dialogVisible = false; |
|
|
|
}); |
|
|
|
} else if (this.title == 2) { |
|
|
|
projectedit(this.$store.state.customerOrg.customerOrgRd.id, this.form).then((res) => { |
|
|
|
this.$message.success("修改成功"); |
|
|
|
this.getlist(); |
|
|
|
this.dialogVisible = false; |
|
|
|
}); |
|
|
|
//提交 |
|
|
|
Onsubmit(formName) { |
|
|
|
console.log('vuex data',this.customerOrg.customerOrgRd) |
|
|
|
let vpojo = this.customerOrg.customerOrgRd |
|
|
|
this.$refs[formName].validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
//赋值 |
|
|
|
this.pojo = { |
|
|
|
displayName: vpojo.displayName, |
|
|
|
shortName: vpojo.shortName, |
|
|
|
invoiceName: vpojo.invoiceName, |
|
|
|
parentId: vpojo.parentId, |
|
|
|
telephone: vpojo.telephone, |
|
|
|
fax: vpojo.fax, |
|
|
|
postalCode: vpojo.postalCode, |
|
|
|
address: vpojo.address, |
|
|
|
bank: vpojo.bank, |
|
|
|
accounts: vpojo.accounts, |
|
|
|
orgTypeId: vpojo.orgTypeId, |
|
|
|
remark: vpojo.remark, |
|
|
|
isLock: vpojo.isLock, |
|
|
|
isActive: vpojo.isActive, |
|
|
|
organizationUnitId: vpojo.organizationUnitId |
|
|
|
} |
|
|
|
console.log('pojo',this.pojo) |
|
|
|
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.getCustomerOrgTree() |
|
|
|
} |
|
|
|
); |
|
|
|
|
|
|
|
}else{ |
|
|
|
//id不为空则编辑 |
|
|
|
putapi(`/api/app/customer-org/${this.customerOrg.customerOrgRd.id}`, this.pojo).then( |
|
|
|
(res) => { |
|
|
|
this.$message.success("更新 操作成功"); |
|
|
|
this.getCustomerOrgTree() |
|
|
|
} |
|
|
|
); |
|
|
|
} |
|
|
|
} else { |
|
|
|
alert('未通过数据校验'); |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
// addproject(this.form) |
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
//新增弹框 |
|
|
|
add() { |
|
|
|
this.$store.state.customerOrg.customerOrgRd.price = Number(this.$store.state.customerOrg.customerOrgRd.price); |
|
|
|
this.title = 1; |
|
|
|
this.dialogVisible = true; |
|
|
|
this.form = {}; |
|
|
|
this.addorgropdata(); |
|
|
|
this.setData({ key: 'customerOrg.customerOrgRd', value:{id:''}}) |
|
|
|
}, |
|
|
|
|
|
|
|
//删除 |
|
|
|
del(){ |
|
|
|
this.$message.success("删除 del"); |
|
|
|
deletapi(`/api/app/customer-org/${this.customerOrg.customerOrgRd.id}`).then( |
|
|
|
(res) => { |
|
|
|
this.$message.success("删除 操作成功"); |
|
|
|
this.setData({ key: 'customerOrg.customerOrgRd', value:{id:''}}) |
|
|
|
this.getCustomerOrgTree() |
|
|
|
} |
|
|
|
); |
|
|
|
} |
|
|
|
}, |
|
|
|
}; |
|
|
|
|