罗斌杰 2 years ago
parent
commit
5e8b684835
  1. 2
      src/assets/css/global_button.css
  2. 6
      src/assets/css/global_table.css
  3. 1
      src/components/customerOrg/ContactPerson.vue
  4. 624
      src/components/customerOrg/customerOrgGroupAsbitem.vue
  5. 483
      src/components/customerOrg/customerOrgGroupList.vue
  6. 3
      src/components/patientRegister/PatientRegisterItem.vue
  7. 16
      src/components/report/CusOrgOCX.vue
  8. 2
      src/views/Home.vue
  9. 550
      src/views/customerOrg/customerOrgGroup.vue
  10. 4
      src/views/customerOrg/patientRegister.vue

2
src/assets/css/global_button.css

@ -1,6 +1,6 @@
.el-button {
background: #FFF;
border: 1px solid #0B663D !important; /*原始 默认值 1px solid #DCDFE6; */
border: 1px solid #0B663D; /*原始 默认值 1px solid #DCDFE6; */
color: #0B663D !important; /*原始 默认值 #606266 */
font-weight: 700; /*原始 默认值 500 */
font-family: 'Microsoft YaHei'; /*原始 默认值 Arial */

6
src/assets/css/global_table.css

@ -11,9 +11,15 @@
}
/* 表格 行列间距控制 ,默认 10 px*/
.el-table--small .el-table__cell {
padding: 0 0; /* 原始 默认值 8px 0 */
}
.el-table__cell {
padding: 2px 2px 2px 2px; /* 上,右,下,左 */
}
.el-table .cell {
padding: 0px 2px; /* 原始 默认 0px 10px; */
}
/* 表格单元格 .el-table .cell ,默认 10 px*/
.cell {

1
src/components/customerOrg/ContactPerson.vue

@ -213,6 +213,7 @@ export default {
this.formTitle = "新增";
this.personId = "";
this.customerOrg.contactMethodList = [];
this.contactMethodListEdit = [];
},
edit() {

624
src/components/customerOrg/customerOrgGroupAsbitem.vue

@ -0,0 +1,624 @@
<template>
<div style="display: flex; margin-top:5px;">
<div :style="'display: flex;width:' + (window.pageWidth - 45 - 110) + 'px;'">
<!--未选组合项目-->
<div style="display: block; width:230px;">
<div>
<span>项目类别</span>
<el-cascader :options="dict.itemTypeTree" v-model="itemTypeIds" style="margin-left: 3px;width:160px;"
:props="{ checkStrictly: true, expandTrigger: 'hover', ...customerOrg.treeprops, }" :show-all-levels="false"
clearable filterable @change="getAsbItemByItemType" size="small">
</el-cascader>
</div>
<div class="box">
<el-table :data="dict.asbItem" border size="small" highlight-current-row
:height="window.pageHeight < 668 ? 200:(window.pageHeight - 110 - 358)"
@row-dblclick="dbClickChoosedAsb"
@selection-change="handleSelectionChange" :row-class-name="handleRowClassName"
@row-click="chooseAsbItem">
<!--
<el-table-column type="selection" align="center" ></el-table-column>
-->
<el-table-column type="index" align="center" min-width="40"/>
<el-table-column
label="未选组合项目" min-width="170"
prop="displayName" align="center"
></el-table-column>
</el-table>
</div>
</div>
<!--中间操作按钮-->
<div style="display: block;margin: 40px 10px 0 10px;">
<div>
<el-button class="btnClass" @click="addAbs(asbItemChoosed,'choosed')" >添加 <i class="el-icon-arrow-right"></i></el-button>
</div>
<div>
<el-button class="btnClass" @click="addAbs(asbItemChoosed,'all')">全部添加</el-button>
</div>
<div>
<el-button class="btnClass"
@click="delAbs(patientRegisterAbsChoosed,'choosed')">移除 <i class="el-icon-arrow-left"></i
></el-button>
</div>
<div>
<el-button class="btnClass" @click="delAbs(patientRegisterAbsChoosed,'all')">全部移除</el-button>
</div>
<div>
<el-button class="btnClass"
@click="Onsubmit"
>保存
</el-button>
</div>
</div>
<!--已选组合项目-->
<div :style="'display: block; width:' + (window.pageWidth - 230 - 120 - 45 - 110) + 'px;'">
<div style="height:32px;">
<span>快速选择</span>
<el-select v-model="asbItemId" placeholder="快速选择组合项目" size="small"
filterable clearable remote automatic-dropdown
:remote-method="remoteMethod" @change="quickChoosedAsb" default-first-option ref="asbItemId"
style="margin-left: 3px;width:160px;">
<el-option v-for="item in quickAsb" :key="item.id" :value="item.id" :label="item.displayName" />
</el-select>
</div>
<div class="box">
<el-table :data="customerOrgGroupAsbitems" border size="small"
@selection-change="selecteditems" highlight-current-row
:height="window.pageHeight < 668 ? 200:(window.pageHeight - 110 - 358)"
:summary-method="getSummaries"
show-summary :row-class-name="handleRowClassName" @row-dblclick="removeAbs"
@row-click="removeAsbItem">
<!--
<el-table-column type="selection"></el-table-column>
-->
<el-table-column type="index" min-width="40"/>
<el-table-column
label="已选组合项目"
min-width="120"
prop="displayName"
></el-table-column>
<el-table-column label="标准价格" prop="price" min-width="80" align="center">
<template slot-scope="scope">
<el-input
disabled
type="text"
v-model="scope.row.price"
/>
</template>
</el-table-column>
<el-table-column label="折扣" prop="price" min-width="60" align="center">
<template slot-scope="scope">
<el-input
@change="discount(scope.$index)"
type="text"
v-model="scope.row.discount"
/>
</template>
</el-table-column>
<el-table-column label="价格" prop="price" min-width="80" align="center">
<template slot-scope="scope">
<el-input
@input="changingprices(scope.row.price)"
type="text"
v-model="scope.row.price"
/>
</template>
</el-table-column>
</el-table>
</div>
</div>
</div>
<!--批量操作按钮复制套餐与分组-->
<div style="display: block;margin-left: 10px;">
<div style="margin-top: 50px;">
<el-button class="btnClass">复制分组</el-button>
</div>
<div>
<el-button class="btnClass">复制套餐</el-button>
</div>
</div>
</div>
</template>
<script>
import { getapi, postapi } from "@/api/api";
import { mapState } from "vuex";
import { arrayExistObj, tcdate, arrayFilter, arrayReduce, deepCopy } from "../../utlis/proFunc";
export default {
props:['customerOrgGroup'],
data() {
return {
customerOrgGroupAsbitems:[], //
itemTypeIds:[], //
asbItemId:'', //ID
quickAsb:[], //
asbItemChoosed: [], //
startPoint:-1,
PstartPoint:-1,
saveornot: true, //
selecteddata: [], //
unselecteddata: [], //
unselecteddata: [], //
rightselctedata: [], //
options: [],
value: "",
dialogVisible: false,
copyGroupdialogVisible: false,
packagelist: [],
tabledata: [],
temporaryselection: [], //table
copegroupdata: [], //
addrulst: [], //Id
price: "", //
title: 1,
};
},
computed: {
...mapState(["window","dict","customerOrg"]),
},
created() {
this.dictInit()
},
methods: {
//
dictInit(){
//
getapi("/api/app/item-type/by-code-all").then((res) => {
if (res.code != -1) {
this.dict.itemTypeTree = res.data;
tcdate(this.dict.itemTypeTree);
}
});
//
getapi("/api/app/asbitem/in-filter?Filter").then((res) => {
if (res.code != -1) {
this.dict.asbItemAll = res.data.items;
this.dict.asbItemAll.forEach(e => {
e.choosed = false
})
this.dict.asbItem = deepCopy(this.dict.asbItemAll);
this.dict.asbItemQuick = deepCopy(res.data.items);
}
});
},
handleRowClassName({ row, rowIndex }) {
// highLightBg 'selected'
//console.log(rowIndex, row)
//return row.highLightBg == 'selected' ? 'high-light-bg' : '';
if (row.choosed) {
return 'current-row';
} else {
return '';
}
},
//
getAsbItemByItemTypeAll() {
//console.log('getAsbItemByItemType', typeof this.itemTypeIds, this.itemTypeIds)
let lv = "";
if (typeof this.itemTypeIds === "object") {
lv = this.itemTypeIds[this.itemTypeIds.length - 1];
}
if (lv) {
this.dict.asbItem = arrayFilter(this.dict.asbItemAll, "itemTypeId", lv);
} else {
this.dict.asbItem = deepCopy(this.dict.asbItemAll);
}
//console.log('lv,this.dict.asbItem', lv, this.dict.asbItem)
this.dict.asbItemQuick = deepCopy(this.dict.asbItemAll);
},
//
getAsbItemByItemType() {
this.getAsbItemByItemTypeAll()
//
arrayReduce(this.dict.asbItem, [...this.customerOrgGroupAsbitems], "id=asbitemId");
arrayReduce(this.dict.asbItemQuick, [...this.customerOrgGroupAsbitems], "id=asbitemId");
},
//
remoteMethod(keyWords) {
//console.log('remoteMethod',this.dict.asbItemQuick)
if (keyWords) {
this.quickAsb = [];
this.dict.asbItemQuick.forEach(item => {
if (item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
|| item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
|| item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1) {
this.quickAsb.push(item);
}
});
} else {
this.quickAsb = [...this.dict.asbItemQuick];
}
},
//
///api/app/register-asbitem/many/3fa85f64-5717-4562-b3fc-2c963f66afa6'
async addAbs(asbItemChoosed,oprType) {
if(!this.customerOrgGroup.id){
this.$message.warning("请先选中单位分组")
return
}
let checked = true
let lfind = -1
// start
if(oprType && oprType == 'all'){
asbItemChoosed = deepCopy(this.dict.asbItem)
}else if(oprType && oprType == 'choosed'){
asbItemChoosed = []
this.dict.asbItem.forEach(e =>{
if(e.choosed){
asbItemChoosed.push(e)
e.choosed = false
}
})
}
// end
if (asbItemChoosed.length < 1) {
this.$message.warning("请选择要添加的组合项目")
return
}
//
// "displayName": "",
// "shortName": "f",
// "forSexId": "F",
// "itemTypeId": "3a0b16de-75b9-c910-c61b-844709a88940",
// "price": 0,
console.log('asbItemChoosed.length', asbItemChoosed.length)
for (let i = 0; i < asbItemChoosed.length; i++) {
if (this.customerOrgGroup.forSexId == 'U') break //
if (asbItemChoosed[i].forSexId == 'A') continue
if (asbItemChoosed[i].forSexId != this.customerOrgGroup.sexId) {
this.$message.warning(`所选项目:${asbItemChoosed[i].displayName},不适合当前人员性别`)
checked = false
break
}
}
//console.log(222,checked)
if (!checked) return
for (let i = 0; i < asbItemChoosed.length; i++) {
let pojo = {
asbitemId: asbItemChoosed[i].id,
patientRegisterId: this.customerOrgGroup.id,
standardPrice: asbItemChoosed[i].price,
chargePrice: asbItemChoosed[i].price,
amount: 1,
total: asbItemChoosed[i].price,
}
this.customerOrgGroupAsbitems.push(pojo)
//this.customerOrgGroupAsbitems.push({ ...pojo, asbitemName: asbItemChoosed[i].displayName })
lfind = arrayExistObj(this.dict.asbItem, 'id', asbItemChoosed[i].id)
if (lfind > -1) this.dict.asbItem.splice(lfind, 1)
lfind = arrayExistObj(this.dict.asbItemQuick, 'id', asbItemChoosed[i].id)
if (lfind > -1) this.dict.asbItemQuick.splice(lfind, 1)
}
},
//
dbClickChoosedAsb(row) {
this.addAbs([row]);
},
//
quickChoosedAsb(v) {
// value-key value console.log('quickChoosedAsb',v)
let lfind = -1
if (v) {
lfind = arrayExistObj(this.dict.asbItemQuick, 'id', v)
if (lfind > -1) {
this.addAbs([this.dict.asbItemQuick[lfind]])
}
}
},
//
chooseAsbItem(row){
this.dict.asbItem.forEach((e,index) => {
e.index = index;
return e
});
// shift
if (this.window.shift) {
//
this.dict.asbItem.forEach(e => {
e.choosed = false;
return e
});
if (this.startPoint == - 1) {
this.dict.asbItem[row.index].choosed = true;
this.startPoint = row.index;
return
}
if (this.startPoint > row.index) {
for (let i = row.index; i <= this.startPoint; i++) {
this.dict.asbItem[i].choosed = true
}
} else if (this.startPoint <= row.index) {
for (let i = this.startPoint; i <= row.index; i++) {
this.dict.asbItem[i].choosed = true
}
}
return
}
// ctrl
if (this.window.ctrl) {
console.log('this.window.ctrl',this.window.ctrl,this.dict.asbItem)
this.dict.asbItem[row.index].choosed = true;
this.startPoint = row.index;
return
}
// ctrl shift
//
//console.log('')
this.dict.asbItem.forEach(e => {
e.choosed = false;
return e
});
this.dict.asbItem[row.index].choosed = true;
this.startPoint = row.index;
},
//
///api/app/register-asbitem/many?RegisterAsbitemIds=3fa85f64-5717-4562-b3fc-2c963f66afa6
delAbs(absForDel,oprType) {
let body = {}
let registerAsbitemIds = []
let chargeComplete = ''
let lfind = -1
// start
if(oprType && oprType == 'all'){
absForDel = deepCopy(this.customerOrgGroupAsbitems)
}else if(oprType && oprType == 'choosed'){
absForDel = []
this.customerOrgGroupAsbitems.forEach(e =>{
if(e.choosed){
absForDel.push(deepCopy(e))
e.choosed = false
}
})
}
// end
if (absForDel.length < 1) {
this.$message.warning("请选择要移除的组合项目")
return
}
for (let i = 0; i < absForDel.length; i++) {
lfind = arrayExistObj(this.customerOrgGroupAsbitems, 'asbitemId', absForDel[i].asbitemId)
if (lfind > -1) this.customerOrgGroupAsbitems.splice(lfind, 1)
absForDel.splice(i, 1)
i--
continue
}
//
this.getAsbItemByItemType()
},
//
removeAbs(row) {
this.delAbs([row]);
},
//
removeAsbItem(row){
this.customerOrgGroupAsbitems.forEach((e,index) => {
e.index = index;
return e
});
// shift
if (this.window.shift) {
//
this.customerOrgGroupAsbitems.forEach(e => {
e.choosed = false;
return e
});
if (this.PstartPoint == - 1) {
this.customerOrgGroupAsbitems[row.index].choosed = true;
this.PstartPoint = row.index;
return
}
if (this.PstartPoint > row.index) {
for (let i = row.index; i <= this.PstartPoint; i++) {
this.customerOrgGroupAsbitems[i].choosed = true
}
} else if (this.PstartPoint <= row.index) {
for (let i = this.PstartPoint; i <= row.index; i++) {
this.customerOrgGroupAsbitems[i].choosed = true
}
}
return
}
// ctrl
if (this.window.ctrl) {
console.log('this.window.ctrl',this.window.ctrl,this.customerOrgGroupAsbitems)
this.customerOrgGroupAsbitems[row.index].choosed = true;
this.PstartPoint = row.index;
return
}
// ctrl shift
//
//console.log('')
this.customerOrgGroupAsbitems.forEach(e => {
e.choosed = false;
return e
});
this.customerOrgGroupAsbitems[row.index].choosed = true;
this.PstartPoint = row.index;
},
//
getSummaries(){
},
changingprices(price) {
this.price = price;
},
discount(index) {
console.log(index); //100
this.personnelUnit.nogroupselected[index].price = Math.round(
(100 * Number(this.personnelUnit.nogroupselected[index].queueTime)) /
100,
2
);
},
inputchang(row, newVal) {
this.price = row.price;
console.log(this.price);
},
//
Onsubmit() {
if (!this.personnelUnit.customerOrgGroupId) {
alert("请先选择单位分组");
return;
} else {
console.log(this.personnelUnit.nogroupselected);
postapi("/api/app/customer-org-group-detail/many", this.addrulst).then(
(res) => {
this.$message.success("操作成功");
console.log(this.addrulst);
}
);
}
},
//
addselecteditems() {
let lfind = -1;
console.log(this.personnelUnit.id);
if (this.personnelUnit.form.id == "") {
alert("请先选择单位类别");
} else {
//
this.saveornot = false;
//personnelUnit.nogroupselected
if (this.rightselctedata.length == 0) {
this.$message.warning("已选数据为空无法移动");
} else {
// this.title = 2;
let count = this.rightselctedata.length - 1;
for (var i = count; i >= 0; i--) {
if ([...new Set(this.tabledata)]) {
this.tabledata.push(this.rightselctedata[i]);
this.personnelUnit.nogroupselected.splice(i, 1);
}
}
console.log(this.personnelUnit.customerOrgGroupId);
// this.
this.rightselctedata.forEach((item) => {
lfind = arrayExistObj(
this.personnelUnit.nogroupselected,
"id",
item.id
);
if (lfind > -1) this.personnelUnit.nogroupselected.splice(lfind, 1);
this.addrulst.push({
asbitemId: item.id,
price: item.price,
// price: this.price,
customerOrgGroupId: this.personnelUnit.customerOrgGroupId,
});
});
}
}
},
//
selecteditems(val) {
this.rightselctedata = val;
console.log(this.rightselctedata);
},
//
handleSelectionChange(val) {
// this.selecteddata = val;
this.unselecteddata = val;
console.log(this.unselecteddata);
},
//
getCustomerOrgGroupAsbitems(customerOrgGroupId) {
if(customerOrgGroupId){
getapi(
`/api/app/customerorggroupdetail/getcustomerorggroupdetailinasbitem?CustomerOrgGroupId=${customerOrgGroupId}`
).then((res) => {
this.customerOrgGroupAsbitems = res.data;
});
}else{
this.customerOrgGroupAsbitems = []
}
this.getAsbItemByItemTypeAll()
},
},
//
watch: {
//
"customerOrgGroup.id"(newVal, oldVal) {
console.log("customerOrgGroup.id ",newVal,oldVal);
if (newVal != oldVal) {
this.getCustomerOrgGroupAsbitems(newVal);
}
},
},
};
</script>
<style scoped>
.box {
margin-top: 5px;
border: 1px solid #000;
}
.btnClass {
width:100px;
margin-bottom: 5px
}
</style>

483
src/components/customerOrg/customerOrgGroupList.vue

@ -1,483 +0,0 @@
<template>
<div>
<div>
<div style="display: flex;">
<div>
<span>体检单位</span>
<el-select
v-model="customerOrgId"
placeholder="请选择体检单位" filterable clearable
style="margin-left: 10px;"
@change="changeCustomerOrg"
size="small"
>
<el-option
v-for="item in customerOrg"
:key="item.id"
:label="item.displayName"
:value="item.id"
>
</el-option>
</el-select>
</div>
<div style="margin-left: 20px;">
<span>单位体检次数</span>
<el-select v-model="customerOrgRegister" placeholder="次数" style="width: 60px;margin-left: 10px;" size="small"
@change="changeTimes" value-key="id">
<el-option v-for="item in customerOrgRegisterList" :key="item.id" :label="item.medicalTimes"
:value="item" />
</el-select>
</div>
</div>
</div>
<div style="display: flex;">
<el-table
:data="customerOrgGroups"
style="margin-top: 2px"
row-key="id" border
height="300px" size="small"
highlight-current-row
@row-click="rowClick"
>
<el-table-column type="index" label="序号" min-width="50" align="center"/>
<el-table-column prop="displayName" label="名称" min-width="150" />
<el-table-column prop="price" label="价格" min-width="60" align="center"/>
<el-table-column prop="forSexId" label="适用性别" min-width="60" align="center">
<template slot-scope="scope">
{{ dddw(dict.forSex,'id',scope.row.forSexId,'displayName') }}
</template>
</el-table-column>
<el-table-column prop="maritalStatusId" label="适用婚姻状况" min-width="80" align="center">
<template slot-scope="scope">
{{ dddw(dict.forMaritalStatus,'id',scope.row.maritalStatusId,'displayName') }}
</template>
</el-table-column>
<el-table-column prop="creatorName" label="创建者" min-width="60" align="center" />
<el-table-column label="创建时间" min-width="150" align="center" >
<template slot-scope="scope">
{{ scope.row.creationTime ? moment(scope.row.creationTime).format('yyyy-MM-DD HH:mm:ss'):'' }}
</template>
</el-table-column>
<el-table-column label="操作">
<template>
<el-tag
class="move"
style="cursor: move; margin-left: 15px"
draggable="true"
>
<i class="el-icon-d-caret" style="width: 1rem; height: 1rem"></i>
</el-tag>
</template>
</el-table-column>
</el-table>
<div style="margin-left: 10px;">
<div style="margin-top: 10px">
<el-button
type=""
@click="btnAdd"
class="commonbutton"
>新增</el-button
>
</div>
<div style="margin-top: 10px">
<el-button type="" @click="btnEdit" class="commonbutton"
>编辑</el-button
>
</div>
<div style="margin-top: 10px">
<el-button type="" @click="btnDel" class="commonbutton"
>删除</el-button
>
</div>
<div style="margin-top: 10px">
<el-button type="" @click="topping" class="commonbutton"
>置顶</el-button
>
</div>
<div style="margin-top: 10px">
<el-button type="" @click="bottoming" class="commonbutton"
>置低</el-button
>
</div>
<div style="margin-top: 10px">
<el-button
type=""
@click="sortok"
:disabled="isshow"
class="commonbutton"
>确定</el-button
>
</div>
</div>
</div>
<!-- 新增或者编辑弹框 -->
<el-dialog
:title="form.id ? '编辑' : '新增'"
:visible.sync="dialogVisible"
width="800px"
>
<el-form :model="form" label-width="80px" :rules="rules" ref='form'>
<el-row>
<el-col :span="8">
<el-form-item prop="displayName" label="分组名称">
<el-input v-model="form.displayName"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="价格">
<el-input v-model="form.price"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="适用性别">
<el-select v-model="form.forSexId" placeholder="请选择">
<el-option
v-for="item in dict.forSex"
: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="婚姻状况">
<el-select
v-model="form.maritalStatusId"
placeholder="请选择"
style="width: 100%"
>
<el-option
v-for="item in dict.forMaritalStatus"
: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="年龄下限">
<el-input v-model="form.ageLowerLimit"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="年龄上限">
<el-input v-model="form.ageUpperLimit"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="适用职务">
<el-input v-model="form.jobPost"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="适用职称">
<el-input v-model="form.jobTitle"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="备注">
<el-input v-model="form.remark"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="onSubmit('form')"> </el-button>
</span>
</el-dialog>
<!-- -->
</div>
</template>
<script>
import moment from "moment";
import Sortable from "sortablejs";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { mapState } from "vuex";
import { dddw, deepCopy,objCopy,arrayExistObj } from "../../utlis/proFunc";
export default {
data() {
return {
customerOrg:[], //
customerOrgGroups:[], //
customerOrgId:'', //id
customerOrgRegisterList:[], //
customerOrgRegister:{}, //
isshow: true,
form: { //
id:'',
customerOrgRegisterId:null, //
displayName: "",
price: 0,
forSexId: "",
maritalStatusId: "",
ageLowerLimit: null,
ageUpperLimit: null,
jobPost: "",
jobTitle: "",
remark: "",
isMaxMedicalTimes:'N'
},
formInit:{},
rules:{
displayName:[
{ required: true, message: "请填写分组名称", trigger: "blur" },
],
},
dialogVisible: false,
tableData: [],
initTableData: [],
// tableData: [
// ],
};
},
computed: {
...mapState(["personnelUnit","window","dict"]),
},
created() {
this.rowDrop();
this.formInit = deepCopy(this.form)
},
mounted() {
//
this.dictInit()
},
methods: {
moment,dddw,
//
sortok() {
const result = [];
this.tableData.forEach((item, index) => {
// index 0 displayOrder
console.log(item.id);
// const currentDisplayOrder = this.tableData.length -1
const currentDisplayOrder = this.initTableData[index].displayOrder;
if (item.displayOrder != currentDisplayOrder) {
// displayOrder
result.push({ id: item.id, displayOrder: currentDisplayOrder });
}
});
putapi("/api/app/customerorggroup/updatesortmany", {
itemList: result,
}).then((res) => {
this.$message.success("操作成功");
this.isshow = true;
});
},
//Sortable
rowDrop() {
this.$nextTick(() => {
const tbody = document.querySelector(".el-table__body-wrapper tbody");
const _this = this;
Sortable.create(tbody, {
handle: ".move",
animation: 300,
onEnd({ newIndex, oldIndex }) {
_this.isshow = false;
const currRow = _this.tableData.splice(oldIndex, 1)[0];
_this.tableData.splice(newIndex, 0, currRow);
_this.tableData.map((item, index) => {
if (index == newIndex && index == oldIndex) {
} else if (index == oldIndex) {
} else if (index == newIndex) {
}
});
console.log(_this.tableData.map((item) => item.displayOrder));
},
});
});
},
//
bottoming() {
if (this.form.id == undefined) {
this.$message.warning("请选择操作的数据");
} else {
putapi(
`/api/app/customerorggroup/updatemanysort?id=${this.form.id}&SortType=2`
).then((res) => {
this.$message.success("操作成功");
});
}
},
//
topping() {
if (this.form.id == undefined) {
this.$message.warning("请选择操作的数据");
} else {
putapi(
`/api/app/customerorggroup/updatemanysort?id=${this.form.id}&SortType=1`
).then((res) => {
this.$message.success("操作成功");
});
}
},
//
dictInit() {
//
getapi("/api/app/customer-org/parent-all").then((res) => {
this.customerOrg = res.data;
});
//
getapi("/api/app/for-sex").then((res) => {
if(res.code != -1){
this.dict.forSex = res.data
}
})
},
//
getCustomerOrgGroup(customerOrgRegisterId) {
this.customerOrgGroups = []
getapi(`/api/app/customerorggroup/getlistinfilter?CustomerOrgRegisterId=${customerOrgRegisterId}`).then(res => {
if (res.code != - 1) {
this.customerOrgGroups = res.data.items;
this.customerOrgGroups.forEach(e =>{
e.customerOrgRegisterId = customerOrgRegisterId
})
}
})
},
//
changeCustomerOrg(v) {
getapi(`/api/app/customerorgregister/getlistincustomerorgid?CustomerOrgId=${v}`).then( res => {
if(res.code != -1){
this.customerOrgRegisterList = res.data
if(res.data.length > 0){
this.customerOrgRegister = res.data[res.data.length - 1]
this.getCustomerOrgGroup(this.customerOrgRegister.id)
}else{
this.customerOrgRegister = {}
this.customerOrgGroups = []
}
}
})
},
//
changeTimes(v){
this.getCustomerOrgGroup(v.id)
},
//
rowClick(row) {
objCopy(row,this.form)
},
//
btnAdd() {
if(!this.customerOrgRegister.id){
this.$message.warning("请选择体检次数")
return
}
if(this.customerOrgRegister.isComplete.toUpperCase() == 'Y'){
this.$message.warning("该单位的该次体检次数已完成,不能再添加分组!")
return
}
this.form = deepCopy(this.formInit)
this.form.customerOrgRegisterId = this.customerOrgRegister.id
this.dialogVisible = true;
},
//
btnEdit() {
this.dialogVisible = true;
},
//
btnDel() {
if (!this.form.id) {
this.$message.warning("请选择需要操作的数据");
return
}
this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", {
confirmButtonText: "是",
cancelButtonText: " 否 ",
type: "warning",
}).then(() => {
return deletapi(`/api/app/customer-org-group/${this.form.id}`)
}).then(res =>{
if(res.code != -1){
this.$message.success("删除成功");
let lfind = arrayExistObj(this.customerOrgGroups,'id',this.form.id)
if(lfind > -1) this.customerOrgGroups.splice(lfind,1)
}
}).catch(err =>{
if (err == "cancel") {
this.$message.info("已取消删除");
}
})
},
onSubmit(formName) {
this.$refs[formName].validate((valid,fields) => {
if(!valid){
this.$message.warning(fields[Object.keys(fields)[0]][0].message);
return false
}
if(!this.form.customerOrgRegisterId){
this.$message.warning("请选择单位体检次数!");
return false
}
let body = deepCopy(this.form)
delete body.id
if(this.form.id){
//
putapi(`/api/app/customer-org-group/${this.form.id}`,body).then(res =>{
if(res.code != -1 ){
this.$message.success("操作成功!")
let lfind = arrayExistObj(this.customerOrgGroups,'id',this.form.id)
if(lfind > -1) objCopy(this.form,this.customerOrgGroups[lfind])
this.dialogVisible = false
}
})
}else{
//
postapi('/api/customerorggroup/createcustomerorggroupincustomerorgregister',body).then(res =>{
if(res.code != -1 ){
this.$message.success("操作成功!")
this.form.id = res.data.id
this.customerOrgGroups.push(res.data)
this.dialogVisible = false
}
})
}
})
},
},
};
</script>
<style scoped>
@import '../../assets/css/global_button.css';
@import '../../assets/css/global_dialog.css';
@import '../../assets/css/global_table.css';
@import '../../assets/css/global_form.css';
@import '../../assets/css/global_input.css';
@import '../../assets/css/global.css';
</style>

