|
@@ -724,6 +724,9 @@ export default {
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
watch: {
|
|
watch: {
|
|
|
|
|
+ singleCount() {
|
|
|
|
|
+ this.updatePrice();
|
|
|
|
|
+ },
|
|
|
detailTables: {
|
|
detailTables: {
|
|
|
handler() {
|
|
handler() {
|
|
|
this.calcPrice();
|
|
this.calcPrice();
|
|
@@ -1302,22 +1305,11 @@ export default {
|
|
|
},
|
|
},
|
|
|
// 根据详情重新计算 singleCount 并更新价格(用于穴位详情变化时)
|
|
// 根据详情重新计算 singleCount 并更新价格(用于穴位详情变化时)
|
|
|
calcPrice() {
|
|
calcPrice() {
|
|
|
- const price = this.currentUnitPrice || this.unitPrice || 0;
|
|
|
|
|
const totalFromDetails = this.calcTotalCount();
|
|
const totalFromDetails = this.calcTotalCount();
|
|
|
if (totalFromDetails > 0 && !this._isLoadingTab) {
|
|
if (totalFromDetails > 0 && !this._isLoadingTab) {
|
|
|
this.singleCount = totalFromDetails;
|
|
this.singleCount = totalFromDetails;
|
|
|
}
|
|
}
|
|
|
- this.singlePrice = (this.singleCount * price).toFixed(2);
|
|
|
|
|
- this.coursePrice = (
|
|
|
|
|
- this.treatCount * parseFloat(this.singlePrice)
|
|
|
|
|
- ).toFixed(2);
|
|
|
|
|
- this.saveCurrentTabData();
|
|
|
|
|
- let total = 0;
|
|
|
|
|
- Object.values(this.prescriptionDataMap).forEach((d) => {
|
|
|
|
|
- total += parseFloat(d.coursePrice) || 0;
|
|
|
|
|
- });
|
|
|
|
|
- this.totalPrice = total.toFixed(2);
|
|
|
|
|
- this.emitStatistics();
|
|
|
|
|
|
|
+ this.updatePrice();
|
|
|
},
|
|
},
|
|
|
calcTotalCount() {
|
|
calcTotalCount() {
|
|
|
let total = 0;
|
|
let total = 0;
|