pengjun 2 years ago
parent
commit
533df59646
  1. 2
      src/assets/css/global_input.css
  2. 3
      src/components/customerOrg/customerOrgGroupAsbitem.vue
  3. 7
      src/components/patientRegister/PatientRegisterItem.vue
  4. 139
      src/components/patientRegister/PatientRegisterList.vue
  5. 10
      src/components/patientRegister/patientRegisterAsbItem.vue
  6. 2
      src/store/index.js
  7. 110
      src/views/customerOrg/customerOrgGroup.vue

2
src/assets/css/global_input.css

@ -44,7 +44,7 @@ input[type="number"]::-webkit-outer-spin-button {
margin: 0 !important; margin: 0 !important;
} }
/* 下拉框选中颜色 */
/* select 下拉框选中颜色 */
.el-select-dropdown__item.hover, .el-select-dropdown__item:hover { .el-select-dropdown__item.hover, .el-select-dropdown__item:hover {
background-color: #CCF9CB; /* 原始 默认 #F5F7FA */ background-color: #CCF9CB; /* 原始 默认 #F5F7FA */
} }

3
src/components/customerOrg/customerOrgGroupAsbitem.vue

@ -709,6 +709,9 @@ export default {
this.customerOrgGroupAsbitems[index].customerOrgGroupDetailMoney = this.customerOrgGroupAsbitems[index].customerOrgGroupDetailMoney =
(this.customerOrgGroupAsbitems[index].customerOrgGroupDetailPrice * this.customerOrgGroupAsbitems[index].customerOrgGroupDetailAmount).toFixed(2) (this.customerOrgGroupAsbitems[index].customerOrgGroupDetailPrice * this.customerOrgGroupAsbitems[index].customerOrgGroupDetailAmount).toFixed(2)
this.customerOrgGroupAsbitems[index].asbitemMoney =
(this.customerOrgGroupAsbitems[index].price * this.customerOrgGroupAsbitems[index].customerOrgGroupDetailAmount).toFixed(2)
this.customerOrgGroupAsbitems[index].discount = (this.customerOrgGroupAsbitems[index].customerOrgGroupDetailPrice * 100 / this.customerOrgGroupAsbitems[index].price).toFixed(2) this.customerOrgGroupAsbitems[index].discount = (this.customerOrgGroupAsbitems[index].customerOrgGroupDetailPrice * 100 / this.customerOrgGroupAsbitems[index].price).toFixed(2)
//this.getSummaries() //this.getSummaries()
}, },

7
src/components/patientRegister/PatientRegisterItem.vue