3
src/components/patientRegister/PatientRegisterItem.vue

@ -336,7 +336,7 @@ export default {
return e
});
this.patientRegister.patientRegisterAbs[row.index].choosed = true;
this.startPoint = row.index;
this.PstartPoint = row.index;
},
@ -807,6 +807,7 @@ export default {
}
},
// quickChoosedAsb(v){
// let lfind = -1
// let asbItemChoosed = []

16
src/components/report/CusOrgOCX.vue

@ -6,9 +6,9 @@
<div style="display: block;width:635px; margin-left: 5px;">
<el-table :data="dataCusOrgOCX" border height="470" highlight-current-row @row-dblclick="rowDblclick" size="small">
<el-table-column prop="customerOrgName" label="体检单位" width="150"/>
<el-table-column prop="customerOrgId" label="次数" width="50" align="center">
<el-table-column prop="customerOrgId" label="次数" width="52" align="center">
<template slot-scope="scope">
<el-select v-model="scope.row.customerOrgRegister" placeholder="次数" style="width: 50px;" size="small"
<el-select v-model="scope.row.customerOrgRegister" placeholder="次数" style="width: 44px;" size="small"
:disabled="!useCusOrg || scope.row.customerOrgId == dict.personOrgId"
@change="changeMedicalTimes(scope.$index)" value-key="id">
<el-option v-for="item in scope.row.customerOrgRegisterList" :key="item.id" :label="item.medicalTimes"
@ -27,20 +27,20 @@
</template>
</el-table-column>
-->
<el-table-column prop="startDate" label="起始日期" width="90" align="center">
<el-table-column prop="startDate" label="起始日期" width="92" align="center">
<template slot-scope="scope">
<el-date-picker v-model="scope.row.startDate" type="date" placeholder="截止日期" size="small" />
<el-date-picker v-model="scope.row.startDate" type="date" placeholder="截止日期" style="width: 84px;" size="small" />
</template>
</el-table-column>
<el-table-column prop="endDate" label="截止日期" width="90" align="center">
<el-table-column prop="endDate" label="截止日期" width="92" align="center">
<template slot-scope="scope">
<el-date-picker v-model="scope.row.endDate" type="date" placeholder="截止日期" size="small" />
<el-date-picker v-model="scope.row.endDate" type="date" placeholder="截止日期" style="width: 84px;" size="small" />
</template>
</el-table-column>
<el-table-column prop="customerOrgGroupIds" label="分组" width="200">
<template slot-scope="scope">
<el-select v-model="scope.row.customerOrgGroupIds" multiple collapse-tags filterable clearable
style="width:196px;" placeholder="请选择分组" size="small"
style="width:192px;" placeholder="请选择分组" size="small"
@focus="getCustGroup(scope.$index, scope.row.customerOrgRegister.id)"
:disabled="!useCusOrg || scope.row.customerOrgId == dict.personOrgId">
<el-option v-for="item in scope.row.customerOrgGroupList" :key="item.value" :label="item.displayName"
@ -48,7 +48,7 @@
</el-select>
</template>
</el-table-column>
<el-table-column min-width="30" align="center">
<el-table-column min-width="24" align="center">
<template slot-scope="scope">
<i class="el-icon-delete" @click="dataCusOrgOCX.splice(scope.$index, 1)"
style="font-size: 20px;color: red;cursor:pointer;"></i>

