pengjun 3 years ago
parent
commit
9e5f117e42
  1. 38
      src/components/patientRegister/PatientRegisterEdit.vue
  2. 513
      src/components/patientRegister/PatientRegisterItem.vue
  3. 5
      src/components/patientRegister/PatientRegisterList.vue
  4. 1
      src/components/patientRegister/patientRegisterAsbItem.vue
  5. 76
      src/store/index.js
  6. 4
      src/views/customerOrg/patientRegister.vue

38
src/components/patientRegister/PatientRegisterEdit.vue

@ -109,23 +109,23 @@
<el-row> <el-row>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="民族" prop="nationId"> <el-form-item label="民族" prop="nationId">
<el-select v-model="form.nationId" placeholder="请选择" filterable
<el-select v-model="form.nationId" placeholder="请选择" filterable clearable
:style="'width:'+ Math.floor((window.pageWidth - 530)/ 4.8)+'px;'" > :style="'width:'+ Math.floor((window.pageWidth - 530)/ 4.8)+'px;'" >
<el-option v-for="item in dict.nation" :key="item.id" :label="item.displayName" :value="item.id" />
<el-option v-for="item in dict.nation" :key="item.nationId" :label="item.displayName" :value="item.nationId" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="籍惯" prop="nationId">
<el-select v-model="form.nationId" placeholder="请选择" filterable
<el-form-item label="籍惯" prop="birthPlaceId">
<el-select v-model="form.birthPlaceId" placeholder="请选择" filterable clearable
:style="'width:'+ Math.floor((window.pageWidth - 530)/ 4.8)+'px;'" > :style="'width:'+ Math.floor((window.pageWidth - 530)/ 4.8)+'px;'" >
<el-option v-for="item in dict.nation" :key="item.id" :label="item.displayName" :value="item.id" />
<el-option v-for="item in dict.birthPlace" :key="item.id" :label="item.displayName" :value="item.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="体检类别" prop="medicalTypeId"> <el-form-item label="体检类别" prop="medicalTypeId">
<el-select v-model="form.medicalTypeId" placeholder="请选择" filterable
<el-select v-model="form.medicalTypeId" placeholder="请选择" filterable clearable
:style="'width:'+ Math.floor((window.pageWidth - 530)/ 4.8)+'px;'" > :style="'width:'+ Math.floor((window.pageWidth - 530)/ 4.8)+'px;'" >
<el-option v-for="item in dict.medicalType" :key="item.id" :label="item.displayName" <el-option v-for="item in dict.medicalType" :key="item.id" :label="item.displayName"
:value="item.id" /> :value="item.id" />
@ -134,7 +134,7 @@
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="人员类别" prop="personnelTypeId"> <el-form-item label="人员类别" prop="personnelTypeId">
<el-select v-model="form.personnelTypeId" placeholder="请选择" filterable
<el-select v-model="form.personnelTypeId" placeholder="请选择" filterable clearable
:style="'width:'+ Math.floor((window.pageWidth - 530)/ 4.8)+'px;'" > :style="'width:'+ Math.floor((window.pageWidth - 530)/ 4.8)+'px;'" >
<el-option v-for="item in dict.personnelType" :key="item.id" :label="item.displayName" <el-option v-for="item in dict.personnelType" :key="item.id" :label="item.displayName"
:value="item.id" /> :value="item.id" />
@ -309,7 +309,7 @@
<el-button @click="readIdCard" class="btnClass">读身份证</el-button> <el-button @click="readIdCard" class="btnClass">读身份证</el-button>
</div> </div>
<div class="btn"> <div class="btn">
<el-button type="success" class="btnClass" @click="Onsubmit('form')">保存</el-button>
<el-button type="success" class="btnClass" @click="Onsubmit('form',true)">保存</el-button>
</div> </div>
<div class="btn"> <div class="btn">
<el-button type="primary" class="btnClass">申请单</el-button> <el-button type="primary" class="btnClass">申请单</el-button>
@ -440,6 +440,7 @@ export default {
telephone: "", // telephone: "", //
mobileTelephone: "", // mobileTelephone: "", //
nationId: null, // nationId: null, //
birthPlaceId: null, //
postalCode: "", // postalCode: "", //
creatorId: null, creatorId: null,
creationTime: "", creationTime: "",
@ -457,6 +458,7 @@ export default {
"sexHormoneTermId", "sexHormoneTermId",
"organizationUnitId", "organizationUnitId",
"nationId", "nationId",
"birthPlaceId",
], //uuidnull ], //uuidnull
rules: { rules: {
@ -509,11 +511,13 @@ export default {
// //
changeCustomerOrgGroupId() { changeCustomerOrgGroupId() {
this.patientRegister.customerOrgGroupChange++; this.patientRegister.customerOrgGroupChange++;
if(this.form.id) this.Onsubmit('form',false);
}, },
// //
changeMedicalPackageId() { changeMedicalPackageId() {
this.patientRegister.medicalPackageChange++; this.patientRegister.medicalPackageChange++;
if(this.form.id) this.Onsubmit('form',false);
}, },
// //
@ -569,7 +573,7 @@ export default {
}, },
// //
Onsubmit(formName) {
Onsubmit(formName,msgTip) {
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
// //
@ -603,7 +607,7 @@ export default {
(res) => { (res) => {
if (res.code == 1) { if (res.code == 1) {
//console.log('res',res) //console.log('res',res)
this.$message.success("创健 操作成功");
if(msgTip) this.$message.success("创健 操作成功");
objCopy(res.data, this.form); objCopy(res.data, this.form);
this.patientRegister.patientRegisterId = res.data.id; this.patientRegister.patientRegisterId = res.data.id;
this.patientRegister.patientRegisterId = res.data.id; this.patientRegister.patientRegisterId = res.data.id;
@ -615,18 +619,12 @@ export default {
); );
} else { } else {
//id //id
console.log(
`/api/app/patient-register?PatientRegisterId=${this.form.id}`,
body
);
putapi(
`/api/app/patient-register?PatientRegisterId=${this.form.id}`,
body
).then((res) => {
console.log(`/api/app/patient-register?PatientRegisterId=${this.form.id}`,body);
putapi(`/api/app/patient-register?PatientRegisterId=${this.form.id}`,body).then((res) => {
if (res.code == 1) { if (res.code == 1) {
this.$message.success("更新 操作成功");
if(msgTip) this.$message.success("更新 操作成功");
this.patientRegister.query.times++; this.patientRegister.query.times++;
this.patientRegister.saveTimes++;
//this.patientRegister.saveTimes++; //
} }
}); });
} }

513
src/components/patientRegister/PatientRegisterItem.vue

@ -1,5 +1,4 @@
<template> <template>
<div style="display: flex; margin-left: 10px; margin-top: 20px;"> <div style="display: flex; margin-left: 10px; margin-top: 20px;">
<div style="width:230px;"> <div style="width:230px;">
<div> <div>
@ -11,10 +10,11 @@
</div> </div>
<div class="mainareaBox"> <div class="mainareaBox">
<el-table :header-cell-style="{ background: '#eef1f6' }" :data="dict.asbItem" :height="(window.pageHeight>735 ? (window.pageHeight - 537):198)"
<el-table :header-cell-style="{ background: '#eef1f6' }" :data="dict.asbItem"
:height="(window.pageHeight > 735 ? (window.pageHeight - 537) : 198)" @row-dblclick="dbClickChoosedAsb"
@selection-change="handleSelectionChange" size="small"> @selection-change="handleSelectionChange" size="small">
<el-table-column type="selection" />
<el-table-column prop="displayName" label="未选组合项目" width="120"/>
<el-table-column type="selection" align="center" />
<el-table-column prop="displayName" label="未选组合项目" width="120" />
<!-- <!--
<el-table-column prop="price" label="标准价格" width="70"> <el-table-column prop="price" label="标准价格" width="70">
<template slot-scope="scope"> <template slot-scope="scope">
@ -37,59 +37,64 @@
</el-button> </el-button>
</div> </div>
<div class="btnList"> <div class="btnList">
<el-button type="primary" @click="delAbs">移除 <i class="el-icon-back"></i>
<el-button type="primary" @click="delAbs(patientRegisterAbsChoosed)">移除 <i class="el-icon-back"></i>
</el-button> </el-button>
</div> </div>
<!-- 不显示保存当已选组合有修改时失去焦点自动保存
<div class="btnList"> <div class="btnList">
<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> </el-button>
</div>
</div>
-->
</div> </div>
<div :style="'width:'+(window.pageWidth - 120 - 30 - 230 - 100)+'px;'">
<div :style="'width:' + (window.pageWidth - 120 - 30 - 230 - 100) + 'px;'">
<div style="display: flex;"> <div style="display: flex;">
<div class="disTotal"> <div class="disTotal">
<el-tooltip class="item" effect="dark" content="根据输入的折扣,自动计算折后总价" placement="top"> <el-tooltip class="item" effect="dark" content="根据输入的折扣,自动计算折后总价" placement="top">
<span>折扣 </span> <span>折扣 </span>
</el-tooltip> </el-tooltip>
<el-input style="width:55px;" v-model="discount" size="small" @input="changeAllDiscount" type="number"/>
<el-input style="width:55px;" v-model="discount" size="small" type="number" @input="changeAllDiscount"
@focus="discountFoucs = true" @blur="discountFoucs = false" />
</div> </div>
<div class="disTotal"> <div class="disTotal">
<el-tooltip class="item" effect="dark" content="总金额即该人员此次体检实收金额,并根据此金额自动计算折扣" placement="top"> <el-tooltip class="item" effect="dark" content="总金额即该人员此次体检实收金额,并根据此金额自动计算折扣" placement="top">
<span>总金额 </span> <span>总金额 </span>
</el-tooltip> </el-tooltip>
<el-input style="width:70px;" v-model="total" size="small" @input="changeTotal" type="number"/>
<el-input style="width:70px;" v-model="total" size="small" type="number" @input="changeTotal"
@focus="totalFoucs = true" @blur="totalFoucs = false" />
</div> </div>
<div class="disTotal">
<el-select v-model="asbItemId" placeholder="快速选择组合项目" size="small"
filterable clearable @change="quickChoosedAsb" style="width:150px;text-align: left;padding-right: 15px;">
<el-option v-for="item in dict.asbItemQuick" :key="item.id" :value="item.id"
:label="item.displayName" />
<div class="disTotal">
<el-select v-model="asbItemId" placeholder="快速选择组合项目" size="small" filterable clearable remote
:remote-method="remoteMethod" @change="quickChoosedAsb" default-first-option
style="width:150px;text-align: left;padding-right: 15px;">
<el-option v-for="item in quickAsb" :key="item.id" :value="item.id" :label="item.displayName" />
</el-select> </el-select>
</div> </div>
</div> </div>
<div class="mainareaBox"> <div class="mainareaBox">
<el-table :data="patientRegister.patientRegisterAbs"
:height="(window.pageHeight>735 ? (window.pageHeight - 537):198)" width="100%"
:summary-method="getSummaries" show-summary
@selection-change="selecteditems" size="small">
<el-table :data="patientRegister.patientRegisterAbs"
:height="(window.pageHeight > 735 ? (window.pageHeight - 537) : 198)" width="100%" :summary-method="getSummaries"
show-summary @row-dblclick="removeAbs" @selection-change="selecteditems" size="small">
<!-- temporaryselection personnelUnit.nogroupselected--> <!-- temporaryselection personnelUnit.nogroupselected-->
<el-table-column type="selection"/>
<el-table-column type="selection" align="center" />
<el-table-column label="已选组合项目" width="120" prop="asbitemName" /> <el-table-column label="已选组合项目" width="120" prop="asbitemName" />
<el-table-column label="标准价格" prop="standardPrice" width="70"/>
<el-table-column label="标准价格" prop="standardPrice" width="70" align="center" />
<el-table-column label="折扣" prop="discount" width="60"> <el-table-column label="折扣" prop="discount" width="60">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input type="number" v-model="scope.row.discount" size="small" @input="changeDiscount(scope.$index)"/>
<el-input type="number" v-model="scope.row.discount" size="small" @input="changeDiscount(scope.$index)"
@blur="onSubmit('')" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="数量" prop="amount" width="50"> <el-table-column label="数量" prop="amount" width="50">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input type="number" v-model="scope.row.amount" size="small" />
<el-input type="number" v-model="scope.row.amount" size="small" @blur="onSubmit('')" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="实收价格" prop="chargePrice" width="70"> <el-table-column label="实收价格" prop="chargePrice" width="70">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input type="number" v-model="patientRegister.patientRegisterAbs[scope.$index].chargePrice" size="small" @input="changePrice(scope.$index)"/>
<el-input type="number" v-model="patientRegister.patientRegisterAbs[scope.$index].chargePrice" size="small"
@input="changePrice(scope.$index)" @blur="onSubmit('')" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="total" label="金额" width="70" v-if="false" /> <el-table-column prop="total" label="金额" width="70" v-if="false" />
@ -97,21 +102,41 @@
<el-table-column label="支付方式" prop="payTypeFlag" width="100"> <el-table-column label="支付方式" prop="payTypeFlag" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="scope.row.payTypeFlag" size="small"> <el-select v-model="scope.row.payTypeFlag" size="small">
<el-option v-for="item in dict.payType" :key="item.id"
:label="item.displayName" :value="item.id" />
<el-option v-for="item in dict.payType" :key="item.id" :label="item.displayName" :value="item.id" />
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="isCharge" label="收费" width="50" align="center">
<template slot-scope="scope">
<el-checkbox :value="scope.row.isCharge == 'Y'" />
</template>
</el-table-column>
<el-table-column prop="checkCompleteFlag" label="状态" align="center">
<template slot-scope="scope">
<div>{{ ldddw(dict.checkCompleteFlag, "id", scope.row.checkCompleteFlag, "displayName") }}</div>
</template>
</el-table-column>
<el-table-column prop="isLock" label="锁" width="50" align="center">
<template slot-scope="scope">
<el-checkbox :value="scope.row.isLock == 'Y'" />
</template>
</el-table-column>
<el-table-column prop="creatorName" label="登记人" align="center"></el-table-column>
<el-table-column prop="creationTime" label="登记日期" width="90" align="center">
<template slot-scope="scope">
<div>{{ lmoment(scope.row.creationTime, 'yyyy-MM-DD') }}</div>
</template>
</el-table-column>
</el-table> </el-table>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import moment from 'moment';
import { mapState, mapActions } from "vuex"; import { mapState, mapActions } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api"; import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { arrayFilter, arrayReduce, arrayExistObj,dddw } from "../../utlis/proFunc";
import { arrayFilter, arrayReduce, arrayExistObj, dddw } from "../../utlis/proFunc";
export default { export default {
props: ["patientRegisterForm"], props: ["patientRegisterForm"],
data() { data() {
@ -138,24 +163,31 @@ export default {
groupPackageId: null, // string($uuid) ID groupPackageId: null, // string($uuid) ID
}, // }, //
asbItemId:'',
discount:100,
total:0,
totalStand:0,
asbItemId: '',
discount: 100,
total: 0,
totalStand: 0,
quickAsb: [],
totalFoucs: false, //
discountFoucs: false, //
}; };
}, },
computed: { computed: {
...mapState(["window","dict", "customerOrg", "patientRegister", "personnelUnit"]),
...mapState(["window", "dict", "customerOrg", "patientRegister", "personnelUnit"]),
}, },
mounted() { }, mounted() { },
methods: { methods: {
...mapActions(['getCustomerOrgGroup', 'getMedicalPackageAsb', 'getPatientRegisterAbs']),
...mapActions(['getCustomerOrgGroup', 'getPatientRegisterAbs']),
ldddw(arrayData, key, value, display) { ldddw(arrayData, key, value, display) {
return dddw(arrayData, key, value, display); return dddw(arrayData, key, value, display);
}, },
lmoment(date, forMat) {
return moment(new Date(date)).format(forMat);
},
// //
// [ // [
// { // {
@ -173,9 +205,9 @@ export default {
// //
async batchEditAsb(body, msg) { async batchEditAsb(body, msg) {
console.log(`/api/app/registerasbitem/updatemany`, body) console.log(`/api/app/registerasbitem/updatemany`, body)
postapi(`/api/app/registerasbitem/updatemany`, body)
await postapi(`/api/app/registerasbitem/updatemany`, body)
.then((res) => { .then((res) => {
console.log("onSubmit", res);
console.log("batchEditAsb", res);
if (res.code == 1) { if (res.code == 1) {
if (msg) { if (msg) {
// //
@ -193,11 +225,11 @@ export default {
async onSubmit(msg) { async onSubmit(msg) {
let body = [], insBody = [] let body = [], insBody = []
if (!this.patientRegisterForm.id) { if (!this.patientRegisterForm.id) {
alert("请先保存人员体检基本信息!")
//alert("")
return return
} }
if (this.patientRegister.patientRegisterAbs.length < 1) { if (this.patientRegister.patientRegisterAbs.length < 1) {
alert("暂无可操作的数据")
//alert("")
return return
} }
for (let i = 0; i < this.patientRegister.patientRegisterAbs.length; i++) { for (let i = 0; i < this.patientRegister.patientRegisterAbs.length; i++) {
@ -218,7 +250,7 @@ export default {
patientRegisterId: this.patientRegisterForm.id, patientRegisterId: this.patientRegisterForm.id,
standardPrice: this.patientRegister.patientRegisterAbs[i].standardPrice, standardPrice: this.patientRegister.patientRegisterAbs[i].standardPrice,
chargePrice: this.patientRegister.patientRegisterAbs[i].chargePrice, chargePrice: this.patientRegister.patientRegisterAbs[i].chargePrice,
payTypeFlag:this.patientRegister.patientRegisterAbs[i].payTypeFlag,
payTypeFlag: this.patientRegister.patientRegisterAbs[i].payTypeFlag,
isCharge: this.patientRegister.patientRegisterAbs[i].isCharge, isCharge: this.patientRegister.patientRegisterAbs[i].isCharge,
amount: this.patientRegister.patientRegisterAbs[i].amount, amount: this.patientRegister.patientRegisterAbs[i].amount,
groupPackageId: this.patientRegister.patientRegisterAbs[i].groupPackageId groupPackageId: this.patientRegister.patientRegisterAbs[i].groupPackageId
@ -227,13 +259,14 @@ export default {
} }
//if (body.length > 0 ) await this.batchEditAsb(body, msg); //if (body.length > 0 ) await this.batchEditAsb(body, msg);
if (body.length > 0 && insBody.length > 0){
console.log('111111', msg, body.length, body, insBody.length, insBody);
if (body.length > 0 && insBody.length > 0) {
await this.batchEditAsb(body, ''); await this.batchEditAsb(body, '');
await this.batchAddAsb(insBody,msg);
}else if (body.length > 0 && insBody.length < 1){
await this.batchAddAsb(insBody, msg);
} else if (body.length > 0 && insBody.length < 1) {
await this.batchEditAsb(body, msg); await this.batchEditAsb(body, msg);
}else if (body.length < 1 && insBody.length > 0){
await this.batchAddAsb(insBody,msg);
} else if (body.length < 1 && insBody.length > 0) {
await this.batchAddAsb(insBody, msg);
} }
}, },
@ -246,9 +279,9 @@ export default {
}, },
// //
batchAddAsb(body, msg) {
async batchAddAsb(body, msg) {
console.log(`/api/app/registerasbitem/createmany?CustomerOrgId=${this.patientRegisterForm.customerOrgId}`, body) console.log(`/api/app/registerasbitem/createmany?CustomerOrgId=${this.patientRegisterForm.customerOrgId}`, body)
postapi(`/api/app/registerasbitem/createmany?CustomerOrgId=${this.patientRegisterForm.customerOrgId}`, body)
await postapi(`/api/app/registerasbitem/createmany?CustomerOrgId=${this.patientRegisterForm.customerOrgId}`, body)
.then((res) => { .then((res) => {
console.log("batchAddAsb", res); console.log("batchAddAsb", res);
if (res.code == 1) { if (res.code == 1) {
@ -265,7 +298,7 @@ export default {
// //
///api/app/register-asbitem/many/3fa85f64-5717-4562-b3fc-2c963f66afa6' ///api/app/register-asbitem/many/3fa85f64-5717-4562-b3fc-2c963f66afa6'
addAbs(asbItemChoosed) {
async addAbs(asbItemChoosed) {
let body = [] let body = []
let checked = true let checked = true
let payTypeFlag = '0' // let payTypeFlag = '0' //
@ -281,7 +314,7 @@ export default {
// "forSexId": "F", // "forSexId": "F",
// "itemTypeId": "3a0b16de-75b9-c910-c61b-844709a88940", // "itemTypeId": "3a0b16de-75b9-c910-c61b-844709a88940",
// "price": 0, // "price": 0,
console.log('asbItemChoosed.length',asbItemChoosed.length)
console.log('asbItemChoosed.length', asbItemChoosed.length)
for (let i = 0; i < asbItemChoosed.length; i++) { for (let i = 0; i < asbItemChoosed.length; i++) {
if (this.patientRegisterForm.sexId == 'U') break // if (this.patientRegisterForm.sexId == 'U') break //
if (asbItemChoosed[i].forSexId == 'A') continue if (asbItemChoosed[i].forSexId == 'A') continue
@ -304,19 +337,21 @@ export default {
payTypeFlag, payTypeFlag,
isCharge: "N", isCharge: "N",
amount: 1, amount: 1,
total:asbItemChoosed[i].price,
total: asbItemChoosed[i].price,
} }
body.push(pojo) body.push(pojo)
this.patientRegister.patientRegisterAbs.push({ ...pojo, asbitemName: asbItemChoosed[i].displayName }) this.patientRegister.patientRegisterAbs.push({ ...pojo, asbitemName: asbItemChoosed[i].displayName })
lfind = arrayExistObj(this.dict.asbItem, 'id', asbItemChoosed[i].id) lfind = arrayExistObj(this.dict.asbItem, 'id', asbItemChoosed[i].id)
if (lfind > -1) this.dict.asbItem.splice(lfind, 1) if (lfind > -1) this.dict.asbItem.splice(lfind, 1)
}
if (this.patientRegisterForm.id) this.batchAddAsb(body, '添加组合项目');
lfind = arrayExistObj(this.dict.asbItemQuick, 'id', asbItemChoosed[i].id)
if (lfind > -1) this.dict.asbItemQuick.splice(lfind, 1)
},
}
if (this.patientRegisterForm.id) await this.batchAddAsb(body, '添加组合项目');
},
// //
selecteditems(val) { selecteditems(val) {
@ -324,9 +359,9 @@ export default {
}, },
// //
batchDelAsb(body, msg) {
async batchDelAsb(body, msg) {
console.log(`/api/app/registerasbitem/deletemany`, body) console.log(`/api/app/registerasbitem/deletemany`, body)
postapi(`/api/app/registerasbitem/deletemany`, body)
await postapi(`/api/app/registerasbitem/deletemany`, body)
.then((res) => { .then((res) => {
console.log("delAbs", res); console.log("delAbs", res);
if (res.code != -1) { if (res.code != -1) {
@ -345,33 +380,34 @@ export default {
this.$message({ type: "error", message: `${msg}操作失败,原因:${err}` }); this.$message({ type: "error", message: `${msg}操作失败,原因:${err}` });
}); });
}, },
// //
///api/app/register-asbitem/many?RegisterAsbitemIds=3fa85f64-5717-4562-b3fc-2c963f66afa6 ///api/app/register-asbitem/many?RegisterAsbitemIds=3fa85f64-5717-4562-b3fc-2c963f66afa6
delAbs() {
delAbs(absForDel) {
let body = {} let body = {}
let registerAsbitemIds = [] let registerAsbitemIds = []
let chargeComplete = '' let chargeComplete = ''
let lfind = -1 let lfind = -1
if (this.patientRegisterAbsChoosed.length < 1) {
if (absForDel.length < 1) {
alert("请选择要移除的组合项目") alert("请选择要移除的组合项目")
return return
} }
for (let i = 0; i < this.patientRegisterAbsChoosed.length; i++) {
for (let i = 0; i < absForDel.length; i++) {
// //
if (!this.patientRegisterAbsChoosed[i].id) {
lfind = arrayExistObj(this.patientRegister.patientRegisterAbs, 'asbitemId', this.patientRegisterAbsChoosed[i].asbitemId)
if (!absForDel[i].id) {
lfind = arrayExistObj(this.patientRegister.patientRegisterAbs, 'asbitemId', absForDel[i].asbitemId)
if (lfind > -1) this.patientRegister.patientRegisterAbs.splice(lfind, 1) if (lfind > -1) this.patientRegister.patientRegisterAbs.splice(lfind, 1)
this.patientRegisterAbsChoosed.splice(i, 1)
absForDel.splice(i, 1)
i-- i--
continue continue
} }
if (this.patientRegisterAbsChoosed[i].isCharge == 'Y' || this.patientRegisterAbsChoosed[i].checkCompleteFlag != '0') {
chargeComplete += this.patientRegisterAbsChoosed[i].asbitemName + ','
this.patientRegisterAbsChoosed.splice(i, 1)
if (absForDel[i].isCharge == 'Y' || absForDel[i].checkCompleteFlag != '0') {
chargeComplete += absForDel[i].asbitemName + ','
absForDel.splice(i, 1)
i-- i--
} }
} }
@ -381,11 +417,11 @@ export default {
if (chargeComplete) { if (chargeComplete) {
this.$message({ type: "info", message: `所选项目:${chargeComplete}已收费或已检,不可删除!` }); this.$message({ type: "info", message: `所选项目:${chargeComplete}已收费或已检,不可删除!` });
if (this.patientRegisterAbsChoosed.length < 1) return
if (absForDel.length < 1) return
} }
for (let i = 0; i < this.patientRegisterAbsChoosed.length; i++) {
registerAsbitemIds.push(this.patientRegisterAbsChoosed[i].id)
for (let i = 0; i < absForDel.length; i++) {
registerAsbitemIds.push(absForDel[i].id)
} }
body = { registerAsbitemIds } body = { registerAsbitemIds }
@ -393,9 +429,14 @@ export default {
}, },
//
removeAbs(row) {
this.delAbs([row]);
},
// //
getAsbItemByItemTypeAll() { getAsbItemByItemTypeAll() {
console.log('getAsbItemByItemType', typeof this.itemTypeIds, this.itemTypeIds)
//console.log('getAsbItemByItemType', typeof this.itemTypeIds, this.itemTypeIds)
let lv = ""; let lv = "";
if (typeof this.itemTypeIds === "object") { if (typeof this.itemTypeIds === "object") {
lv = this.itemTypeIds[this.itemTypeIds.length - 1]; lv = this.itemTypeIds[this.itemTypeIds.length - 1];
@ -405,9 +446,10 @@ export default {
this.dict.asbItem = arrayFilter(this.dict.asbItemAll, "itemTypeId", lv); this.dict.asbItem = arrayFilter(this.dict.asbItemAll, "itemTypeId", lv);
} else { } else {
this.dict.asbItem = [...this.dict.asbItemAll]; this.dict.asbItem = [...this.dict.asbItemAll];
}
console.log('lv,this.dict.asbItem', lv, this.dict.asbItem)
}
//console.log('lv,this.dict.asbItem', lv, this.dict.asbItem)
this.dict.asbItemQuick = [...this.dict.asbItemAll];
}, },
// //
@ -415,6 +457,7 @@ export default {
this.getAsbItemByItemTypeAll() this.getAsbItemByItemTypeAll()
// //
arrayReduce(this.dict.asbItem, [...this.patientRegister.patientRegisterAbs], "id=asbitemId"); arrayReduce(this.dict.asbItem, [...this.patientRegister.patientRegisterAbs], "id=asbitemId");
arrayReduce(this.dict.asbItemQuick, [...this.patientRegister.patientRegisterAbs], "id=asbitemId");
}, },
@ -433,131 +476,100 @@ export default {
// }, // },
// //
getCustomerOrgGroupAsb(customerOrgGroupId) {
console.log(`getCustomerOrgGroupAsb /api/app/customer-org-group-detail/customer-org-group-detail-in-asbitem/${customerOrgGroupId}`);
getapi(`/api/app/customer-org-group-detail/customer-org-group-detail-in-asbitem/${customerOrgGroupId}`)
.then((res) => {
console.log("getCustomerOrgGroupAsb", res);
if (res.code == 1) {
this.patientRegister.customerOrgGroupAsb = res.data;
//
this.removeGroupPackageAsb();
// async getCustomerOrgGroupAsb(customerOrgGroupId) {
// console.log(`getCustomerOrgGroupAsb /api/app/customer-org-group-detail/customer-org-group-detail-in-asbitem/${customerOrgGroupId}`);
// getapi(`/api/app/customer-org-group-detail/customer-org-group-detail-in-asbitem/${customerOrgGroupId}`)
// .then((res) => {
// console.log("getCustomerOrgGroupAsb", res);
// if (res.code == 1) {
// this.patientRegister.customerOrgGroupAsb = res.data;
// //
// this.removeGroupPackageAsb();
// //;
// this.addCustomerOrgGroupAsb(customerOrgGroupId);
// }
// });
// },
//;
this.addCustomerOrgGroupAsb(customerOrgGroupId);
}
});
},
// /
getGroupPackageAsb(typeFlag, groupPackageId) {
let delBody = {};
let url = typeFlag == 'group' ?
'/api/app/customer-org-group-detail/customer-org-group-detail-in-asbitem/'
: '/api/app/medical-package-detail/medical-package-in-asbitem?MedicalPackageId=';
let msg = typeFlag == 'group' ? '更换分组' : '更换套餐';
//
getMedicalPackageAsb(medicalPackageId) {
console.log(`/api/app/medical-package-detail/medical-package-in-asbitem?MedicalPackageId=${medicalPackageId}`);
getapi(`/api/app/medical-package-detail/medical-package-in-asbitem?MedicalPackageId=${medicalPackageId}`)
console.log(`${url}${groupPackageId}`);
getapi(`${url}${groupPackageId}`)
.then((res) => { .then((res) => {
console.log("getMedicalPackageAsb", res);
if (res.code == 1) {
this.patientRegister.medicalPackageAsb = res.data;
console.log("getGroupPackageAsb", res);
if (res.code != -1) {
//this.patientRegister.medicalPackageAsb = res.data;
//return this.promiseRemoveGroupPackageAsb();
// //
this.removeGroupPackageAsb();
delBody = this.removeGroupPackageAsb();
//
this.addGroupPackageAsb(res.data, groupPackageId);
//console.log('delBody', delBody,delBody['registerAsbitemIds'].length);
if (delBody['registerAsbitemIds'].length > 0) {
return postapi(`/api/app/registerasbitem/deletemany`, delBody)
} else {
this.onSubmit(msg);
}
}
})
.then(res => {
//console.log('res', res);
if (res && res.code != -1) {
// //
this.addMedicalPackageAsb(medicalPackageId);
this.onSubmit(msg);
} }
}); });
}, },
//
async addCustomerOrgGroupAsb(groupPackageId) {
let body = []
let payTypeFlag = '0'
let lfind = -1
let editCount = 0
///
addGroupPackageAsb(groupPackageAsb, groupPackageId) {
if (this.patientRegisterForm.customerOrgId != this.dict.personOrgId) payTypeFlag = '1'
console.log('this.patientRegister.customerOrgGroupAsb', this.patientRegister.customerOrgGroupAsb)
for (let i = 0; i < this.patientRegister.customerOrgGroupAsb.length; i++) {
lfind = arrayExistObj(this.patientRegister.patientRegisterAbs, 'asbitemId', this.patientRegister.customerOrgGroupAsb[i].asbitemId)
if (lfind > - 1) {
this.patientRegister.patientRegisterAbs[lfind].groupPackageId = groupPackageId
continue
}
let pojo = {
asbitemId: this.patientRegister.customerOrgGroupAsb[i].asbitemId,
patientRegisterId: this.patientRegisterForm.id,
standardPrice: this.patientRegister.customerOrgGroupAsb[i].price,
chargePrice: this.patientRegister.customerOrgGroupAsb[i].customerOrgGroupDetailPrice,
payTypeFlag,
isCharge: "N",
amount: 1,
groupPackageId: groupPackageId
}
body.push(pojo)
this.patientRegister.patientRegisterAbs.push({ ...pojo, asbitemName: this.patientRegister.customerOrgGroupAsb[i].displayName })
}
console.log('this.patientRegister.patientRegisterAbs', this.patientRegister.patientRegisterAbs)
// if (editCount > 0 && this.patientRegisterForm.id) await this.onSubmit('');
// if (body.length > 0 && this.patientRegisterForm.id) {
// await this.batchAddAsb(body, '');
// } else {
// //
// this.getAsbItemByItemType()
// }
if(this.patientRegister.patientRegisterAbs.length > 0 && this.patientRegisterForm.id){
await this.onSubmit('更换分组');
}
},
//
async addMedicalPackageAsb(groupPackageId) {
let body = []
let payTypeFlag = '0'
let payTypeFlag = '0'; //
let lfind = -1 let lfind = -1
let editCount = 0
if (this.patientRegisterForm.customerOrgId != this.dict.personOrgId) payTypeFlag = '1'
for (let i = 0; i < this.patientRegister.medicalPackageAsb.length; i++) {
lfind = arrayExistObj(this.patientRegister.patientRegisterAbs, 'asbitemId', this.patientRegister.medicalPackageAsb[i].id)
if (this.patientRegisterForm.customerOrgId != this.dict.personOrgId) payTypeFlag = '1' //
for (let i = 0; i < groupPackageAsb.length; i++) {
lfind = arrayExistObj(this.patientRegister.patientRegisterAbs, 'asbitemId', groupPackageAsb[i].id)
if (lfind > - 1) { if (lfind > - 1) {
this.patientRegister.patientRegisterAbs[lfind].groupPackageId = groupPackageId this.patientRegister.patientRegisterAbs[lfind].groupPackageId = groupPackageId
editCount++ editCount++
continue continue
} }
let pojo = { let pojo = {
asbitemId: this.patientRegister.medicalPackageAsb[i].id,
asbitemId: groupPackageAsb[i].id,
patientRegisterId: this.patientRegisterForm.id, patientRegisterId: this.patientRegisterForm.id,
standardPrice: this.patientRegister.medicalPackageAsb[i].price,
chargePrice: this.patientRegister.medicalPackageAsb[i].price,
standardPrice: groupPackageAsb[i].price,
chargePrice: groupPackageAsb[i].price,
payTypeFlag, payTypeFlag,
discount: 100,
isCharge: "N", isCharge: "N",
amount: 1, amount: 1,
groupPackageId: groupPackageId groupPackageId: groupPackageId
} }
body.push(pojo)
this.patientRegister.patientRegisterAbs.push({ ...pojo, asbitemName: this.patientRegister.customerOrgGroupAsb[i].displayName })
}
if (editCount > 0 && this.patientRegisterForm.id) await this.onSubmit('');
if (body.length > 0 && this.patientRegisterForm.id) {
await this.batchAddAsb(body, '更换分组');
} else {
//
this.getAsbItemByItemType()
this.patientRegister.patientRegisterAbs.push({ ...pojo, asbitemName: groupPackageAsb[i].displayName })
} }
}, },
// //
async removeGroupPackageAsb() {
let body = {}
removeGroupPackageAsb() {
let body = { registerAsbitemIds: [] }
let registerAsbitemIds = [] let registerAsbitemIds = []
let chargeComplete = '' let chargeComplete = ''
// //
if (!this.patientRegisterForm.id) { if (!this.patientRegisterForm.id) {
this.patientRegister.patientRegisterAbs = []
return
this.patientRegister.patientRegisterAbs = [];
return body;
} }
// groupPackageId null // groupPackageId null
@ -584,108 +596,118 @@ export default {
this.$message({ type: "info", message: `所选项目:${chargeComplete}已收费或已检,不可删除!` }); this.$message({ type: "info", message: `所选项目:${chargeComplete}已收费或已检,不可删除!` });
} }
body = { registerAsbitemIds }
if (registerAsbitemIds.length > 0) {
await this.batchDelAsb(body, '');
}
body = { registerAsbitemIds };
let updateBody = []
if (this.patientRegister.patientRegisterAbs.length > 0) {
for (let i = 0; i < this.patientRegister.patientRegisterAbs.length; i++) {
//
if (this.patientRegister.patientRegisterAbs[i].id) {
updateBody.push({
registerAsbitemId: this.patientRegister.patientRegisterAbs[i].id,
input: {
chargePrice: this.patientRegister.patientRegisterAbs[i].chargePrice,
payTypeFlag: this.patientRegister.patientRegisterAbs[i].payTypeFlag,
isCharge: this.patientRegister.patientRegisterAbs[i].isCharge,
amount: this.patientRegister.patientRegisterAbs[i].amount,
groupPackageId: this.patientRegister.patientRegisterAbs[i].groupPackageId
}
})
}
}
await this.batchEditAsb(updateBody, '');
}
return body;
}, },
//
dbClickChoosedAsb(row) {
this.addAbs([row]);
},
// //
quickChoosedAsb(v){
quickChoosedAsb(v) {
// value-key value console.log('quickChoosedAsb',v)
let lfind = -1 let lfind = -1
let asbItemChoosed = []
console.log('quickChoosedAsb',v,this.dict.asbItemQuick)
if(v){
lfind = arrayExistObj(this.dict.asbItemQuick,'id',v)
if(lfind > -1){
asbItemChoosed.push(this.dict.asbItemQuick[lfind])
this.addAbs(asbItemChoosed)
}
}
if (v) {
lfind = arrayExistObj(this.dict.asbItemQuick, 'id', v)
if (lfind > -1) {
this.addAbs([this.dict.asbItemQuick[lfind]])
}
}
},
// quickChoosedAsb(v){
// let lfind = -1
// let asbItemChoosed = []
// console.log('quickChoosedAsb',v,this.dict.asbItemQuick)
// if(v){
// lfind = arrayExistObj(this.dict.asbItemQuick,'id',v)
// if(lfind > -1){
// asbItemChoosed.push(this.dict.asbItemQuick[lfind])
// this.addAbs(asbItemChoosed)
// }
// }
// },
//
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];
}
}, },
// //
changeAllDiscount(){
changeAllDiscount() {
if(!this.discount || this.discount == 0) return
if(!this.patientRegister.patientRegisterAbs || this.patientRegister.patientRegisterAbs.length == 0) return
if (!this.discount || this.discount == 0) return
if (!this.patientRegister.patientRegisterAbs || this.patientRegister.patientRegisterAbs.length == 0) return
this.patientRegister.patientRegisterAbs.forEach(e =>{
this.patientRegister.patientRegisterAbs.forEach(e => {
e.discount = this.discount e.discount = this.discount
e.chargePrice = (e.standardPrice * this.discount/100).toFixed(2)
e.total = (e.standardPrice * this.discount * e.amount/100).toFixed(2)
e.chargePrice = (e.standardPrice * this.discount / 100).toFixed(2)
e.total = (e.standardPrice * this.discount * e.amount / 100).toFixed(2)
return e return e
}); });
this.onSubmit('') this.onSubmit('')
}, },
// //
changeTotal(){
changeTotal() {
if(!this.total) return
if(!this.patientRegister.patientRegisterAbs || this.patientRegister.patientRegisterAbs.length == 0) return
if (!this.total) return
if (!this.patientRegister.patientRegisterAbs || this.patientRegister.patientRegisterAbs.length == 0) return
let sumChargeDetails = 0 // let sumChargeDetails = 0 //
let qtyIsOneLast = 0 //1 let qtyIsOneLast = 0 //1
this.discount = (100 * this.total/this.totalStand ).toFixed(2)
this.discount = (100 * this.total / this.totalStand).toFixed(2)
this.patientRegister.patientRegisterAbs.forEach((e,index) =>{
if(e.amount == 1) qtyIsOneLast = index
this.patientRegister.patientRegisterAbs.forEach((e, index) => {
if (e.amount == 1) qtyIsOneLast = index
e.discount = this.discount e.discount = this.discount
e.chargePrice = (e.standardPrice * this.discount/100).toFixed(2)
e.total = (e.standardPrice * this.discount * e.amount/100).toFixed(2)
sumChargeDetails += Number((e.standardPrice * this.discount * e.amount/100).toFixed(2))
e.chargePrice = (e.standardPrice * this.discount / 100).toFixed(2)
e.total = (e.standardPrice * this.discount * e.amount / 100).toFixed(2)
sumChargeDetails += Number((e.standardPrice * this.discount * e.amount / 100).toFixed(2))
return e return e
});
console.log('this.total - sumChargeDetails',sumChargeDetails,this.total - sumChargeDetails)
if(this.total != sumChargeDetails){
});
console.log('this.total - sumChargeDetails', sumChargeDetails, this.total - sumChargeDetails)
if (this.total != sumChargeDetails) {
this.patientRegister.patientRegisterAbs[qtyIsOneLast].chargePrice this.patientRegister.patientRegisterAbs[qtyIsOneLast].chargePrice
= (Number(this.patientRegister.patientRegisterAbs[qtyIsOneLast].chargePrice)
+ Number((this.total - sumChargeDetails)/this.patientRegister.patientRegisterAbs[qtyIsOneLast].amount)).toFixed(2)
= (Number(this.patientRegister.patientRegisterAbs[qtyIsOneLast].chargePrice)
+ Number((this.total - sumChargeDetails) / this.patientRegister.patientRegisterAbs[qtyIsOneLast].amount)).toFixed(2)
} }
this.onSubmit('')
this.onSubmit('')
}, },
// //
changeDiscount(index){
changeDiscount(index) {
//console.log('index',index) //console.log('index',index)
if(!this.patientRegister.patientRegisterAbs || this.patientRegister.patientRegisterAbs.length == 0) return
if(!this.patientRegister.patientRegisterAbs[index].discount) return
if (!this.patientRegister.patientRegisterAbs || this.patientRegister.patientRegisterAbs.length == 0) return
if (!this.patientRegister.patientRegisterAbs[index].discount) return
//console.log(this.patientRegister.patientRegisterAbs[index].chargePrice,this.patientRegister.patientRegisterAbs[index].standardPrice) //console.log(this.patientRegister.patientRegisterAbs[index].chargePrice,this.patientRegister.patientRegisterAbs[index].standardPrice)
this.patientRegister.patientRegisterAbs[index].chargePrice = Number( this.patientRegister.patientRegisterAbs[index].standardPrice * this.patientRegister.patientRegisterAbs[index].discount/100).toFixed(2)
this.patientRegister.patientRegisterAbs[index].chargePrice = Number(this.patientRegister.patientRegisterAbs[index].standardPrice * this.patientRegister.patientRegisterAbs[index].discount / 100).toFixed(2)
this.onSubmit('') this.onSubmit('')
}, },
// //
changePrice(index){
changePrice(index) {
//console.log('index',index) //console.log('index',index)
if(!this.patientRegister.patientRegisterAbs || this.patientRegister.patientRegisterAbs.length == 0) return
if(!this.patientRegister.patientRegisterAbs[index].chargePrice) return
if (!this.patientRegister.patientRegisterAbs || this.patientRegister.patientRegisterAbs.length == 0) return
if (!this.patientRegister.patientRegisterAbs[index].chargePrice) return
//console.log(this.patientRegister.patientRegisterAbs[index].chargePrice,this.patientRegister.patientRegisterAbs[index].standardPrice) //console.log(this.patientRegister.patientRegisterAbs[index].chargePrice,this.patientRegister.patientRegisterAbs[index].standardPrice)
this.patientRegister.patientRegisterAbs[index].discount = Number(this.patientRegister.patientRegisterAbs[index].chargePrice * 100 / this.patientRegister.patientRegisterAbs[index].standardPrice).toFixed(2) this.patientRegister.patientRegisterAbs[index].discount = Number(this.patientRegister.patientRegisterAbs[index].chargePrice * 100 / this.patientRegister.patientRegisterAbs[index].standardPrice).toFixed(2)
this.onSubmit('') this.onSubmit('')
@ -694,7 +716,7 @@ export default {
// //
getSummaries(param) { getSummaries(param) {
const { columns, data } = param; const { columns, data } = param;
const sumCol = [2,5] //
const sumCol = [2, 5] //
const sums = []; const sums = [];
columns.forEach((column, index) => { columns.forEach((column, index) => {
//console.log('column, index,data',column, index,data) //console.log('column, index,data',column, index,data)
@ -709,10 +731,10 @@ export default {
sums[index] = ''; sums[index] = '';
return; return;
} }
sums[index] = 0 sums[index] = 0
data.forEach(e =>{
if(!isNaN(e[column.property])) sums[index] += e[column.property] * e['amount']
data.forEach(e => {
if (!isNaN(e[column.property])) sums[index] += e[column.property] * e['amount']
}) })
sums[index] = sums[index].toFixed(2) //+ ' '; sums[index] = sums[index].toFixed(2) //+ ' ';
@ -733,9 +755,10 @@ export default {
// } // }
}); });
this.totalStand = sums[2]
this.total = sums[5]
this.discount = Number(this.total * 100 / this.totalStand).toFixed(2)
this.totalStand = sums[2];
//console.log('this.totalFoucs/this.discountFoucs',this.totalFoucs,this.discountFoucs)
if (!this.totalFoucs) this.total = sums[5];
if (!this.discountFoucs) this.discount = Number(this.total * 100 / this.totalStand).toFixed(2);
return sums; return sums;
}, },
@ -747,7 +770,8 @@ export default {
"patientRegister.customerOrgGroupChange"(newVal, oldVal) { "patientRegister.customerOrgGroupChange"(newVal, oldVal) {
console.log("watch patientRegister.customerOrgGroupChange newVal:", newVal, " oldVal:", oldVal); console.log("watch patientRegister.customerOrgGroupChange newVal:", newVal, " oldVal:", oldVal);
if (newVal != oldVal && newVal > 0) { if (newVal != oldVal && newVal > 0) {
this.getCustomerOrgGroupAsb(this.patientRegisterForm.customerOrgGroupId);
//this.getCustomerOrgGroupAsb(this.patientRegisterForm.customerOrgGroupId);
this.getGroupPackageAsb('group', this.patientRegisterForm.customerOrgGroupId);
} }
}, },
@ -755,13 +779,17 @@ export default {
"patientRegister.medicalPackageChange"(newVal, oldVal) { "patientRegister.medicalPackageChange"(newVal, oldVal) {
console.log("watch patientRegister.medicalPackageChange newVal:", newVal, " oldVal:", oldVal); console.log("watch patientRegister.medicalPackageChange newVal:", newVal, " oldVal:", oldVal);
if (newVal != oldVal && newVal > 0) { if (newVal != oldVal && newVal > 0) {
this.getMedicalPackageAsb(this.patientRegisterForm.medicalPackageId);
//this.getMedicalPackageAsb(this.patientRegisterForm.medicalPackageId);
this.getGroupPackageAsb('medical', this.patientRegisterForm.medicalPackageId);
} }
}, },
//
//
"patientRegister.saveTimes"(newVal, oldVal) { "patientRegister.saveTimes"(newVal, oldVal) {
this.onSubmit('')
console.log("patientRegister.saveTimes newVal:", newVal, " oldVal:", oldVal);
if (newVal != oldVal) {
this.onSubmit('');
}
}, },
}, },
}; };
@ -769,16 +797,17 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.mainareaBox { .mainareaBox {
border: 1px solid #000; border: 1px solid #000;
height: v-bind("(window.pageHeight>735 ? (window.pageHeight - 535):200) + 'px'");
height: v-bind("(window.pageHeight > 735 ? (window.pageHeight - 535) : 200) + 'px'");
margin-top: 5px; margin-top: 5px;
} }
.btnList{
.btnList {
margin-top: 5px; margin-top: 5px;
margin-left: 5px; margin-left: 5px;
margin-right: 5px; margin-right: 5px;
} }
.disTotal{
.disTotal {
margin-left: 10px; margin-left: 10px;
} }
@ -788,27 +817,27 @@ export default {
padding-right: 1px; padding-right: 1px;
} }
::v-deep .el-table th.el-table__cell{
::v-deep .el-table th.el-table__cell {
text-align: center; text-align: center;
padding-left: 1px; padding-left: 1px;
padding-right: 1px; padding-right: 1px;
} }
::v-deep .el-table td.el-table__cell{
::v-deep .el-table td.el-table__cell {
padding-left: 1px; padding-left: 1px;
padding-right: 1px; padding-right: 1px;
} }
::v-deep .el-table .cell{
::v-deep .el-table .cell {
padding-left: 1px; padding-left: 1px;
padding-right: 1px; padding-right: 1px;
} }
::v-deep input[type="number"]::-webkit-inner-spin-button,
::v-deep input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { input[type="number"]::-webkit-outer-spin-button {
-webkit-appearance: none !important; -webkit-appearance: none !important;
margin: 0 !important; margin: 0 !important;
} }
</style> </style>

5
src/components/patientRegister/PatientRegisterList.vue

@ -49,7 +49,7 @@
<el-table-column prop="nationId" label="民族"> <el-table-column prop="nationId" label="民族">
<template slot-scope="scope"> <template slot-scope="scope">
<div> <div>
{{ ldddw(dict.nation, "id", scope.row.nationId, "displayName") }}
{{ ldddw(dict.nation, "nationId", scope.row.nationId, "displayName") }}
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
@ -61,7 +61,7 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="email" label="邮箱" width="100" />
<el-table-column prop="email" label="邮箱" width="180" />
<el-table-column prop="mobileTelephone" label="手机" width="100" /> <el-table-column prop="mobileTelephone" label="手机" width="100" />
<el-table-column prop="telephone" label="电话" width="100" /> <el-table-column prop="telephone" label="电话" width="100" />
<el-table-column prop="address" label="地址" width="300" /> <el-table-column prop="address" label="地址" width="300" />
@ -269,6 +269,7 @@ export default {
this.patientRegister.patientRegisterAbs = []; this.patientRegister.patientRegisterAbs = [];
this.dialogVisible = true; this.dialogVisible = true;
this.editTimes++; // this.editTimes++; //
this.getPatientRegisterAbs();
}, },
edit() { edit() {

1
src/components/patientRegister/patientRegisterAsbItem.vue

@ -99,6 +99,7 @@ export default {
return prev; return prev;
} }
}, 0); }, 0);
sums[index] = Math.round(sums[index],2);
sums[index] += ' 元'; sums[index] += ' 元';
} else { } else {
sums[index] = 'N/A'; sums[index] = 'N/A';

76
src/store/index.js

@ -257,37 +257,53 @@ export default new Vuex.Store({
//获取体检人员所选组合项目 //获取体检人员所选组合项目
getPatientRegisterAbs(context, id) { getPatientRegisterAbs(context, id) {
//console.log(`vuex getPatientRegisterAbs /api/app/registerasbitem/getlistinpatientregisterid?PatientRegisterId=${id}`, context.state.dict.asbItemAll) //console.log(`vuex getPatientRegisterAbs /api/app/registerasbitem/getlistinpatientregisterid?PatientRegisterId=${id}`, context.state.dict.asbItemAll)
getapi(`/api/app/registerasbitem/getlistinpatientregisterid?PatientRegisterId=${id}`).then(
(res) => {
console.log(`/api/app/registerasbitem/getlistinpatientregisterid?PatientRegisterId=${id}`, res)
if (res.code == 1) {
let patientRegisterAbs = []
res.data.forEach(e => {
e.standTotal = e.amount * e.standardPrice
e.total = e.amount * e.chargePrice
patientRegisterAbs.push(e)
});
context.commit("setData", {
key: "patientRegister.patientRegisterAbs",
value:patientRegisterAbs,
});
context.commit("setData", {
key: "dict.asbItem",
value: arrayReduce(
[...context.state.dict.asbItem],
[...context.state.patientRegister.patientRegisterAbs],
"id=asbitemId"
),
});
context.commit("setData", {
key: "dict.asbItemQuick",
value: arrayReduce([...context.state.dict.asbItemAll],[...context.state.patientRegister.patientRegisterAbs],"id=asbitemId"),
});
//console.log(`getPatientRegisterAbs ${id}`,context.state.dict.asbItem)
if(id){
getapi(`/api/app/registerasbitem/getlistinpatientregisterid?PatientRegisterId=${id}`).then(
(res) => {
console.log(`/api/app/registerasbitem/getlistinpatientregisterid?PatientRegisterId=${id}`, res)
if (res.code == 1) {
let patientRegisterAbs = []
res.data.forEach(e => {
e.standTotal = e.amount * e.standardPrice
e.total = e.amount * e.chargePrice
patientRegisterAbs.push(e)
});
context.commit("setData", {
key: "patientRegister.patientRegisterAbs",
value:patientRegisterAbs,
});
context.commit("setData", {
key: "dict.asbItem",
value: arrayReduce(
[...context.state.dict.asbItem],
[...context.state.patientRegister.patientRegisterAbs],
"id=asbitemId"
),
});
context.commit("setData", {
key: "dict.asbItemQuick",
value: arrayReduce([...context.state.dict.asbItemAll],[...context.state.patientRegister.patientRegisterAbs],"id=asbitemId"),
});
//console.log(`getPatientRegisterAbs ${id}`,context.state.dict.asbItemQuick)
}
} }
}
);
);
}else{
context.commit("setData", {
key: "patientRegister.patientRegisterAbs",
value:[],
});
context.commit("setData", {
key: "dict.asbItem",
value: [...context.state.dict.asbItemAll],
});
context.commit("setData", {
key: "dict.asbItemQuick",
value: [...context.state.dict.asbItemAll],
});
}
}, },
//获取单位分组 /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

4
src/views/customerOrg/patientRegister.vue

@ -119,8 +119,8 @@ export default {
// //
getapi("/api/app/nation/in-filter").then((res) => { getapi("/api/app/nation/in-filter").then((res) => {
if (res.code == 1) {
this.dict.nation = res.data.items;
if (res.code != - 1) {
this.dict.nation = res.data;
} }
}); });

Loading…
Cancel
Save