Browse Source

customerorg

master
pengjun 2 years ago
parent
commit
a041ac49d7
  1. 61
      src/components/customerOrg/ContactPerson.vue
  2. 2
      src/components/customerOrg/customerOrgEdit.vue
  3. 62
      src/components/customerOrg/customerOrgRegister.vue

61
src/components/customerOrg/ContactPerson.vue

@ -53,7 +53,7 @@
</el-table-column>
</el-table>
</div>
<div style="margin-left: 10px; margin-top: 40px">
<div style="margin-left: 10px; margin-top: 20px">
<div style="margin-top: 10px">
<el-button type="primary" @click="add" class="btnClass">新增</el-button>
</div>
@ -67,7 +67,7 @@
</div>
<!-- 联系人 -->
<el-dialog :title="formTitle" :visible.sync="dialogContactPerson" width="800px">
<el-form :model="form" ref="form" label-width="100px" :rules="rules">
<el-form :model="form" ref="form" label-width="70px" :rules="rules" style="margin-top: -30px;">
<el-row>
<el-col :span="12">
<el-form-item prop="displayName" label="联系人">
@ -92,26 +92,25 @@
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="创建时间" style="margin-left: -5%">
<el-input :value="form.creationTime | dateFormat" disabled style="width: 90%" size="small"></el-input>
<el-form-item label="创建时间" label-width="80px" style="margin-left:-10px;">
<el-date-picker v-model="form.creationTime" type="datetime" size="small" style="width: 100%" disabled />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="修改者" style="margin-left: -25%">
<el-form-item label="修改者" >
<el-input v-model="form.creatorName" disabled size="small"></el-input>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="修改时间" style="margin-left: -5%">
<el-input :value="form.lastModificationTime | dateFormat" disabled style="width: 90%"
size="small"></el-input>
<el-form-item label="修改时间" label-width="80px" style="margin-left:-10px;">
<el-date-picker v-model="form.lastModificationTime" type="datetime" size="small" style="width: 100%"
disabled />
</el-form-item>
</el-col>
</el-row>
<el-divider />
<el-table :data="customerOrg.contactMethodList" border height="300" row-key="id" size="small"
highlight-current-row ref="contactMethod">
<el-table-column prop="contactMethodType" label="类型">
highlight-current-row ref="contactMethod" style="margin-top: 20px;">
<el-table-column prop="contactMethodType" label="类型" width="200">
<template slot-scope="scope">
<el-select v-model="scope.row.contactMethodType" size="small">
<el-option v-for="item in Methodtypes" :key="item.value" :label="item.label" :value="item.value" />
@ -123,7 +122,7 @@
<el-input v-model="scope.row.contactMethodValue" required size="small" />
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="60">
<el-table-column fixed="right" label="操作" width="60" align="center">
<template slot-scope="scope">
<i class="el-icon-delete" @click="deleteRow(scope.$index)"
style="font-size: 24px;color: red;cursor:pointer;"></i>
@ -364,4 +363,42 @@ export default {
.btnClass {
width: 110px;
}
::v-deep .el-form-item {
margin-bottom: 2px;
}
::v-deep .el-input__inner {
/*text-align: center;*/
padding-left: 2px;
padding-right: 15px;
}
::v-deep .el-input__icon{
width: 15px; /* 输入框下拉箭头或清除图标 默认 25 */
}
/* 表格 表头 列间距控制 */
::v-deep .el-table th.el-table__cell>.cell{
text-align: center; /* 表格 表头 对齐方式,默认 left */
padding-right: 2px; /* 表格 表头 列间距控制,默认 10px */
padding-left: 2px; /* 表格 表头 列间距控制,默认 10px */
}
/* 表格 表体 首列左间距控制 */
::v-deep .el-table--border .el-table__cell:first-child .cell {
padding-left: 2px; /* 表格 表体 首列左间距控制,默认 10px */
}
/* 表格 行列间距控制 ,默认 10 px*/
::v-deep .el-table__cell {
padding: 2px 2px 2px 2px; /* 上,右,下,左 */
}
/* 表格单元格 .el-table .cell ,默认 10 px*/
::v-deep .cell {
padding-left: 2px;
padding-right: 2px;
}
::v-deep .el-icon-date:before {
content: ""
}
</style>

2
src/components/customerOrg/customerOrgEdit.vue

@ -373,10 +373,10 @@ export default {
this.customerOrg.customerOrgRd.id = '';
this.customerOrg.customerOrgRd = { id: "", isLock: "N", isActive: "Y", parentId: this.customerOrg.customerOrgId };
} else {
this.customerOrg.customerOrgRd = { id: "", isLock: "N", isActive: "Y", parentId: null };
}
objCopy(this.customerOrg.customerOrgRd,this.form)
this.customerOrg.customerOrgId = "";
},

