|
|
|
@ -120,19 +120,19 @@ |
|
|
|
<el-table-column label="折扣" prop="discount" min-width="60"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input type="number" v-model="scope.row.discount" size="small" @input="changeDiscount(scope.$index)" |
|
|
|
:disabled="scope.row.isCharge == 'Y' ? true : false" /> |
|
|
|
:disabled="scope.row.isCharge == 'Y' || scope.row.isDiscount == 'N' ? true : false" /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="数量" prop="amount" min-width="50"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input type="number" v-model="scope.row.amount" size="small" @input="changeDiscount(scope.$index)" |
|
|
|
:disabled="scope.row.isCharge == 'Y' ? true : false" /> |
|
|
|
:disabled="scope.row.isCharge == 'Y' || scope.row.isDiscount == 'N' ? true : false" /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="应收价格" prop="chargePrice" min-width="70"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input type="number" v-model="scope.row.chargePrice" size="small" @input="changePrice(scope.$index)" |
|
|
|
:disabled="scope.row.isCharge == 'Y' ? true : false" /> |
|
|
|
:disabled="scope.row.isCharge == 'Y' || scope.row.isDiscount == 'N' ? true : false" /> |
|
|
|
<!--立即触发保存 @blur="onSubmit('')" --> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
@ -601,6 +601,7 @@ export default { |
|
|
|
discount: 100, |
|
|
|
amount: 1, |
|
|
|
total: asbItemChoosed[i].price, |
|
|
|
isDiscount:asbItemChoosed[i].isDiscount |
|
|
|
} |
|
|
|
// 优化加最上面 |
|
|
|
//this.dataTransOpts.tableM.register_check_asbitem.push(pojo) |
|
|
|
@ -861,10 +862,11 @@ export default { |
|
|
|
// 未收费,则更新价格 |
|
|
|
if (this.dataTransOpts.tableM.register_check_asbitem[i].isCharge != 'Y') { |
|
|
|
this.dataTransOpts.tableM.register_check_asbitem[i].payTypeFlag = payTypeFlag |
|
|
|
this.dataTransOpts.tableM.register_check_asbitem[i].amount = tempRd.customerOrgGroupDetailAmount |
|
|
|
this.dataTransOpts.tableM.register_check_asbitem[i].standardPrice = tempRd.price |
|
|
|
this.dataTransOpts.tableM.register_check_asbitem[i].chargePrice = tempRd.customerOrgGroupDetailPrice |
|
|
|
this.dataTransOpts.tableM.register_check_asbitem[i].discount = tempRd.discount |
|
|
|
this.dataTransOpts.tableM.register_check_asbitem[i].amount = e.customerOrgGroupDetailAmount |
|
|
|
this.dataTransOpts.tableM.register_check_asbitem[i].standardPrice = e.price |
|
|
|
this.dataTransOpts.tableM.register_check_asbitem[i].chargePrice = e.customerOrgGroupDetailPrice |
|
|
|
this.dataTransOpts.tableM.register_check_asbitem[i].discount = e.discount |
|
|
|
this.dataTransOpts.tableM.register_check_asbitem[i].isDiscount = e.isDiscount |
|
|
|
} |
|
|
|
} else { |
|
|
|
tempRd = { |
|
|
|
@ -878,6 +880,7 @@ export default { |
|
|
|
payTypeFlag, |
|
|
|
isCharge: "N", |
|
|
|
discount: e.discount, |
|
|
|
isDiscount:e.isDiscount, |
|
|
|
amount: e.customerOrgGroupDetailAmount, |
|
|
|
total: Math.round(e.customerOrgGroupDetailAmount * e.customerOrgGroupDetailPrice * 100) / 100 |
|
|
|
} |
|
|
|
@ -912,10 +915,11 @@ export default { |
|
|
|
// 未收费,则更新价格 |
|
|
|
if (this.dataTransOpts.tableM.register_check_asbitem[i].isCharge != 'Y') { |
|
|
|
this.dataTransOpts.tableM.register_check_asbitem[i].payTypeFlag = payTypeFlag |
|
|
|
this.dataTransOpts.tableM.register_check_asbitem[i].amount = tempRd.customerOrgGroupDetailAmount |
|
|
|
this.dataTransOpts.tableM.register_check_asbitem[i].standardPrice = tempRd.price |
|
|
|
this.dataTransOpts.tableM.register_check_asbitem[i].chargePrice = tempRd.customerOrgGroupDetailPrice |
|
|
|
this.dataTransOpts.tableM.register_check_asbitem[i].discount = tempRd.discount |
|
|
|
this.dataTransOpts.tableM.register_check_asbitem[i].amount = e.customerOrgGroupDetailAmount |
|
|
|
this.dataTransOpts.tableM.register_check_asbitem[i].standardPrice = e.price |
|
|
|
this.dataTransOpts.tableM.register_check_asbitem[i].chargePrice = e.customerOrgGroupDetailPrice |
|
|
|
this.dataTransOpts.tableM.register_check_asbitem[i].discount = e.discount |
|
|
|
this.dataTransOpts.tableM.register_check_asbitem[i].isDiscount = e.isDiscount |
|
|
|
} |
|
|
|
} else { |
|
|
|
tempRd = { |
|
|
|
@ -929,6 +933,7 @@ export default { |
|
|
|
payTypeFlag, |
|
|
|
isCharge: "N", |
|
|
|
discount: e.discount, |
|
|
|
isDiscount: e.isDiscount, |
|
|
|
amount: e.medicalPackageDetailAmount, |
|
|
|
total: Math.round(e.medicalPackageDetailAmount * e.medicalPackageDetailPrice * 100) / 100 |
|
|
|
} |
|
|
|
@ -1021,7 +1026,8 @@ export default { |
|
|
|
|
|
|
|
let total = Number(0) |
|
|
|
this.dataTransOpts.tableM.register_check_asbitem.forEach(e => { |
|
|
|
if (e.isCharge == 'N') { |
|
|
|
// 未收费及允许折扣的项目,才允许修改折扣 |
|
|
|
if (e.isCharge == 'N' && e.isDiscount == 'Y') { |
|
|
|
e.discount = this.discount |
|
|
|
e.chargePrice = Math.round(e.standardPrice * this.discount) / 100 |
|
|
|
e.total = Math.round(e.standardPrice * this.discount * e.amount) / 100 |
|
|
|
@ -1051,7 +1057,8 @@ export default { |
|
|
|
let unChargeTotalStand = Number(this.totalStand) //未收费的总标准价 |
|
|
|
let chargeTotal = Number(0) // |
|
|
|
this.dataTransOpts.tableM.register_check_asbitem.forEach(e => { |
|
|
|
if (e.isCharge == 'Y') { |
|
|
|
// 未收费及允许折扣的项目,才允许修改折扣 |
|
|
|
if (e.isCharge == 'Y' || e.isDiscount == 'N') { |
|
|
|
chargeTotal = chargeTotal + Math.round(e.chargePrice * e.amount * 100) / 100 |
|
|
|
unChargeTotalStand = unChargeTotalStand - Math.round(e.standardPrice * e.amount * 100) / 100 |
|
|
|
} |
|
|
|
@ -1061,7 +1068,8 @@ export default { |
|
|
|
this.discount = Math.round((100 * total / unChargeTotalStand) * 100) / 100 |
|
|
|
|
|
|
|
this.dataTransOpts.tableM.register_check_asbitem.forEach((e, index) => { |
|
|
|
if (e.isCharge == 'N') { |
|
|
|
// 未收费及允许折扣的项目,才允许修改折扣 |
|
|
|
if (e.isCharge == 'N' && e.isDiscount == 'Y') { |
|
|
|
if (e.amount == 1 && e.standardPrice != 0) qtyIsOneLast = index |
|
|
|
e.discount = this.discount |
|
|
|
e.chargePrice = Math.round((e.standardPrice * this.discount / 100) * 100) / 100 |
|
|
|
|