@ -85,7 +85,7 @@
</div> </div>
</div> </div>
<div class="mainareaBox"> <div class="mainareaBox">
<el-table :data="patientRegister.patientRegisterAbs" highlight-current-row border
<el-table :data="patientRegister.patientRegisterAbs" highlight-current-row border ref="patientRegister_patientRegisterAbs"
:height="(window.pageHeight > 700 ? (window.pageHeight - 440) : 260)" width="100%" :summary-method="getSummaries" :height="(window.pageHeight > 700 ? (window.pageHeight - 440) : 260)" width="100%" :summary-method="getSummaries"
show-summary :row-class-name="tableRowClassName" @row-dblclick="removeAbs" @selection-change="selecteditems" size="small" show-summary :row-class-name="tableRowClassName" @row-dblclick="removeAbs" @selection-change="selecteditems" size="small"
@row-click="removeAsbItem"> @row-click="removeAsbItem">
@ -195,6 +195,11 @@ export default {
created(){ created(){
this.quickAsb = deepCopy(this.dict.asbItemQuick) this.quickAsb = deepCopy(this.dict.asbItemQuick)
}, },
updated(){
this.$nextTick(() => {
this.$refs['patientRegister_patientRegisterAbs'].doLayout()
})
},
mounted() { mounted() {
// if(this.patientRegisterForm.id){ // if(this.patientRegisterForm.id){
// this.getPatientRegisterAbs(this.patientRegisterForm.id) // this.getPatientRegisterAbs(this.patientRegisterForm.id)

139
src/components/patientRegister/PatientRegisterList.vue

@ -23,20 +23,20 @@
:row-class-name="handleRowClassName" :row-class-name="handleRowClassName"
> >
<!-- 取消勾选改为选中 <!-- 取消勾选改为选中
<el-table-column type="selection" width="40"/>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column type="selection" width="40" show-overflow-tooltip/>
--> -->
<el-table-column <el-table-column
v-for="(item, index) in headerCols" v-for="(item, index) in headerCols"
show-overflow-tooltip
:key="`col_${index}`" :key="`col_${index}`"
:label="item.label"
:min-width="dropCol[index].minWidth" :min-width="dropCol[index].minWidth"
:align="dropCol[index].align" :align="dropCol[index].align"
:label="item.label"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="dropCol[index].prop == 'completeFlag'" >
<div v-if="dropCol[index].prop == 'sn'" >
{{ scope.$index + 1 }}
</div>
<div v-else-if="dropCol[index].prop == 'completeFlag'" >
{{ dddw(dict.completeFlag, "id", scope.row.completeFlag, "displayName") }} {{ dddw(dict.completeFlag, "id", scope.row.completeFlag, "displayName") }}
</div> </div>
<div v-else-if="dropCol[index].prop == 'guidePrintTimes'" > <div v-else-if="dropCol[index].prop == 'guidePrintTimes'" >
@ -133,7 +133,7 @@
> >
</div> </div>
<div class="listBtn"> <div class="listBtn">
<el-button type="danger" class="btnClass" @click="del"
<el-button type="danger" class="btnClass" @click="btnDel"
>删除</el-button >删除</el-button
> >
</div> </div>
@ -157,7 +157,7 @@
> >
</div> </div>
<div class="listBtn"> <div class="listBtn">
<el-button type="" class="btnClass" @click="asbBatch"
<el-button type="" class="btnClass" @click="btnAsbBatch"
>批量调整项目</el-button >批量调整项目</el-button
> >
</div> </div>
@ -309,13 +309,11 @@
<el-select <el-select
v-model="asbitemBatch.asbItemId" v-model="asbitemBatch.asbItemId"
placeholder="快速选择组合项目" placeholder="快速选择组合项目"
size="small"
filterable
clearable
remote
:remote-method="remoteMethod"
size="small" highlight-current-row
filterable :filter-method="filterMethod"
clearable @clear="quickAsb = deepCopy(dict.asbItemQuick)"
@change="quickChoosedAsb" @change="quickChoosedAsb"
default-first-option
default-first-option ref="quickAsbOCX"
style="width: 150px; text-align: left; padding-right: 15px" style="width: 150px; text-align: left; padding-right: 15px"
> >
<el-option <el-option
@ -334,7 +332,7 @@
width="100%" width="100%"
show-summary show-summary
@row-dblclick="removeAbs" @row-dblclick="removeAbs"
size="small"
size="small" highlight-current-row
@row-click="rowClickaAbitemCurr" @row-click="rowClickaAbitemCurr"
border border
> >
@ -513,6 +511,7 @@ export default {
// //
dropCol: [ dropCol: [
{ label: "序号",prop: "sn",minWidth: 40,align:"center"},
{ label: "体检进度",prop: "completeFlag",minWidth: 80,align:"center"}, { label: "体检进度",prop: "completeFlag",minWidth: 80,align:"center"},
{ label: "打印", prop: "guidePrintTimes", minWidth: 50,align:"center" }, { label: "打印", prop: "guidePrintTimes", minWidth: 50,align:"center" },
{ label: "锁住", prop: "isLock", minWidth: 50, align:"center"}, { label: "锁住", prop: "isLock", minWidth: 50, align:"center"},
@ -572,7 +571,7 @@ export default {
}, },
methods: { methods: {
...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]), ...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]),
moment,dddw,
moment,dddw,deepCopy,
handleRowClassName({ row, rowIndex }) { handleRowClassName({ row, rowIndex }) {
// highLightBg 'selected' // highLightBg 'selected'
@ -703,9 +702,9 @@ export default {
}, },
// /api/app/customer-org-group/in-customer-org-id/3a0c0444-d7a0-871f-4074-19faf1655caf // /api/app/customer-org-group/in-customer-org-id/3a0c0444-d7a0-871f-4074-19faf1655caf
getCustomerOrgGroup(customerOrgld) {
getCustomerOrgGroup(customerOrgId) {
getapi( getapi(
`/api/app/customer-org-group/in-customer-org-id/${customerOrgld}`
`/api/app/customer-org-group/in-customer-org-id/${customerOrgId}`
).then((res) => { ).then((res) => {
console.log("getCustomerOrgGroup", res.data); console.log("getCustomerOrgGroup", res.data);
if (res.code == 1) { if (res.code == 1) {
@ -714,6 +713,14 @@ export default {
}); });
}, },
///form
setForm(formData){
this.patientRegister.patientRegisterRd = deepCopy(formData)
if(!this.patientRegister.patientRegisterRd.id){
this.patientRegister.patientRegisterRd.customerOrgId = this.patientRegister.query.customerOrgId
}
},
// //
rowClick(row) { rowClick(row) {
//console.log("this.patientRegister.prList",this.window,this.patientRegister.prList); //console.log("this.patientRegister.prList",this.window,this.patientRegister.prList);
@ -768,11 +775,8 @@ export default {
} }
if(lfind > -1 && this.patientRegister.patientRegisterRd.id != this.patientRegister.prList[lfind].id){ if(lfind > -1 && this.patientRegister.patientRegisterRd.id != this.patientRegister.prList[lfind].id){
this.patientRegister.patientRegisterRd = this.patientRegister.prList[lfind];
this.patientRegister.photo = this.patientRegister.prList[lfind].photo || "/pic/Photo.jpg";
this.patientRegister.patientRegisterRd.customerOrgId = this.patientRegister.query.customerOrgId;
this.patientRegister.query.customerOrgParentId = this.patientRegister.prList[lfind].customerOrgParentId;
this.setForm(this.patientRegister.prList[lfind])
// this.patientRegister.query.customerOrgParentId = this.patientRegister.prList[lfind].customerOrgParentId;
this.patientRegister.customerOrgGroupChange = 0; //0 this.patientRegister.customerOrgGroupChange = 0; //0
this.patientRegister.medicalPackageChange = 0; //0 this.patientRegister.medicalPackageChange = 0; //0
this.getCustomerOrgGroup(this.patientRegister.prList[lfind].customerOrgParentId); this.getCustomerOrgGroup(this.patientRegister.prList[lfind].customerOrgParentId);
@ -795,10 +799,7 @@ export default {
return; return;
} }
this.patientRegister.patientRegisterRd = deepCopy(this.patientRegister.patientRegisterRdInit)
this.patientRegister.patientRegisterRd.customerOrgId = this.patientRegister.query.customerOrgId;
this.patientRegister.photo = "/pic/Photo.jpg";
this.setForm(this.patientRegister.patientRegisterRdInit)
this.patientRegister.patientRegisterAbs = []; this.patientRegister.patientRegisterAbs = [];
this.dialogVisible = true; this.dialogVisible = true;
this.editTimes++; // this.editTimes++; //
@ -825,19 +826,30 @@ export default {
// //
// /api/app/patient-register/many?PatientRegisterIds=3a0c2cac-f44c-f407-9504-c1fc5e80a159&PatientRegisterIds=3a0c2cb3-d10c-ed70-db6a-b835e75ce641 // /api/app/patient-register/many?PatientRegisterIds=3a0c2cac-f44c-f407-9504-c1fc5e80a159&PatientRegisterIds=3a0c2cb3-d10c-ed70-db6a-b835e75ce641
del() {
btnDel() {
//start -------------------------
this.multipleSelection = []
this.patientRegister.prList.forEach(e =>{
if(e.choosed){
this.multipleSelection.push(deepCopy(e))
}
})
// end -------------------------
if (this.multipleSelection.length < 1) { if (this.multipleSelection.length < 1) {
this.$message.warning("请先勾选要操作的记录"); this.$message.warning("请先勾选要操作的记录");
return; return;
} }
let patientRegisterIds = []; let patientRegisterIds = [];
for (let i = 0; i < this.multipleSelection.length; i++) { for (let i = 0; i < this.multipleSelection.length; i++) {
patientRegisterIds.push(this.multipleSelection[i]["id"]); patientRegisterIds.push(this.multipleSelection[i]["id"]);
} }
this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", { this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
confirmButtonText: "",
cancelButtonText: "",
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
@ -847,45 +859,20 @@ export default {
}); });
}) })
.then((res) => { .then((res) => {
this.$message.success("删除成功");
this.patientRegister.query.times++;
this.patientRegister.patientRegisterId = "";
if(res.code != -1){
this.$message.success("操作成功");
arrayReduce(this.patientRegister.prList,this.multipleSelection,'id=id')
this.setForm(this.patientRegister.patientRegisterRdInit)
this.getPatientRegisterAbs();
}
}) })
.catch((err) => { .catch((err) => {
if (err == "cancel") { if (err == "cancel") {
this.$message.info("已取消删除");
this.$message.info("已取消操作");
} }
}); });
}, },
//
delBak() {
if (!this.patientRegister.patientRegisterId) {
this.$message.warning("请选择要操作的记录");
return;
}
this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
//console.log('${this.patientRegister.patientRegisterId}',this.patientRegister.patientRegisterId)
return deletapi(
`/api/app/patient-register/${this.patientRegister.patientRegisterId}`
);
})
.then((res) => {
this.$message.success("删除成功");
this.patientRegister.query.times++;
this.patientRegister.patientRegisterId = "";
})
.catch(() => {
this.$message({ type: "info", message: "已取消删除" });
});
},
// //
async Query() { async Query() {
@ -1047,7 +1034,7 @@ export default {
// end // end
if (this.multipleSelection.length < 1) { if (this.multipleSelection.length < 1) {
this.$message.info("请勾选要操作的人员!");
this.$message.info("请选择要操作的记录!");
return; return;
} }
@ -1091,8 +1078,8 @@ export default {
}, },
// //
remoteMethod(keyWords) {
//console.log('remoteMethod',this.dict.asbItemQuick)
filterMethod(keyWords) {
//console.log('filterMethod',this.dict.asbItemQuick)
if (keyWords) { if (keyWords) {
this.quickAsb = []; this.quickAsb = [];
this.dict.asbItemQuick.forEach((item) => { this.dict.asbItemQuick.forEach((item) => {
@ -1107,7 +1094,7 @@ export default {
} }
}); });
} else { } else {
this.quickAsb = [...this.dict.asbItemQuick];
this.quickAsb = deepCopy(this.dict.asbItemQuick);
} }
}, },
@ -1129,10 +1116,17 @@ export default {
amount: 1, amount: 1,
}); });
this.quickAsb.splice(lfind, 1); this.quickAsb.splice(lfind, 1);
arrayReduce(this.dict.asbItemQuick, { id: v }, "id");
arrayReduce(this.dict.asbItemQuick, { id: v }, "id=id");
} }
} }
console.log(v, this.asbitemBatch.asbitemsTemp);
//console.log(v, this.asbitemBatch.asbitemsTemp);
this.$nextTick(() => {
this.$refs['quickAsbOCX'].blur(); //total asbItemId
this.asbItemId = ''
this.quickAsb = deepCopy(this.dict.asbItemQuick)
this.$refs['quickAsbOCX'].focus(); //total asbItemId
});
}, },
// //
@ -1163,7 +1157,7 @@ export default {
}, },
// //
asbBatch() {
btnAsbBatch() {
let customerOrgId = this.patientRegister.query.customerOrgId; let customerOrgId = this.patientRegister.query.customerOrgId;
if (!customerOrgId) { if (!customerOrgId) {
this.$message.warning("请选择单位"); this.$message.warning("请选择单位");
@ -1176,9 +1170,14 @@ export default {
}); });
// end // end
if(this.multipleSelection.length < 1){
this.$message.warning("请选择要操作的记录")
return
}
this.dialogAsbitem = true; this.dialogAsbitem = true;
// //
this.dict.asbItemQuick = [...this.dict.asbItemAll];
this.dict.asbItemQuick = deepCopy(this.dict.asbItemAll);
this.asbitemBatch.asbitemCurr.asbitemId = null; this.asbitemBatch.asbitemCurr.asbitemId = null;
this.asbitemBatch.asbitemsTemp = []; this.asbitemBatch.asbitemsTemp = [];
}, },

