Browse Source

rydj

master
pengjun 2 years ago
parent
commit
cdc07125ba
  1. 151
      src/components/patientRegister/PatientRegisterItem.vue
  2. 2
      src/utlis/mm.js

151
src/components/patientRegister/PatientRegisterItem.vue

@ -18,15 +18,15 @@
<div class="mainbutton">
<div style="margin-left: 10px">
<el-button type="primary" @click="removedata">添加 <i class="el-icon-bottom"></i>
<el-button type="primary" @click="addAbs">添加 <i class="el-icon-bottom"></i>
</el-button>
</div>
<div style="margin-left: 10px">
<el-button type="primary" @click="addselecteditems">移除 <i class="el-icon-top"></i>
<el-button type="primary" @click="delAbs">移除 <i class="el-icon-top"></i>
</el-button>
</div>
<div style="margin-left: 10px">
<el-button type="success" @click="Onsubmit">保存 <i class="el-icon-check"></i>
<el-button type="success" @click="onSubmit">保存 <i class="el-icon-check"></i>
</el-button>
</div>
</div>
@ -73,7 +73,7 @@ export default {
//patientRegisterAbs:[], // vuex
patientRegisterAbsChoosed: [], //
patientRegisterAbsDel: [], //
//patientRegisterAbsDel: [], //
patientRegisterAbsRd: {
id: null, //
@ -82,7 +82,7 @@ export default {
patientRegisterId: null, //string($uuid)
standardPrice: 0, //number($double)
chargePrice: 0, // number($double)
payTypeFlag: "0000", // string ,
payTypeFlag: "0", // string , 021
isCharge: "N", // string
//lisRequestId: null, // string($uuid)LISID
amount: 1, // integer($int32)
@ -97,31 +97,143 @@ export default {
mounted() { },
methods: {
//...mapActions(['getMedicalPackageAsb','getMedicalPackageAsb']),
...mapActions(['getCustomerOrgGroup','getMedicalPackageAsb', 'getPatientRegisterAbs']),
//
onSubmit(val) {
},
//
addselecteditems() { },
//
selecteditems(val) { },
//
removedata() { },
//
},
//
handleSelectionChange(val) {
// this.selecteddata = val;
this.asbItemChoosed = val;
console.log(this.asbItemChoosed);
//console.log(this.asbItemChoosed);
},
//
///api/app/register-asbitem/many/3fa85f64-5717-4562-b3fc-2c963f66afa6'
addAbs() {
let body = []
let checked = true
if(this.asbItemChoosed.length < 1){
alert("请选择要添加的组合项目")
return
}
//
// "displayName": "",
// "shortName": "f",
// "forSexId": "F",
// "itemTypeId": "3a0b16de-75b9-c910-c61b-844709a88940",
// "price": 0,
//console.log('this.asbItemChoosed.length',this.asbItemChoosed.length)
for(let i = 0;i<this.asbItemChoosed.length;i++){
if(this.patientRegisterForm.sexId == 'U') break //
if(this.asbItemChoosed[i].forSexId == 'U') continue
if(this.asbItemChoosed[i].forSexId != this.patientRegisterForm.sexId){
alert(`所选项目:${this.asbItemChoosed[i].displayName},不适合当前人员性别`)
checked = false
break
}
}
//console.log(222,checked)
if(!checked) return
for(let i = 0;i<this.asbItemChoosed.length;i++){
body.push({
asbitemId: this.asbItemChoosed[i].id,
patientRegisterId: this.patientRegisterForm.id,
standardPrice: this.asbItemChoosed[i].price,
chargePrice: this.asbItemChoosed[i].price,
payTypeFlag: "0",
isCharge: "N",
amount: 1
})
}
console.log(`/api/app/register-asbitem/many/${this.patientRegisterForm.customerOrgId}`,body)
postapi(`/api/app/register-asbitem/many/${this.patientRegisterForm.customerOrgId}`,body)
.then((res) => {
console.log("medicalPackageAsb", res);
if (res.code == 1) {
//
this.getPatientRegisterAbs(this.patientRegisterForm.id)
//
this.getAsbItemByItemType()
this.$message.success("操作成功");
}
})
.catch((err) => {
this.$message({type: "error",message: `操作失败,原因:${err}`});
});
},
//
selecteditems(val) {
this.patientRegisterAbsChoosed = val
},
//
delAbs(){
let body = []
let checked = true
if(this.patientRegisterAbsChoosed.length < 1){
alert("请选择要移除的组合项目")
return
}
for(let i = 0;i<this.patientRegisterAbsChoosed.length;i++){
if(this.patientRegisterAbsChoosed[i].forSexId != this.patientRegisterForm.sexId){
alert(`所选项目:${this.patientRegisterAbsChoosed[i].displayName},不适合当前人员性别`)
checked = false
break
}
}
//console.log(222,checked)
if(!checked) return
for(let i = 0;i<this.asbItemChoosed.length;i++){
body.push({
asbitemId: this.asbItemChoosed[i].id,
patientRegisterId: this.patientRegisterForm.id,
standardPrice: this.asbItemChoosed[i].price,
chargePrice: this.asbItemChoosed[i].price,
payTypeFlag: "0",
isCharge: "N",
amount: 1
})
}
console.log(`/api/app/register-asbitem/many/${this.patientRegisterForm.customerOrgId}`,body)
postapi(`/api/app/register-asbitem/many/${this.patientRegisterForm.customerOrgId}`,body)
.then((res) => {
console.log("medicalPackageAsb", res);
if (res.code == 1) {
//
this.getPatientRegisterAbs(this.patientRegisterForm.id)
//
this.getAsbItemByItemType()
this.$message.success("操作成功");
}
})
.catch((err) => {
this.$message({type: "error",message: `操作失败,原因:${err}`});
});
},
//
getAsbItemByItemType() {
//console.log('getAsbItemByItemType',typeof v)
//console.log('getAsbItemByItemType',typeof this.itemTypeIds,this.itemTypeIds)
let lv = "";
if (typeof this.itemTypeIds === "object") {
lv = this.itemTypeIds[itemTypeIds.length - 1];
lv = this.itemTypeIds[this.itemTypeIds.length - 1];
}
if (lv) {
@ -134,11 +246,12 @@ export default {
arrayReduce(this.dict.asbItem,[...this.patientRegister.patientRegisterAbs],"id=asbitemId");
},
//
registerAsbitem(body) {
console.log("registerAsbitem");
postapi(
`api/app/register-asbitem?CustomerOrgId=${this.patientRegisterForm.customerOrgId}`,
`/api/app/register-asbitem?CustomerOrgId=${this.patientRegisterForm.customerOrgId}`,
body
).then((res) => {
console.log("medicalPackageAsb", res);

2
src/utlis/mm.js

@ -1,3 +1,3 @@
export default {
apiurl: "http://192.168.1.108:9529",
apiurl: "http://ver.wh613.com:9529",
};
Loading…
Cancel
Save