62
src/components/customerOrg/customerOrgRegister.vue

@ -37,7 +37,7 @@
</el-table-column>
</el-table>
</div>
<div style="margin-left: 10px; margin-top: 40px">
<div style="margin-left: 10px; margin-top: 20px">
<div style="margin-top: 10px">
<el-button type="primary" @click="add" class="btnClass">增加次数</el-button>
</div>
@ -45,7 +45,10 @@
<el-button type="success" @click="edit" class="btnClass">体检完成</el-button>
</div>
<div style="margin-top: 10px">
<el-button type="danger" @click="cansel" class="btnClass">取消完成</el-button>
<el-button type="warning" @click="cansel" class="btnClass">取消完成</el-button>
</div>
<div style="margin-top: 10px">
<el-button type="danger" @click="btnDel" class="btnClass">删除次数</el-button>
</div>
</div>
</div>
@ -54,6 +57,7 @@
import moment from "moment";
import { mapState, mapMutations } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { tcdate, objCopy, deepCopy,arrayExistObj } from "../../utlis/proFunc";
export default {
components: {},
@ -108,21 +112,24 @@ export default {
},
//
add() {
async add() {
//this.$message.success(" addTimes");
let customerOrgId = this.customerOrg.customerOrgRegisterList[0].customerOrgId
if (!customerOrgId) {
alert("单位信息未保存!");
if (!this.customerOrg.customerOrgId){
this.$message.warning("单位信息未保存!");
return;
}
postapi(
`/api/customerorgregister/createcustomerorgregister?CustomerOrgId=${customerOrgId}`
).then((res) => {
if (res.Code != -1) {
this.getCustomerOrgRegisterList(customerOrgId);
this.$message.success("操作成功!");
}
});
try {
let result = await getapi(`/api/app/customer-org/parent/${this.customerOrg.customerOrgId}`)
postapi(`/api/customerorgregister/createcustomerorgregister?CustomerOrgId=${result.data}`).then((res) => {
if (res.Code != -1) {
this.getCustomerOrgRegisterList(result.data);
this.$message.success("操作成功!");
}
})
} catch (error) {
this.$message.error("操作失败!"+err);
}
},
edit() {
@ -134,6 +141,33 @@ export default {
//this.$message.success(" editCustomerOrgRegister");
this.setOrgRegisterState("N");
},
btnDel(){
if (!this.customerOrg.customerOrgId || !this.customerOrgRegisterId) {
//console.log(this.customerOrg.customerOrgId, this.customerOrgRegisterId);
this.$message.warning('请选中要操作的体检次数')
return;
}
this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", {
confirmButtonText: "是",
cancelButtonText: "否",
type: "warning",
}).then(() => {
//console.log('{patientRegisterIds}',{patientRegisterIds})
return deletapi(`/api/app/customer-org-register/${this.customerOrgRegisterId}`);
}).then((res) => {
if(res.code != -1) {
this.$message.success("删除 操作成功");
let lfind = arrayExistObj(this.customerOrg.customerOrgRegisterList, 'id', this.customerOrgRegisterId)
if(lfind > - 1) this.customerOrg.customerOrgRegisterList.splice(lfind,1)
this.customerOrgRegisterId = ''
}
}).catch((err) => {
//
});
}
},
};
</script>

Loading…
Cancel
Save