Browse Source

batch分组

master
pengjun 2 years ago
parent
commit
df665c54e2
  1. 65
      src/components/patientRegister/PatientRegisterEditGroupBatch.vue
  2. 18
      src/components/patientRegister/PatientRegisterEditItemBatch.vue

65
src/components/patientRegister/PatientRegisterEditGroupBatch.vue

@ -9,13 +9,20 @@
<el-option v-for="item in customerOrgGroup" :key="item.id" :label="item.displayName" :value="item.id" />
</el-select>
</div>
<div>
<br /><el-radio v-model="groupBatch.payTypeFlag" label="0">个人支付</el-radio>
<br /><el-radio v-model="groupBatch.payTypeFlag" label="1">单位支付</el-radio>
<br /><el-radio v-model="groupBatch.payTypeFlag" label="2">免费</el-radio>
<div style="display: flex;margin: 10px 0;">
<el-tooltip class="item" content="支付方式只针对调整分组后新添加的组合项目起作用" placement="top">
<div>
支付方式
</div>
</el-tooltip>
<div style="margin-left: 5px;">
<el-radio v-model="groupBatch.payTypeFlag" label="0">个人支付</el-radio>
<br /><el-radio v-model="groupBatch.payTypeFlag" label="1">单位支付</el-radio>
<br /><el-radio v-model="groupBatch.payTypeFlag" label="2">免费</el-radio>
</div>
</div>
<div>
<br /><el-checkbox v-model="groupBatch.isReserveAddAsbitem">保留加做项目包括不属于原分组的没有设置分组的</el-checkbox>
<el-checkbox v-model="groupBatch.isReserveAddAsbitem">保留加做项目包括不属于原分组的没有设置分组的</el-checkbox>
</div>
</div>
<div style="display: flex;margin-top: 5px;justify-content:space-between;">
@ -65,10 +72,11 @@ export default {
payTypeFlag: "1", //01 2
isReserveAddAsbitem: true, //
},
groupBatchInit:{},
groupBatchInit: {},
};
},
created() {
this.groupBatchInit = deepCopy(this.groupBatch)
},
@ -90,7 +98,7 @@ export default {
},
methods: {
moment, dddw, deepCopy,
// /api/app/customer-org-group/in-customer-org-id/3a0c0444-d7a0-871f-4074-19faf1655caf
getCustomerOrgGroup(customerOrgRegisterId) {
this.customerOrgGroup = []
@ -120,24 +128,45 @@ export default {
this.$message.warning("请选择分组");
return;
}
let isContinue = true //
this.elProgress.display = true;
this.elProgress.percentage = 0;
for (let i = 0; i < this.multipleSelection.length; i++) {
if (!isContinue) break;
groupBatch.patientRegisterId = this.multipleSelection[i].id;
try {
await postapi(
"/api/app/patientregister/updatepatientregistercustomerorggroup",
groupBatch
);
} catch (error) {
console.log(error);
// /api/app/patientregister/updatepatientregistercustomerorggroup
let res = await postapi("/api/app/patientregister/BatchUpdateCustomerOrgGroup", groupBatch);
if (res.code == -1) {
try {
await this.$confirm(`人员 ${this.multipleSelection[i].patientName} 调整分组失败, 是否继续操作其他人员?`, "提示", {
confirmButtonText: "是",
cancelButtonText: "否",
type: "warning",
})
} catch (error) {
console.log(error) //
isContinue = false;
}
}
} catch (err) {
try {
await this.$confirm(`人员 ${this.multipleSelection[i].patientName} 调整分组失败, 是否继续操作其他人员?`, "提示", {
confirmButtonText: "是",
cancelButtonText: "否",
type: "warning",
})
} catch (error) {
console.log(error) //
isContinue = false;
}
}
this.elProgress.percentage = Math.floor(
((i + 1) * 100) / this.multipleSelection.length
);
this.elProgress.percentage = Math.floor(((i + 1) * 100) / this.multipleSelection.length);
}
console.log("操作成功!");
// console.log("");
this.elProgress.display = false;
this.dialogWin.PatientRegisterEditGroupBatch = false
//
this.patientRegister.query.times++

18
src/components/patientRegister/PatientRegisterEditItemBatch.vue

@ -267,14 +267,19 @@ export default {
return;
}
let registerCheckAsbitems = deepCopy(
this.asbitemBatch.asbitemsTemp
);
this.asbitemBatch.asbitemsTemp
);
let isContinue = true //
if (this.asbitemBatch.operate == "add") {
this.asbitemBatch.asbitemsTemp.forEach((e, index) => {
if (!e.amount || !e.chargePrice) {
msg = "第 " + (index + 1) + " 行,未输入数量或价格!";
if (!e.amount) {
msg = "第 " + (index + 1) + " 行,未输入数量!";
}
if (e.chargePrice == '' || Number(e.chargePrice) < 0) {
msg = "第 " + (index + 1) + " 行,价格必须 ≥ 0 !";
}
});
if (msg) {
this.$message.warning(msg);
@ -288,7 +293,7 @@ export default {
this.elProgress.display = true;
this.elProgress.percentage = 0;
let isContinue = true //
for (let i = 0; i < this.multipleSelection.length; i++) {
if (!isContinue) break;
// createRegisterAsbitemDtos.forEach((e) => {
@ -350,10 +355,11 @@ export default {
this.elProgress.display = true;
this.elProgress.percentage = 0;
for (let i = 0; i < this.multipleSelection.length; i++) {
if (!isContinue) break;
// this.asbitemBatch.asbitemsTemp.forEach((e) => {
// asbitemIds.push(e.asbitemId);
// });
body.patientRegisterId = this.multipleSelection[i].id;
// body.asbitemIds = asbitemIds;

Loading…
Cancel
Save