2
src/views/Home.vue

@ -255,6 +255,7 @@
class="dropdownmain"
>诊断模板</el-dropdown-item
>
<!--
<el-dropdown-item
command="item-result-template"
class="dropdownmain"
@ -265,6 +266,7 @@
class="dropdownmain"
>项目结果匹配</el-dropdown-item
>
-->
<el-dropdown-item command="item-template" class="dropdownmain"
>项目模板</el-dropdown-item
>

550
src/views/customerOrg/customerOrgGroup.vue

@ -1,41 +1,561 @@
<template>
<div>
<el-card>
<div slot="header">单位分组</div>
<div slot="header">单位分组</div>
<!--分组信息-->
<div style="display: flex;">
<div :style="'display: block;width:' + (window.pageWidth - 45 - 110) + 'px;'">
<div style="display: flex">
<div>
<span>体检单位</span>
<el-select
v-model="customerOrgId"
placeholder="请选择体检单位"
filterable
clearable automatic-dropdown
style="margin-left: 10px"
@change="changeCustomerOrg"
size="small"
>
<el-option
v-for="item in customerOrg"
:key="item.id"
:label="item.displayName"
:value="item.id"
>
{{ item.displayName }}
</el-option>
</el-select>
</div>
<div style="margin-left: 20px">
<span>单位体检次数</span>
<el-select
v-model="customerOrgRegister"
placeholder="次数"
style="width: 60px; margin-left: 10px"
size="small"
@change="changeTimes"
value-key="id"
>
<el-option
v-for="item in customerOrgRegisterList"
:key="item.id"
:label="item.medicalTimes"
:value="item"
/>
</el-select>
</div>
</div>
<div>
<el-table
:data="customerOrgGroups"
style="margin-top: 2px"
row-key="id"
border
height="240px"
size="small"
highlight-current-row
@row-click="rowClick"
>
<el-table-column
type="index"
label="序号"
min-width="50"
align="center"
/>
<el-table-column prop="displayName" label="名称" min-width="150" />
<el-table-column
prop="price"
label="价格"
min-width="60"
align="center"
/>
<el-table-column
prop="forSexId"
label="适用性别"
min-width="60"
align="center"
>
<template slot-scope="scope">
{{ dddw(dict.forSex, "id", scope.row.forSexId, "displayName") }}
</template>
</el-table-column>
<el-table-column
prop="maritalStatusId"
label="适用婚姻状况"
min-width="80"
align="center"
>
<template slot-scope="scope">
{{
dddw(
dict.forMaritalStatus,
"id",
scope.row.maritalStatusId,
"displayName"
)
}}
</template>
</el-table-column>
<el-table-column
prop="creatorName"
label="创建者"
min-width="60"
align="center"
/>
<el-table-column label="创建时间" min-width="150" align="center">
<template slot-scope="scope">
{{
scope.row.creationTime
? moment(scope.row.creationTime).format("yyyy-MM-DD HH:mm:ss")
: ""
}}
</template>
</el-table-column>
<el-table-column label="操作">
<template>
<el-tag
class="move"
style="cursor: move; margin-left: 15px"
draggable="true"
>
<i class="el-icon-d-caret" style="width: 1rem; height: 1rem"></i>
</el-tag>
</template>
</el-table-column>
</el-table>
</div>
</div>
<!--按钮-->
<div style="display: block;margin-left: 10px;">
<div style="margin-top: 30px;">
<el-button class="btnClass" @click="btnAdd">新增</el-button>
</div>
<div>
<el-button class="btnClass" @click="btnEdit" >编辑</el-button>
</div>
<div>
<el-button class="btnClass" @click="btnDel" >删除</el-button>
</div>
<div>
<el-button class="btnClass" @click="topping" >置顶</el-button>
</div>
<div>
<el-button class="btnClass" @click="bottoming" >置低</el-button>
</div>
<div>
<el-button class="btnClass" @click="sortok" :disabled="isshow" >确定</el-button>
</div>
</div>
</div>
<!--分组项目信息-->
<div>
<CustomerOrgGroupList />
<UnitGroupCategory />
<CustomerOrgGroupAsbitem :customerOrgGroup="form" />
</div>
</el-card>
</el-card>
<!-- 新增或者编辑弹框 -->
<el-dialog
:title="form.id ? '编辑' : '新增'"
:visible.sync="dialogVisible"
width="800px"
>
<el-form :model="form" label-width="80px" :rules="rules" ref="form">
<el-row>
<el-col :span="8">
<el-form-item prop="displayName" label="分组名称">
<el-input v-model="form.displayName"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="价格">
<el-input v-model="form.price"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="适用性别">
<el-select v-model="form.forSexId" placeholder="请选择">
<el-option
v-for="item in dict.forSex"
: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="婚姻状况">
<el-select
v-model="form.maritalStatusId"
placeholder="请选择"
style="width: 100%"
>
<el-option
v-for="item in dict.forMaritalStatus"
: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="年龄下限">
<el-input v-model="form.ageLowerLimit"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="年龄上限">
<el-input v-model="form.ageUpperLimit"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="适用职务">
<el-input v-model="form.jobPost"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="适用职称">
<el-input v-model="form.jobTitle"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="备注">
<el-input v-model="form.remark"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="onSubmit('form')"> </el-button>
</span>
</el-dialog>
<!-- -->
</div>
</template>
<script>
import CustomerOrgGroupList from "../../components/customerOrg/customerOrgGroupList.vue";
import UnitGroupCategory from "../../components/unitGrouping/unitGroupCategory.vue";
import moment from "moment";
import Sortable from "sortablejs";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { mapState } from "vuex";
import { getapi } from "@/api/api";
import { dddw, deepCopy, objCopy, arrayExistObj } from "../../utlis/proFunc";
import CustomerOrgGroupAsbitem from "../../components/customerOrg/customerOrgGroupAsbitem.vue";
export default {
components: {
CustomerOrgGroupList,
UnitGroupCategory,
CustomerOrgGroupAsbitem,
},
data() {
return {
options: [],
value: "",
customerOrg: [], //
customerOrgGroups: [], //
customerOrgId: "", //id
customerOrgRegisterList: [], //
customerOrgRegister: {}, //
isshow: true,
form: {
//
id: "",
customerOrgRegisterId: null, //
displayName: "",
price: 0,
forSexId: "",
maritalStatusId: "",
ageLowerLimit: null,
ageUpperLimit: null,
jobPost: "",
jobTitle: "",
remark: "",
isMaxMedicalTimes: "N",
},
formInit: {},
rules: {
displayName: [
{ required: true, message: "请填写分组名称", trigger: "blur" },
],
},
dialogVisible: false,
tableData: [],
initTableData: [],
// tableData: [
// ],
};
},
computed: {
...mapState(["personnelUnit"]),
...mapState(["personnelUnit", "window", "dict"]),
},
created() {
this.getitemtype();
this.rowDrop();
this.formInit = deepCopy(this.form);
},
mounted() {
//
this.dictInit();
},
methods: {
moment,
dddw,
//
sortok() {
const result = [];
this.tableData.forEach((item, index) => {
// index 0 displayOrder
console.log(item.id);
// const currentDisplayOrder = this.tableData.length -1
const currentDisplayOrder = this.initTableData[index].displayOrder;
if (item.displayOrder != currentDisplayOrder) {
// displayOrder
result.push({ id: item.id, displayOrder: currentDisplayOrder });
}
});
putapi("/api/app/customerorggroup/updatesortmany", {
itemList: result,
}).then((res) => {
this.$message.success("操作成功");
this.isshow = true;
});
},
//Sortable
rowDrop() {
this.$nextTick(() => {
const tbody = document.querySelector(".el-table__body-wrapper tbody");
const _this = this;
Sortable.create(tbody, {
handle: ".move",
animation: 300,
onEnd({ newIndex, oldIndex }) {
_this.isshow = false;
const currRow = _this.tableData.splice(oldIndex, 1)[0];
_this.tableData.splice(newIndex, 0, currRow);
_this.tableData.map((item, index) => {
if (index == newIndex && index == oldIndex) {
} else if (index == oldIndex) {
} else if (index == newIndex) {
}
});
console.log(_this.tableData.map((item) => item.displayOrder));
},
});
});
},
//
bottoming() {
if (this.form.id == undefined) {
this.$message.warning("请选择操作的数据");
} else {
putapi(
`/api/app/customerorggroup/updatemanysort?id=${this.form.id}&SortType=2`
).then((res) => {
this.$message.success("操作成功");
});
}
},
//
topping() {
if (this.form.id == undefined) {
this.$message.warning("请选择操作的数据");
} else {
putapi(
`/api/app/customerorggroup/updatemanysort?id=${this.form.id}&SortType=1`
).then((res) => {
this.$message.success("操作成功");
});
}
},
//
dictInit() {
//
getapi("/api/app/customer-org/parent-all").then((res) => {
if (res.code != -1) {
this.customerOrg = res.data;
let lfind = arrayExistObj(this.customerOrg,"id",this.dict.personOrgId);
if (lfind > -1) this.customerOrg.splice(lfind, 1);
}
});
//
getapi("/api/app/for-sex").then((res) => {
if (res.code != -1) {
this.dict.forSex = res.data;
}
});
},
//
getCustomerOrgGroup(customerOrgRegisterId) {
this.customerOrgGroups = [];
getapi(
`/api/app/customerorggroup/getlistinfilter?CustomerOrgRegisterId=${customerOrgRegisterId}`
).then((res) => {
if (res.code != -1) {
this.customerOrgGroups = res.data.items;
this.customerOrgGroups.forEach((e) => {
e.customerOrgRegisterId = customerOrgRegisterId;
});
}
});
},
//
changeCustomerOrg(v) {
getapi(
`/api/app/customerorgregister/getlistincustomerorgid?CustomerOrgId=${v}`
).then((res) => {
if (res.code != -1) {
this.customerOrgRegisterList = res.data;
if (res.data.length > 0) {
this.customerOrgRegister = res.data[res.data.length - 1];
this.getCustomerOrgGroup(this.customerOrgRegister.id);
} else {
this.customerOrgRegister = {};
this.customerOrgGroups = [];
}
}
});
},
//
changeTimes(v) {
this.getCustomerOrgGroup(v.id);
},
//
remoteMethod(){
},
//
rowClick(row) {
objCopy(row, this.form);
},
//
btnAdd() {
if (!this.customerOrgRegister.id) {
this.$message.warning("请选择体检次数");
return;
}
if (this.customerOrgRegister.isComplete.toUpperCase() == "Y") {
this.$message.warning("该单位的该次体检次数已完成,不能再添加分组!");
return;
}
this.form = deepCopy(this.formInit);
this.form.customerOrgRegisterId = this.customerOrgRegister.id;
this.dialogVisible = true;
},
//
btnEdit() {
this.dialogVisible = true;
},
//
btnDel() {
if (!this.form.id) {
this.$message.warning("请选择需要操作的数据");
return;
}
this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", {
confirmButtonText: "是",
cancelButtonText: " 否 ",
type: "warning",
})
.then(() => {
return deletapi(`/api/app/customer-org-group/${this.form.id}`);
})
.then((res) => {
if (res.code != -1) {
this.$message.success("删除成功");
let lfind = arrayExistObj(
this.customerOrgGroups,
"id",
this.form.id
);
if (lfind > -1) this.customerOrgGroups.splice(lfind, 1);
}
})
.catch((err) => {
if (err == "cancel") {
this.$message.info("已取消删除");
}
});
},
onSubmit(formName) {
this.$refs[formName].validate((valid, fields) => {
if (!valid) {
this.$message.warning(fields[Object.keys(fields)[0]][0].message);
return false;
}
if (!this.form.customerOrgRegisterId) {
this.$message.warning("请选择单位体检次数!");
return false;
}
let body = deepCopy(this.form);
delete body.id;
if (this.form.id) {
//
putapi(`/api/app/customer-org-group/${this.form.id}`, body).then(
(res) => {
if (res.code != -1) {
this.$message.success("操作成功!");
let lfind = arrayExistObj(
this.customerOrgGroups,
"id",
this.form.id
);
if (lfind > -1)
objCopy(this.form, this.customerOrgGroups[lfind]);
this.dialogVisible = false;
}
}
);
} else {
//
postapi(
"/api/customerorggroup/createcustomerorggroupincustomerorgregister",
body
).then((res) => {
if (res.code != -1) {
this.$message.success("操作成功!");
this.form.id = res.data.id;
this.customerOrgGroups.push(res.data);
this.dialogVisible = false;
}
});
}
});
},
},
};
</script>
<style scoped>
@import "../../assets/css/global_button.css";
@import "../../assets/css/global_dialog.css";
@import "../../assets/css/global_table.css";
@import "../../assets/css/global_form.css";
@import "../../assets/css/global_input.css";
@import "../../assets/css/global.css";
</style>
.btnClass {
width:100px;
margin-bottom: 5px
}
</style>

4
src/views/customerOrg/patientRegister.vue

@ -167,14 +167,14 @@ export default {
//
getapi("/api/app/item-type/by-code-all").then((res) => {
if (res.code == 1) {
if (res.code != -1) {
this.dict.itemTypeTree = res.data;
tcdate(this.dict.itemTypeTree);
}
});
getapi("/api/app/asbitem/in-filter?Filter").then((res) => {
if (res.code == 1) {
if (res.code != -1) {
this.dict.asbItemAll = res.data.items;
}
});

Loading…
Cancel
Save