10
src/components/patientRegister/patientRegisterAsbItem.vue

@ -64,7 +64,15 @@ export default {
return {}; return {};
}, },
created() { },
created() {
},
updated(){
this.$nextTick(() => {
this.$refs['patientRegister.patientRegisterAbs'].doLayout()
})
},
// //
mounted() { }, mounted() { },

2
src/store/index.js

@ -88,7 +88,7 @@ export default new Vuex.Store({
personnelTypeId: null, //人员类别 personnelTypeId: null, //人员类别
jobPost: "", //职务 jobPost: "", //职务
jobTitle: "", //职称 jobTitle: "", //职称
photo: "", //照片
photo: "/pic/Photo.jpg", //照片
salesman: "", //介绍人 salesman: "", //介绍人
sexHormoneTermId: null, //性激素期限 sexHormoneTermId: null, //性激素期限
isNameHide: "N", //隐藏姓名 isNameHide: "N", //隐藏姓名

110
src/views/customerOrg/customerOrgGroup.vue

@ -167,17 +167,17 @@
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item prop="displayName" label="分组名称"> <el-form-item prop="displayName" label="分组名称">
<el-input v-model="form.displayName"></el-input>
<el-input v-model="form.displayName" size="small" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="价格">
<el-input v-model="form.price"></el-input>
<el-form-item label="金额">
<el-input v-model="form.price" type="number" size="small" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="适用性别"> <el-form-item label="适用性别">
<el-select v-model="form.forSexId" placeholder="请选择">
<el-select v-model="form.forSexId" placeholder="请选择" size="small" >
<el-option <el-option
v-for="item in dict.forSex" v-for="item in dict.forSex"
:key="item.id" :key="item.id"
@ -193,8 +193,7 @@
<el-select <el-select
v-model="form.maritalStatusId" v-model="form.maritalStatusId"
placeholder="请选择" placeholder="请选择"
style="width: 100%"
>
style="width: 100%" size="small" >
<el-option <el-option
v-for="item in dict.forMaritalStatus" v-for="item in dict.forMaritalStatus"
:key="item.id" :key="item.id"
@ -207,34 +206,35 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="年龄下限"> <el-form-item label="年龄下限">
<el-input v-model="form.ageLowerLimit"></el-input>
<el-input v-model="form.ageLowerLimit" type="number" min="1" max="200" size="small" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="年龄上限"> <el-form-item label="年龄上限">
<el-input v-model="form.ageUpperLimit"></el-input>
<el-input v-model="form.ageUpperLimit" type="number" min="1" max="200" size="small" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="适用职务"> <el-form-item label="适用职务">
<el-input v-model="form.jobPost"></el-input>
<el-input v-model="form.jobPost" size="small" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="适用职称"> <el-form-item label="适用职称">
<el-input v-model="form.jobTitle"></el-input>
<el-input v-model="form.jobTitle" size="small" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="备注"> <el-form-item label="备注">
<el-input v-model="form.remark"></el-input>
<el-input v-model="form.remark" size="small" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="onSubmit('form')"> </el-button>
<el-button @click="dialogVisible = false">取消</el-button>
<el-button type="success" @click="computePrice">同比折算组合项目价格</el-button>
<el-button type="primary" @click="onSubmit('form')">确定</el-button>
</span> </span>
</el-dialog> </el-dialog>
<!-- --> <!-- -->
@ -626,6 +626,90 @@ export default {
} }
}); });
}, },
computePrice(){
if(!this.form.id){
this.$message.warning("尚未保存信息,不可执行此操作!")
return
}
let customerOrgGroupId = this.form.id
let customerOrgGroupAsbitems = [] //
getapi(`/api/app/customerorggroupdetail/getcustomerorggroupdetailinasbitem?CustomerOrgGroupId=${customerOrgGroupId}
`).then(res => {
if(res.code != -1){
customerOrgGroupAsbitems = res.data;
if(customerOrgGroupAsbitems.length < 1){
this.$message.warning("当前分组尚未设置组合项目,不可执行此操作!")
}else{
let body = {
customerOrgGroupId,
details:this.madeNewGroupAsbitems(customerOrgGroupAsbitems,this.form.price)
}
console.log('body',body)
return postapi('/api/app/customerorggroupdetail/createcustomerorggroupdetailmany',body)
}
}
}).then(res =>{
if(res.code != -1){
this.$message.success("操作成功");
//
this.form.id = ''
//
setTimeout(() => {
this.form.id = customerOrgGroupId;
this.onSubmit('form')
}, 100)
}
})
},
madeNewGroupAsbitems(oldGroupAsbitems,newTotal){
newTotal = Number(newTotal).toFixed(2)
let newGroupAsbitems = []
let oldTotal = 0
oldGroupAsbitems.forEach(e =>{
oldTotal += Number(e.customerOrgGroupDetailMoney)
})
oldTotal = oldTotal.toFixed(2)
let discount = 0
if(oldTotal != 0) discount = (newTotal * 100 /oldTotal).toFixed(2)
oldTotal = 0
oldGroupAsbitems.forEach(e =>{
e.customerOrgGroupDetailPrice = (e.customerOrgGroupDetailPrice * discount/100).toFixed(2)
e.customerOrgGroupDetailMoney = (e.customerOrgGroupDetailPrice * e.customerOrgGroupDetailAmount).toFixed(2)
oldTotal += Number(e.customerOrgGroupDetailMoney)
})
oldTotal = oldTotal.toFixed(2)
let didTotal = newTotal - oldTotal
if(didTotal != 0){
for(let i = 0;i<oldGroupAsbitems.length;i++){
if(oldGroupAsbitems[i].customerOrgGroupDetailAmount == 1){
oldGroupAsbitems[i].customerOrgGroupDetailPrice += Number(didTotal)
}
}
}
oldGroupAsbitems.forEach(e =>{
newGroupAsbitems.push({
customerOrgGroupId:e.customerOrgGroupId,
asbitemId:e.asbitemId,
price:e.customerOrgGroupDetailPrice,
amount:e.customerOrgGroupDetailAmount
})
})
return newGroupAsbitems
},
}, },
}; };
</script> </script>

Loading…
Cancel
Save