|
|
@@ -345,7 +345,7 @@ const init = async (id, detail, status) => {
|
|
|
}
|
|
|
await getOverheadList()
|
|
|
if(id){
|
|
|
- handleChange()
|
|
|
+ handleChange(1)
|
|
|
|
|
|
}
|
|
|
|
|
|
@@ -440,7 +440,7 @@ const getTreeData = async () => {
|
|
|
}
|
|
|
|
|
|
// 护理标准
|
|
|
-const handleChange = () => {
|
|
|
+const handleChange = (type=2) => {
|
|
|
dataForm.value.expectOverheadChargeId = dataForm.value.expectId
|
|
|
const item = nurseList.value.find((item) => item.id == dataForm.value.expectId)
|
|
|
dataForm.value.expectName = item?.chargeName
|
|
|
@@ -456,7 +456,10 @@ const handleChange = () => {
|
|
|
}
|
|
|
}
|
|
|
dataForm.value.categoryName = res.reverse().join('-')
|
|
|
- handleSwicth()
|
|
|
+ if(type!=1){
|
|
|
+ handleSwicth()
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
// nurseList.value.map((item)=>{
|
|
|
// if(item.id==overheadChargeId){
|
|
|
@@ -465,7 +468,7 @@ const handleChange = () => {
|
|
|
// })
|
|
|
|
|
|
// 如果没有打折
|
|
|
- if(!dataForm.value.discount){
|
|
|
+ if(dataForm.value.isDiscount!=1){
|
|
|
dataForm.value.actualAmount = dataForm.value.amount
|
|
|
}else{
|
|
|
handleBlur(dataForm.value, 1)
|
|
|
@@ -474,6 +477,7 @@ const handleChange = () => {
|
|
|
|
|
|
// 折扣和折扣率换算
|
|
|
const handleBlur = (item, type = 0) => {
|
|
|
+
|
|
|
if (type == 1) {
|
|
|
// 折扣价格
|
|
|
item.discountAmount = discountAmount.value
|
|
|
@@ -495,11 +499,14 @@ const handleBlur = (item, type = 0) => {
|
|
|
|
|
|
// 是否打折
|
|
|
const handleSwicth = () => {
|
|
|
- dataForm.value.discountAmount = ''
|
|
|
- dataForm.value.actualAmount = 0
|
|
|
- dataForm.value.discount = undefined
|
|
|
- discount.value = undefined
|
|
|
- discountAmount.value = ''
|
|
|
+ if(!isDetail.value){
|
|
|
+ dataForm.value.discountAmount = ''
|
|
|
+ dataForm.value.actualAmount = 0
|
|
|
+ dataForm.value.discount = undefined
|
|
|
+ discount.value = undefined
|
|
|
+ discountAmount.value = ''
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
//let overheadChargeId = 0
|